cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f103 IAP App via gprs

gopalan
Associate
Posted on July 10, 2015 at 11:34

I am planning to program stm32f103 micro controller over the air. I have a sim808 module connected for network connections. Any new firmware changes needs to be pushed to the microcontroller via sim808. Can this be achieved by IAP? Need some pointers/code examples for IAP programming. Please provide suggestions for the same.

#iap #- #stm32f103
6 REPLIES 6
chrif
Associate II
gopalan
Associate
Posted on July 18, 2015 at 08:39

Thanks for the pointer.

Posted on January 28, 2017 at 18:16

If the modem supports sockets one can do OTA updates of STM32 firmware using HTTP-GET to pull data from a web server.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Jeroen3
Senior
Posted on January 30, 2017 at 08:26

If you have enough memory to keep the image twice you can do this the easy way. Just download the image to the secondary space, if it's correct, reprogram sector 0 to run the second image.

(don't forget to link RO independent)

If not, you have to include a small failsafe loader to use the gprs module to fetch, checksum and program it.

Note that flash writing halts the bus, you might want to run from sram.

Posted on February 01, 2017 at 01:34

Staging it via internal or external memory works well. ie download to SD Card, detect new firmware at boot and update.

Having a small loader always present can save from bricking a device. A loader with SDIO+FAT can fit in 16KB sector of an STM32F4

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 01, 2017 at 07:43

Yes, the bootloader rules.

Loader in sector 0 has all the capabilties of managing the data link, even when there is no firmware present.

Loader will never rewrite itself.

Loader will remap the vector table and branch to sector 1, your application image.

When loader is finished, the application itself can update the loader. If there is an update.

Bonus feature: the production crew only has to flash in a few kB, the test crew then uses the loader to insert

firmware 

image.