cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware Update via USB-Stick

Eros2023
Associate II

Hello Everyone,

I hope you are well.

I'm working with an STM32F401 microcontroller (Nucleo-F401RE) and my goal would be to update the firmware via a standard USB stick.

Is this possible with the above controller? If so, can you give me  any examples?

 

Thank you very much.

 

10 REPLIES 10
Pavel A.
Evangelist III

Yes this is possible, as STM32F401RE has USB host function with on-chip full speed PHY. But you have to wire up an USB connector and provide power for the USB device (stick). Alternatively you can use the USB device function and update firmware over some USB device protocol such as MSC or CDC ("serial port"). Wiring up a device connector may be easier because you don't need to provide extra power.

(Note, the Nucleo F401RE's web page states that it has USB C device connector - but this is misinformation. Already reported several times).

Many thanks for the quick response. Is there also a way to implement this with st32CubeMX?

Thank you
The program works. However, I am looking for a solution via STM32 Cube MX.

Pavel A.
Evangelist III

@Eros2023 The .ioc file for this board has not been published by ST. You can produce it using CubeMX , define the USB pins and generate initialization code by CubeMX.

 

I don't think that's how coding jobs work, not everything can be conjured together by a boiler plate code generator.

The example is a mix of USB MSC Host and FatFs or whatever Microsoft stuff they prefer now.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Hello Tesla DeLorean,

you're right, but if things have to go faster, you need a tool like this.

Coming back to the topic, can someone provide an example that would at least help me understand how it's done?

Thanks

Pavel A.
Evangelist III

Here is an example for STM32F4. You can import it from CubeIDE: Import... example project

https://github.com/STMicroelectronics/STM32CubeF4/tree/master/Projects/STM32469I-Discovery/Applications/USB_Host/FWupgrade_Standalone

and same example for F429I-discovery board (posted by Jan above).

JJhin.1
Senior

If You'll search USB Boot loader examples youll get so many examples on google...  recently i tried those examples with F746 Controller ... after flashing new firmware boot loader is jumping to that memory loaction and getting stucked after exicuting new code one time.