Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
7 years, 3 months ago.
USBMIDI library not working with STM32F411
I have been trying to compile the helloworld from this tutorial, but it keeps throwing errors even after updating mbed library.
LINK: https://developer.mbed.org/cookbook/USBMIDI
Do you know if there's a compatible version of USBMIDI for the STM32F411?
Thanks in advance.
1 Answer
7 years, 3 months ago.
Santiago -
You might try the latest release of the USBDevice library from ST. I have been using it with a nucleo f411re board and I know it works well for HID and Serial devices. You can find it at this link:
https://developer.mbed.org/teams/ST/code/USBDEVICE/
The f411re MCU has a nice feature for USB - it has internal termination resistors and pull-up/pull-down resistors for DM and DP, so no additional resistors are required to interface the nucleo board to a USB-B connector.
I use the following wiring for a usb-mini AB connector and it enumerates correctly with USB 3 on both my Mac and Windows 7 (using bootcamp on my Mac):
VCC <=> PA_9 [PA_9 = OTG_FS_VBUS]
DM <=> PA_11
DP <=> PA_12
ID <=> n/c
GND <=> GND
These pins are configured in the ST library files USBHAL_STM32F4.cpp and USBHAL_STM_144_64pins.h. The ST library also configures PA_8 and PA_10 in those files to implement additional USB OTG features that the nucleo board does not support without additional hardware. You may want to comment out the setup for these two additional pins to avoid any conflicts with your other pin usage.