F411 Fails: "Get data for USB HID Keyboard's LED via Class Request 0x09 (Set Report)? #95"
I'm porting a previously successful F103 project to the F411 and quite a bit of it is working so far, but I am stuck on what appears to be a bug in getting data from the host over EP0, via the data stage. This is the same USB transaction as described in #95 (not actually a bug in that case, just me):
https://github.com/dmitrystu/libusb_stm32/issues/95
Here is the transaction on the bus analyzer:
The one byte from the host to the device in the data stage represents the current USB HID Keyboard LEDs. Everything looks fine, except the actual byte being returned is incorrect. I think the issue maybe in the reading of EP0 via
static int32_t ep_read(uint8_t ep, void* buf, uint16_t blen)
in usbd_stm32f429_otgfs.c. I don't know if there is a pointer issue or data not ready issue or what, but I can see the data assigned ep_read() is wrong and this then means the byte at ((uint8_t *)dev->status.data_ptr)[0] is wrong too.
The libusb_stm32 for F103 is fine in this regard. The F4 OTG library is way different. Anyone successfully using this for an F411 based HID KB and can shed some light?