2023-10-21 04:33 AM - last edited on 2024-07-08 06:44 AM by Peter BENSCH
Hi all,
I am using the Nucleo-L496ZG dev board and am using it as a USB Host communication to communicate with other usb devices.
i am able to communicate USB mouse with nucleo board successfully but when i am trying to read data from other device
for 1st time it is working properly and after that it will be stuck at USBH_URB_NOTREADY on USBH_LL_GetURBState function .
it may not worked properly with other devices because that device is not continuously
sending a data just like mouse device , when we send data and it will respond once. so for first time
it gives data properly and then for second time when we trying to send data and on receiving side it gets stuck on USBH_URB_NOTREADY state.
So what to do in this i am getting stuck on this please suggest me something in this so that i can proceed.
2023-10-21 07:22 AM
Why did you generated a duplicate?
The API of the ST's parody of a USB stack cannot be just called from anywhere. It must be called either from an interrupt of the same priority as USB interrupt, or from a critical section, which blocks the USB interrupt.
2023-10-21 07:42 AM
> ST's parody of a USB stack
:face_with_tears_of_joy:
2023-10-22 04:39 AM
hi piranha
i wasn't call api from anywhere I am taking usb host mouse as a base code and made modification on usbh_hid.c and usbh_hid_mouse.c file . for first time it is working properly and then the problems occurs . i have attach few imp files can you please suggest something
note : This USB device has gives the 2048 bytes of data only after 64 bytes of data that send from USB host so for first time when we send 64 bytes of data we receive proper 2048 bytes of data and after that when we send again and try to read it on USBH_HID_POLL state of USBH_HID_Process function it gets stuck on USBH_URB_NOTREADY state .
when i connect mouse it works properly.