cancel
Showing results for 
Search instead for 
Did you mean: 

General information about FDU?

ewilliams
Associate II

Hello, 

Our goal is to implement field firmware updates in our application and would like to gain a general understanding of how it works at ST.

From reading the Application note: STM32 microcontroller system memory boot mode, my understanding is that on the device side, once you plug in your USB connection to the PC, while running your application from flash you could jump to the ROM bootloader by writing to boot pins (in the pattern specified by the micro).

At this point the bootloader is now running, and the bootloader can tell that the USB peripheral needs to be initialized specifically and the bootloader initializes it. Is this done automatically?

On the PC side, (if you have the correct drivers installed, UM0412) the DfuSe GUI will pop-up. This is where you would upload the DFU file (updated firmware) and download it to the device's flash. A system reset on the device side will then start running the newly updated firmware out of flash.

Is this, broadly, what the process looks like (obviously at a super high level)?

Is the USB peripheral the only bootmode that supports DFU? Or in other words, is it not possible to perform a device firmware upgrade over other serial buses (CAN, UART, etc.)?

Thank you for any clarification provided.

Best,

Emma

 

4 REPLIES 4
ewilliams
Associate II

In the title I meant DFU, or device firmware upgrade, apologies for any confusion.

TDK
Guru

Yes, that is broadly how it works.

"DFU" is a specific USB class, so it is specific to the USB bootloader. Although sometimes DFU informally/incorrectly is used to refer to a general bootloader.

You can use other methods to flash the device via the bootloader, such as UART and CAN. These are covered in AN2606.

https://www.st.com/resource/en/application_note/an2606-stm32-microcontroller-system-memory-boot-mode-stmicroelectronics.pdf

Specific documents go into further detail, for examples AN3155 for the UART bootloader.

https://www.st.com/resource/en/application_note/an3155-usart-protocol-used-in-the-stm32-bootloader-stmicroelectronics.pdf

 

If you feel a post has answered your question, please click "Accept as Solution".

App note AN2606 describes the pins and methods each MCU supports via the ROM. So USB DFU in those that support it. The ROM's System Loader doesn't have a broader understanding of your board, or attached devices, so it tends to be rather limiting.

Now, with your own code you can do any manner of things, you can be a USB MSC, CDC, or whatever suits.

You could also use any available serial port, or protocol. Standard protocols like X/Y-MODEM are popular due to the large availability of terminal applications that can support it.

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

Thank you both for the confirmation and helpful information!