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

Problems with OUT reports on USB HID

Hi,

I'm using the NRF52840 PDK version:

PCA10056

0.11.0

2018.3

With SDK version 15.2

I've been trying to develop an application based on the HID Generic example and am seeing some strange behaviours on the USB HID OUT endpoint.

I try to obtain the data in the APP_USBD_HID_USER_EVT_OUT_REPORT_READY event, at which point I use app_usbd_hid_generic_out_report_get to retrieve the data for processing in my main loop.

After more tracing and debugging, I've found that the hid_generic_ep_transfer_out handler is called when the OUT endpoint is busy.  When this happens the app_usbd_ep_transfer fails and app_usbd proceeds to stall the endpoint (in app_usbd_event_execute).

How can I avoid this situation?

Thanks,

Larry

Parents Reply
  • Hi Larry,

    We were able to reproduce this issue with the code provided. Indeed looks like HID OUT reports sometimes STALL and fail the test. We don't have time to investigate this at the moment, but we may look into it for future.

    As it is today the OUT report size is limited to 64bytes in any case by the app_usbd_hid.c, see endpoint_out_event_handler():
    ASSERT(p_hinst->p_rep_buffer_out->size <= NRF_DRV_USBD_EPSIZE); 

    Best regards,
    Kenneth

Children
Related