Hello there!
We have different sensors connected to our custom nRF52840-based board running Zephyr OS. The goal is to transfer sensor readings to the PC by using a USB link. I found USB CDC ACM Sample Application to be a good starting point for our needs.
However, by diving deeper into the sample, I figured out that the sample is interrupt-driven. The only way to transfer data from our custom board to the PC would be through the interrupt_handler() function which is called at the moment some data are being sent from the PC to our custom board.
Is there any way we can modify the sample so that the USB transfer from our custom board to the PC is initialized at the moment we want (i.e. at the moment we collect readings from the sensors)? Should we modify the sample to use CONFIG_UART_ASYNC_API instead of CONFIG_UART_INTERRUPT_DRIVEN in that case?
Is there any USB-related Zephyr sample that will be a better starting point for us?
Thanks in advance for your time and efforts.
Sincerely,
Bojan.