2018-02-24 04:03 AM
Hello,
Is there any template or example program for implementing OTA? I have 2MB SPI EEPROM, SIM808 for GPRS communication and STM32F070 on board.
I am using CoIDE and have little understanding about how to do it, such as
Receive binary file to the board form GPRS module
Save it in external flash memory then use IAP to flash the new firmware
Then finally use DFU mode for changing the start address of the MCU
But except receiving the binary file and storing it in EEPROM, I have no idea about how to proceed further. Please provide assistance.
Regards,
#clive #clive1 #clive-one #andrew-neilSolved! Go to Solution.
2018-02-24 04:17 AM
Essentially the same question:
2018-02-24 04:17 AM
Essentially the same question:
2018-02-24 06:59 AM
Not sure there are end-to-end examples, this is typically specialize work product.
You'd want to break this into steps
Get an understanding of reading/writing/erasing your flash device.
Learn the AT and socket commands to implement an HTTP GET or FTP type interaction with the modem, cellular network and server resources.
Review the existing IAP (USART, CAN, ETHERNET) examples ST provides for assorted families and parts. These as Andrew points out in the other thread can be found under the resources for a given part or family, but now also exist in the Applications examples in the Cube/HAL software trees.
\STM32Cube_FW_F0_V1.9.0\Projects\STM32091C_EVAL\Applications\IAP\IAP_Main
(part of the CubeF0 ZIP file)
2018-02-24 08:30 AM
Sir it looks similar to what I have already tested with arduino.cc. I have updated my flash with new programs using IAP-USART. Now I want to update my flash remotely, so I can have new firmware either in EEPROM or directly from Rx-Tx connected to SIM808. My question is how can I update my flash from either source? The above example(
\STM32Cube_FW_F0_V1.9.0\Projects\STM32091C_EVAL\Applications\IAP\IAP_Main
) works with physical serial port of PC.Flow of my task would be as follows,
(I have done it)
Please guide me how to proceed further right from the point 3?
2018-02-24 08:41 AM
ahmed.waqar wrote:
Pleaseguide me how to proceed further right from the point 3?
That is covered in the other thread, and in the example that
Turvey.Clive.002
just pointed you to.2018-02-24 08:45 AM
Per the IAP examples there are basically two firmwares, one is the boot loader, and the other is the application. These are built to exist in two different memory spaces within the Internal Flash. ie 0x08000000 and 0x08008000 The size of the boot loader is dictated by the complexity required to support the devices being used and the amount of user interface you wish to provide. You should try to be as minimalistic as possible, ie just do enough to validate and manage the update and control transfer to the application.
The more complex task of downloading the new application image into the SPI Flash can be done by the application portion, where you have code/libraries to manage the modem, sockets, downloads, etc.
You need to review the IAP boot loader, and add in code to read your SPI Flash in place of the YMODEM stuff. So basically erase the Application space within the Internal Flash and then read blocks from SPI Flash and write them to the Internal Flash.
2018-02-24 09:00 AM
Thank you Sir for your prompt support. I will study
IAP boot loader in detail and try to follow your suggestions. Will get back to this post after some progress.
2018-02-24 09:01 AM
I'll check them in detail. thanks
2018-04-20 02:29 AM
Hello Sir
Turvey.Clive.002
,Neil.Andrew
I followed your instruction and managed a successful IAP test with STM32F429 using support given in
.\STM32Cube_FW_F4_V1.0\Projects\STM324x9I_EVAL\Applications\IAP
However, I get error (attached as images) while doing same test with STM32F103C8 using support given in
.\STM32Cube_FW_F1_V1.6.0\Projects\STM3210E_EVAL\Applications\IAP
Sir I have STM32F103 on board therefore I need it.
2018-04-20 03:44 AM
I followed your instruction and managed a successful IAP test with STM32F429 using support given in
.\STM32Cube_FW_F4_V1.21.0\Projects\STM324x9I_EVAL\Applications\IAP
However, I get error (attached as images) while doing same test with STM32F103C8 using support given in
.\STM32Cube_FW_F1_V1.6.0\Projects\STM3210E_EVAL\Applications\IAP
Sir I have STM32F103 on board therefore I need it.