2015-07-10 02:34 AM
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 #- #stm32f1032015-07-13 02:57 AM
Hello,
You can take this IAP using USART as an example .(http://www.st.com/web/en/catalog/tools/FM147/CL1794/SC961/SS1743/LN1734/PF257844
) Best regards2015-07-17 11:39 PM
Thanks for the pointer.
2017-01-28 09:16 AM
If the modem supports sockets one can do OTA updates of STM32 firmware using HTTP-GET to pull data from a web server.
2017-01-29 11:26 PM
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.
2017-01-31 05:34 PM
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
2017-01-31 11:43 PM
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.