cancel
Showing results for 
Search instead for 
Did you mean: 

Programming one MCU from another MCU by UART or I2C

ashah.16
Associate II

Hi,

I have an STM32L552 MCU (the 1st) that has only two interfaces to the user, one through the USB-C and the other through Bluetooth. I have another STM32L031 MCU (the 2nd) inside the design that communicates with this L552 MCU through UART/I2C. Here is my question:

Can I update the firmware of the 2nd MCU through the 1st MCU from any of the two BL/USB sources? If yes, how should that be done?

Little more intro: I have used the UART/USB bootloader in the past to update the firmware of one MCU that is directly connected to the STM32 Programmer. That works very well. But in this new case, the 2nd MCU is not connected directly to this software.

One idea that I was thinking of was using the UART connected to the user, to transmit every single data to another UART connected to the 2nd MCU. But, I have USB CDC involved in this case, so I am unsure if the same method could be used.

Thanks

Amir

1 REPLY 1

You could try doing a simple forwarding method from the CDC.

Or you could layer another protocol to help with the flow,and increase the tools you could use to do the update.

For example something using X/Y-MODEM to the L5, and then the UART boot-loader protocol to the L0, or push a small RAM loader to the L0 to program the FLASH.

If the L5 has enough spare FLASH to stage the update, you could use DFU mode to get that onto the L5, and subsequently push a portion down into the L0. Or an L5 side DFU method where the L0 looks like an external memory.

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