cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to make a FOTA on an STM32L073RZ ?

raphael declercq
Associate II
Posted on March 21, 2017 at 10:35

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 regards

Rapha�l

#bluetooth #fota #ota #stm32l0 #stm32l4
2 REPLIES 2
Antonio Vilei
Senior III
Posted on March 22, 2017 at 18:59

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

http://www.st.com/content/ccc/resource/sales_and_marketing/presentation/product_presentation/group0/0f/3f/59/05/d8/9e/4a/03/FP-SNS-MOTENV1%20quick%20start%20guide/files/FP-SNS-MOTENV1_quick_start_guide.pdf/jcr:content/translations/en.FP-SNS-MOTENV1_quick_start_guide.pdf

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

Luca Pezzoni
ST Employee
Posted on March 23, 2017 at 13:18

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:

  • Sector 0 0x0800 0000 - 0x0800 3FFF 16 Kbytes

    Sector 1 0x0800 4000 - 0x0800 7FFF 16 Kbytes

    Sector 2 0x0800 8000 - 0x0800 BFFF 16 Kbytes

    Sector 3 0x0800 C000 - 0x0800 FFFF 16 Kbytes

    Sector 4 0x0801 0000 - 0x0801 FFFF 64 Kbytes

    Sector 5 0x0802 0000 - 0x0803 FFFF 128 Kbytes

    Sector 6 0x0804 0000 - 0x0805 FFFF 128 Kbytes

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