Previously I have been successfully using the USB Device HID code as featured in the Keil Real time Library (RL ARM 4.22). I have been running our own data protocols sending 64 byte reports every 2ms. This has been done with the usbd_STM32F2xx_FS.c driver matching our Cortex processor.
We are now trying to upgrade to MDK450, which has different USB HID report handling. I have managed to get the IN/OUT report data stream working by:- a) Using the report type "USBD_HID_REQ_EP_INT" in the function usbd_hid_get_report(). b) Calling function usbd_hid_get_report_trigger(), once to enable the first report.
The problem I am having is the data path does not recover after a USB link disconnect/ re-connect sequence. After re-connection, the USB appears to connect up except the IN Reports are All NAK'd on the USB Trace. This is the same as on startup, where a call to function usbd_hid_get_report_trigger() allows the IN reports to work correctly.
In the older versions of the USB HID RL code, the report processing continued after link re-connect without any extra code or processing.
I have tried 2 approaches to data recovery:- 1) Detecting carrier recovery and calling function usbd_hid_get_report_trigger() once. (also trying various levels of reinitialisation). 2) Calling function usbd_hid_get_report_trigger() every n seconds to see if data recovers.
For a simple test, I used the Keil Demo project from:- C:\Keil\ARM\Boards\Keil\MCBSTM32F200\RL\USB\Device\HID\HID.uvproj
I modified the Demo slightly to send a rolling count and call the function usbd_hid_get_report_trigger() every few seconds. The demo code did not recover from a link disconnect & recovery.
Has anyone had any success getting the MDK430 HID USB RL code to recover from link breaks?
Has anyone seen any further code documentation beyond the reference to the simple demo mentioned above? (This only shows Async setup of IN Reports).