cancel
Showing results for 
Search instead for 
Did you mean: 

Erase FW + Download FW from SD-Card

mailmail9116
Associate II
Posted on August 03, 2013 at 13:42

Hello ,

I have a more theoretical question ( for now ) , suppose  i want to update the firmware on the STM32 , lets say i put the new FW file on the SD-card , the current FW should detect it and do the update .

How can i do this ? should i define a protected section on the flash (where the code is located) and defined it as a ''boot-loader'' section where i will have the limited abilities to read from SD-card  and write the new FW to the firmware sector on the ''flash'' ?

If this is true , i should modify my start-up script to jump first to the boot loader function main , and not to the firmware main , and if there is no update available i should jump to the firmware main, correct?
4 REPLIES 4
Posted on August 03, 2013 at 17:29

You should perhaps review a couple of the IAP examples.

You'll need to break it into two unique firmwares, one the boot loader which will run from the default 0x08000000 address and be 16 or 32 KB in size, and a second which is you application which will reside at say 0x08004000 or 0x08008000. This secondary image will be entered via the boot loader, and you'll want to compile your app for this address, and set the vector table to it once it starts.

Your boot loader will need to have drivers for SDIO, and FatFs or something equivalent to read the files off the card. When required, you'd erase the current app image, and then write the new one from the file on the card.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
mailmail9116
Associate II
Posted on August 03, 2013 at 18:15

Yes , that what i was thinking .

One more thing, IAP examples ? what is IAP stands for ?

Thanks !

Nickname12657_O
Associate III
Posted on August 03, 2013 at 22:13

IAP,  stands for : In Application Programming.

See attached application Note close to what you expect to do, but instead of SD card using a USB key, Firmware is available on web.

http://www.st.com/web/en/resource/technical/document/application_note/DM00039672.pdfhttp://

Cheers,

STOne-32

Posted on August 04, 2013 at 00:03

IAP Examples, Ethernet, USART, CAN, etc

Search a part, go to Design Resources

http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1577/LN11/PF252140

IAP - In Application Programming, typically provided by code you add to update application.

ISP - In System Programming, typically provide by a ROM based software.

ICP - In Circuit Programming, typically provided by JTAG.

OTA - Over The Air, typically over a wireless network connection.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..