8 years, 11 months ago.

USBDevice library for NUCLEO-F411RE

Hello, I am a newbie with ARM and mebd. I noticed that the offcial USB libraries are only supported on a few LPC devices. However, I found a USB device library from Carl by searching the libraries available in mbed. Can someone check whether it is compatible with NUCLEO-F411RE. And when I try to import a library from the available ones, is it only the compatible ones that show up or the entire thing?

Question relating to:

Affordable and flexible platform to ease prototyping using a STM32F411RET6 microcontroller.

The library is again for LPC series only. Tried compiling the code written using the library. Results in unsuccessful compile. The error points to invalid target which means an unsupported device.

posted by Sreedev K 08 May 2015

2 Answers

8 years, 11 months ago.

Hi Sreedev,
Basically USB interface is capable on F411 mbed board but you need additional effort to realize it.
One is hardware connection.
You need to connect a usb connector.
Another one is clock modification.
F411RE clock is 100MHz at this moment (mbed current setting) and USB Clock is out of range.
https://developer.mbed.org/users/kenjiArai/code/Nucleo_F411RE_SysClk/
USB Clock = 44.4MHz not 48MHz!

Conclusion
All of information is here (only available Japanese).
https://developer.mbed.org/users/va009039/code/F401RE-USBHost/
Okamoto-san has done great job for USB implementation!!
I also use this lib. and very stable Camera and MSD functions.
Hardware connection -> Nucleo F401RE/F411REのUSB接続方法
F411 Clock ->Nucleo F411REで使う場合はmbedライブラリを差替えて下さい
I belive you can import not only F411 demo sample but also F401 for F411 mbed borad.

Accepted Answer

Thank you so much Arai.... :)

posted by Sreedev K 13 May 2015

The mbed lib officially supports USB 48MHz clock with any additional modification right now.
Please refer follows.
https://developer.mbed.org/users/kenjiArai/code/Nucleo_F411RE_SysClk/

posted by Kenji Arai 13 May 2015

I am a newbie with ARM dev. I have been working on 8 bit devices previously. How to adjust the clock to make it 48Mhz. As per your post it seems that it is not possible to get accurate 48Mhz clock for USB.

posted by Sreedev K 15 May 2015

It's ready to use USB without any modification!! F411RE mbed current Sys clock is 96MHz and USB clock is 48MHz.

posted by Kenji Arai 16 May 2015

That's great news. I assume that the mbed library is taking care of setting the sys clock to 96Mhz. I also noted that a provision to add an external crystal is provided on the nucleo board. I assume that the board can run on its maximum 100Mhz freq without any external oscillator. So what is that provision for? Clocking down to a frequency that cannot be achieved by the internal PLL??

posted by Sreedev K 17 May 2015

The library you mentioned is all about the microcontroller acting as a USB host. Any libraries on emulating HID devices like keyboard,mouse, USB headphones etc. I'm particularly interested in USB audio devices.

Thanks

posted by Sreedev K 17 May 2015
8 years, 11 months ago.

Nucleo F411RE has USB. But the USB pins are not assigned as mbed. (Do not confuse USB connector for mbed interface) https://developer.mbed.org/platforms/ST-Nucleo-F411RE/ This means no USB support for now.