cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware upload without ST-Link

LucasRosa
Associate II

Hi Team,

Currently, I have a product developed with an STM32L476RE as its main processor. This equipment is battery-powered and is used by our customers to perform measurements in remote places. After performing the measurements, this equipment is connected to a computer, and our sofware developed in LabVIEW communicates with the STM32 MCU via serial connection to download the measurement data for reporting purposes. When the MCU's firmware requires an update, our customer must send the entire equipment back to us for the update. It would be very convenient if our software could update the firmware itself. For example, if we could simply send the .hex file generated by STMCubeIDE to our customer, and they could upload the new firmware themselves. Is this possible to achieve? Just to be clear, the goal is just update the firmare, not debbug it.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Uwe Bonnes
Principal III

Learn the multiple way to invoke a bootloader and what communication ways bootloaders can use. Check with your hardware, if there is some way to invoke the build-in bootloader. If there is, send instruction to the customer how to invoke and a new a file and instructions uou to download the new file to the device . If you do not find such a way, add a suitable bootloader the next time you have the hardware in hand.  If you can communicate with the device, you can also write a bootloader to reprogramm via the bootloader.

View solution in original post

9 REPLIES 9
Uwe Bonnes
Principal III

Learn the multiple way to invoke a bootloader and what communication ways bootloaders can use. Check with your hardware, if there is some way to invoke the build-in bootloader. If there is, send instruction to the customer how to invoke and a new a file and instructions uou to download the new file to the device . If you do not find such a way, add a suitable bootloader the next time you have the hardware in hand.  If you can communicate with the device, you can also write a bootloader to reprogramm via the bootloader.

Hi, Uwe, thank you for the reply.

 

Is there an application note available for invoking a bootloader for the STM32L4 series? The hardware won't be an issue, even if a new version is required.

AN2606 when your uart pins is right connected as in app note, or USB DFU for changed new hw. You dont explain your PC connect.

LucasRosa
Associate II

I am using an UART to USB converter (FT232). Using USART2, to be specific.

L476 have USB then you can use it for CDC... Or for updates only.

Chris21
Associate III

If you provide a means to set the BOOT0 pin high and reset the L476, the bootloader will run.

Then you could use the STM32CubeProgrammer application to program a new hex file.

You must also use the USART pins specified in AN2606, PA3 / PA2 for USART2.

Andrew Neil
Evangelist III

See Application Note AN4657, STM32 in-application programming (IAP) using the USART,  for IAP without using the BOOTx pin(s):

https://www.st.com/resource/en/application_note/an4657-stm32-inapplication-programming-iap-using-the-usart-stmicroelectronics.pdf 

 

If you implement your own method, you could perhaps initiate from a console and use a terminal app supporting X/Y-MODEM to push in an update.

This would be platform agnostic, and just require the tech to have a serial connection and suitable terminal application.

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

@Tesla DeLorean wrote:

 perhaps initiate from a console and use a terminal app supporting X/Y-MODEM to push in an update.


Indeed - this is what AN4657 does.