I am using RTT logging and it is interfering with USB HID data transfer. The host sends consecutive OUT packets and I print some logs after each one. I will miss a APP_USBD_HID_USER_EVT_OUT_REPORT_READY event sometimes. I am doing this in the main loop:
while (1) {
while (app_usbd_event_queue_process())
{
;
}
//process data and print to log
if (NRF_LOG_PROCESS() == false)
{
nrf_pwr_mgmt_run();
}
}
Is this the correct way to handle USB? I copied it from the USB HID examples. If I turn off logging or set APP_USBD_CONFIG_EVENT_QUEUE_ENABLE to 0 then I don't see this problem.