2017-06-26 08:25 AM
Hi everyone,
I am trying to understand how the firmware upgrading works in the STM32F7 using a STM32F769I Discovery board. I would need to use the UART or SPI peripheral to upgrade.
Does anyone know where to find example code?
Thanks in advanced,
Omar
#firmware-update #stm32f7 #bootloader2017-06-26 08:30 AM
There are application notes on the USART and SPI boot loader protocol.
The 'Flash Loader Demonstrator' provides an example of the USART solution, and a number of open source implementations also exist. The protocol is documented, and not that complicated.
https://community.st.com/community/stm32-community/blog/2017/05/02/stm32-spi-bootloader-host
2017-06-26 10:31 AM
Can we fix it so cites pointing to ST.COM don't require moderation?
2017-06-29 09:10 AM
Hi,
You may use the attacheda new version of FlashLoader demonstrator adding support of STM32F7 devices (STM32F76x/x7/x8/x9)
Regards
Imen
________________ Attachments : STMFlashLoader Demo_V2.9.0RC4.zip : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HyZz&d=%2Fa%2F0X0000000b9m%2FTWbPqE6ai0bLmcSdgoFnx9eDH0dH68OlUWxAZmxJ_lE&asPdf=false2017-06-29 10:32 AM
Hi Clive,
thanks for the replies!
I am reading the AN2606t but I am still not sure what FSM need to implement. My MCU is a STM32F769 so in pages 184 and 185 are two flowcharts: one for Dual Bank Boot implementation and the other one explaning the Bootlioader V9.x selection.
Should then I implement both state machines in order to have access to the bootloader execution ? I guess is also necessary to configure the FLASH registers of the MCU, isn't?
thanks again,
Omar
2017-06-29 10:54 AM
I believe that the system loader should manage the FLASH registers. You get to erase blocks, and read/write data into the array.
It's not my battle, so I haven't spent hours digging into it, but the point at which built in ROM boot loaders cease to be helpful you typically push your own loader code into RAM which can have a better protocol and a richer implementation, that fully supports the specific facets of the board as implemented. This kind of staged or tiered loader model is very prevalent in SoC designs.
For these devices I'd recommend having your own boot loader which resides in the first 16KB block (can be bigger if need be), and have your application code separate, where the boot loader can validate the image before jumping into it. For the Dual bank model where you basically replicate the first MB into the second MB, the loader can still manage the image used, set the BPB bit, and fork to the appropriate one (figure a sequence number can determine the newest one).
I would recommend you start by getting comfortable with the system boot loader, you can do this in an interactive manner, and once you are comfortable with how it works, and how that fits with what you want to achieve, then decide how you want to partition the programming application vs the image you want to deliver to the part. Programming applications used for production programming tend to differ from those for field/user programming.
2017-06-30 03:42 AM
Hi Imen,
I have been taking a look to this ST technical video about how to boot in system memory without using the BOOT pins. In the example it uses some code and the Flash Loader to do that. Is there any AN or any example code about the steps commented in this video in how to boot without those pins?
Thanks,
Omar
2017-06-30 03:43 AM
Sorry, I forgot the link to the video :