Arm Mbed OS support forum

Mbed NUCLEO_H7743ZI2 doesn't support USBDEVICE

The latest mbed for NUCLEO_H743ZI2 doesn’t have USBDEVICE in ‘device_has_add’ in targets.json. As a result, when I call USBSerial I get an error.

Any plan to support USBDEVICE?

Regards, Mike

2 Likes

Hi
Yes, it’s planned,
but any help is welcomed :slight_smile:

1 Like

Hello,
I tried to port ST Library forked Kenji Arai by to get USBHostMSD on USB FS working.
I fixed the few Mbed 6 evolutions and it compiles but USB interrupt is never fired. If i could have help to fix that, I could publish it.

1 Like

If you could… :innocent: :stuck_out_tongue:

Hi Jerome,
Could you elaborate on the current state of this feature? What kind of help are you looking for?

Hello,
As explained I tried to port the lib and after some tries, it looks like if USB interrupt is never called. I cant setup a kind of test application and if someone could help me to investigate, it would be nice.


Hello,
I got interrupt working but I have this result and I need some help please. Please zoom the picture to read it.
Info USBHOST_OTHER is defined.

is there any progress on this problem? I tried also to use USBDevice on a H743 Board but with the same result, the USB enumeration fails because the descriptor is not read properly.
The USB Int is fired a few times, but only the SOF callback is called. When I step through the isr, a read is also performed. It looks like some weird timing problem?
I have compared also the settings with CubeMX generated code, the init looks the same (using USE_USB_OTG_FS).
USBPhy_STM32.cpp handles USB on F4 and others correct.
On my board, only USB DP and DM are wired, it tried also to exclude ID and VUSB from the USB PeripherialPins, also no changes.
Tried also to use PLL3 instead of HSI48, no change.

Any ideas what else could be checked?

Edit:
It’s driving me nuts, I will open an issue, but I don’t know for what. On the H743, it is not possible to debug or emit tr_info() messages. For checking the USB problem, I have added info traces to the isr and callbacks, the are not shown in the terminal. The same program compiled for a F4 works fine and traces also the USB calls. Together with the debug problems that the callbacks are not called, only when a breakpoint in the isr is hit first, I think something very basic with ints is going wrong with the H7.

Link to issue:

Thanks JojoS. Adding this to USBPhy_STM32.cpp (line 239) got my USBDEVICE working:

__HAL_RCC_USB_OTG_FS_CLK_ENABLE();
__HAL_RCC_USB2_OTG_FS_CLK_SLEEP_ENABLE();
__HAL_RCC_USB2_OTG_FS_ULPI_CLK_SLEEP_DISABLE();

thanks for your confirmation. My PR is still pending and needs a review, but hopefully its gets merged soon.