This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

how to fix stall pid on usb generic out report

Hello Nordic Expert,

I am facing a stall pid issue with nRF52840 Dongle using nRF5_SDK_15.2.0_9412b96. The chip build code is QIAAC0. I started with usbd_hid_generic example and added an out endpoint. I then added the BLE part similar to the ble_app_blinky_c example. I finally included peer manager and flash data storage libraries and this is when I faced the issue.

I am receiving multiple out reports of size 64 bytes from a host and sometimes I see the stall pid when monitoring the USB port. There is around 1 msec delay between the HID frames sent by the PC (host) and I have no control on that. When I debugged, I noticed that nrf_drv_usbd_ep_stall is called in app_usbd.c at line 1292. However, I was not able to further debug as I could not find the handler (p_ep_conf->event_handler) called in app_usbd.c at line 1285. Surprisingly, when I remove the peer manager and fds libraries and the associated code, the problem will be fixed. 

I am aware of this issue which is pretty much the same as our issue.

Any help is appreciated as I am get stuck in the development stage.

Thanks 

Parents
  • Some more information that may help: In endpoint_out_event_handler app_usbd.hid.c, I first get p_event->drv_evt.data.eptransfer.status = NRF_USBD_EP_WAITING, then p_event->drv_evt.data.eptransfer.status = NRF_USBD_EP_OK, and then stall pid status. There should be something wrong with the memory allocation of out report.

Reply
  • Some more information that may help: In endpoint_out_event_handler app_usbd.hid.c, I first get p_event->drv_evt.data.eptransfer.status = NRF_USBD_EP_WAITING, then p_event->drv_evt.data.eptransfer.status = NRF_USBD_EP_OK, and then stall pid status. There should be something wrong with the memory allocation of out report.

Children
No Data
Related