Skip to main content
Associate II
December 4, 2024
Question

FW update throught UART (no BOOT PIN)

Good morning everyone,
I’m starting to study a topic to implement on my custom board: FW update via UART.

The scenario is as follows:

  • My board is, of course, equipped with an SWD connector, which I currently use to program the chip. However, once the board is sold, it will have a USART connector that already allows FW variables to be configured via a USB connection to a PC and a dedicated desktop application. Using the same application (and thus the same USART), I’d like to understand if it’s possible to implement a FW update so that the end user can perform it as well.

I don’t have the BOOT0 pin available, as it is occupied by the SWD.

I’ve read about custom bootloaders and so on; does anyone have suggestions on what path to follow and/or what references to check?

Thank you very much!

This topic has been closed for replies.

2 replies

Andrew Neil
Super User
December 4, 2024
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Tesla DeLorean
Guru
December 4, 2024

You can write your own code to implement whatever functionality you deem necessary.

You'll need to subdivide the available code space, and perhaps write something very tight and compact to update the application portion.

Something with a simple UART protocol and recover methods might run 2-4KB

If the user has access to the SWDIO/SWCLK presumably they can update with ST-LINK type tools. If they are not using that, you could presumable use the pins and a button to pull up/down the BOOT0 state so that methodology is available to you.

 

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