Hi,
I have a little program that is built on top of the USB CDC ACM example. This little program waits for an SPI event, when the event arrives, it reads the SPI peripheral and sends out the data over USB. SPI events frequency (USB send frequency) is 850 Hz. At every transfer only one packet of size 50B is sent. This is almost all this program does.
On the host side, I noticed that almost 70 packets are not received in every 10000 packets. I realized that the packets that are not received, have never been sent out since the nrfx_usbd_ep_transfer function in app_usbd_cdc_acm_write returned NRF_ERROR_BUSY in those cases. The NRF_ERROR_BUSY occurances does not have a regular pattern, they could happen at different times and in different numbers.
Could you please help me understand what could be causing this and how I could resolve it? Is 850 Hz to high a frequency? Could it be that the chip is in low-power mode? Could it be that the DMA is not freed by the SPI at these times?
I am using nRF52840 Dongle and nRF5_SDK_15.3.0_59ac345.
Kind regards,
Amir