2017-03-21 02:35 AM
Hi everyone ,
For a project I need to make the FOTA work on an STM32L073RZ. I downloaded the package ' FP-SNS-MOTENV1' from ST and tested it on an L476RG with a IDB05A1 together with a IKS01A1, it worked perfectly, I was able to flash some code from the android app via Bluetooth.
In the specs it is specified that this FOTA works on L4s and DOESN'T work on L053R8, but nothing is said about L073RZ.Does anyone already used FOTA on a L073RZ? Do you think it is possible to do so?have a good day ,
Kind regardsRapha�l
#bluetooth #fota #ota #stm32l0 #stm32l42017-03-22 10:59 AM
Dear Raphael,
the example that you tried works out of the box with L476RG and F401RE.
You can take a look at the slide called 'Flash Management and Boot Process' in the
version 2.3 (slide #17) for the FP-SNS-MOTENV1 software package.Basically, to be able to use the same mechanism, you need a chip with at least enough flash memory to store the bootloader, current firmware and the new binary image that you want to use.
With the current binary file of FP-SNS-MOTENV1, the size is too big to fit in the flash memory of the L073RZ chip. If you optimize things a little bit to shrink the file size, you can probably do it.
Hope that helps,
Antonio
2017-03-23 05:18 AM
Ciao Raphel, take in mind one important things...
The bootloader must reflect the FLASH organization of your STM32...So for example the STM32L476 has 512 pages of 2Kbytes each one.
So you have a granularity of 2Kbytes for erasing the Flash (you need to erase it before to use it)For F401RE, on other hand, it has a complete different Flash organization:
So you could erase only sectors with these specific dimension..
So for example the Sector 5 is 128Kbytes and you MUST erase the wall sector for writting it..
and for this reason on
FP-SNS-MOTENV1 package we use:
Sector 0 for storing the bootloader
From sector 1 to 4 for the running program (240Kbytes max code size)
The last 2 sectors (256Kbytes) for storing the Update
So it's not simply a shrink of your application... you need to match your flash organization.
Ciao
Luca