cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware update for multiple stm32F030R8Tx connected serially to each other

rtursen
Associate II
Posted on April 28, 2016 at 11:14

Hello,

I have a system where a linux gateway is connected to multiple stm32F030R8Tx via Uart

Linux Gateway <--->  STM32F030 <------> STM32F030 .....

Is it possible to upgrade the firmware of stm32F030R8Tx  on the field?

Can you please guide me to a relevant documentation?

thanks a lot for your help

rifo

#firmware-update
5 REPLIES 5
Posted on April 28, 2016 at 13:51

It should certainly be possible, if they share a common firmware image that would make thing simpler.

I don't think the System Loader will be of much help, you'd probably want to look at the IAP (In App Programming) examples and documentation, and generally get familiar with writing boot loaders, and suitable data transfer protocols.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
rtursen
Associate II
Posted on April 28, 2016 at 15:54

Hello Clive,

Thanks a lot for your answer. Now that I know it's possible

I'll dig into the documentation for more info.

One more thing I would like to ask is

Do you think that adding an external spi flash would

make life easier for me? or can I just go with the

internal flash?

Also, about the bootloader, what kind of development should

I be making Clive? I have thought about storing the firmware

in an internal (or external) flash and then sending a command

to boot from a particular address, aren't there any

bootloaders capable of doing this?

thanks

rifo

Posted on April 28, 2016 at 20:46

Staging the firmware can help in situations where you can't control the flow and writing of Flash. Generally I prefer not to have to erase my loaders, and I separate the app from the loader, so the update procedure is robust, and I don't brick my devices. I generally stage to SD cards, or unused sections of Flash, where that is required. SPI, NOR or NAND devices would also work. I also X-Modem and write-in-place where that is viable, I don't think one method is significantly more complicated than the other.

If one part in the chain has updated firmware it can just copy itself to the next, your diagram isn't particularly clear but I'm presuming a daisy-chaining of one serial to the next.

The STM32 IAP examples are just one, other than the express flash erase/writing the concepts involved here are applicable to many architectures, and no doubt other examples exist. Boot loaders tend to be designed to perform specific jobs for specific application, developers create what they needs, and the bulk are likely to be closed source and beyond the handful of engineers that wrote them perhaps not seen by anyone else.

Yes you can move code around, jump to other areas of RAM, ROM or FLASH, the processor is quite flexible in that regard.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
rtursen
Associate II
Posted on July 15, 2016 at 17:13

Hello Clive,

I have just found the chance to start working on this topic. I was going through the documentation, namely AN4657, ''in application programming using usart''. I will follow the strategy that you've suggested and will have a 2 stage application.

 I have set my plan like below

1) Modify the parts of the code, writing to flash so that they are compatible with the new HAL layer 

2) Write an initial stage program where a certain address is read and depending on the value, new or existing code is executed.

I'll report about the outcome and share the code if I have it working fine.

rtursen
Associate II
Posted on July 21, 2016 at 12:37

Hello,

We have successfully tried AN4657, STM32 ''in-application programming (IAP) using the USART'' for STM32F103.

Now we would like to modify it for our processor, stm32F030R8Tx and use HAL drivers. We have found ''

http://www.st.com/content/ccc/resource/technical/document/data_brief/20/92/81/2e/aa/ae/45/e1/DM00182790.pdf/files/DM00182790.pdf/jcr:content/translations/en.DM00182790.pdf

''  but there are 2 things we don't understand

For remapping the vector tables, we can't find the HAL driver counterparts of the below function and definition. Can you please guide us for finding it.

NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x3000);

#define VECT_TAB_OFFSET 0x0

thanks

rifo

ps: one more thing is, when we compile the project for Xcube IAP, we got a compile error. We didn't do any changes, can you also please guide us for what we did wrong?

0690X00000603A8QAI.jpg