2012-09-19 05:33 AM
I have designed a GPRS Modem. STM32F103R8 has been used in it. After realizing tis project, upgrading firmware from a web server was requested.
In my circuit there is a Flash Memory (M25P16). This memory communicates with STM32F103R8 via SPI. How can I upgrade the Flash of STM32F103R8? Please help about this subject.2012-09-19 06:03 AM
I have designed a GPRS Modem. STM32F103R8 has been used in it. After realizing tis project, upgrading firmware from a web server was requested.
In my circuit there is a Flash Memory (M25P16). This memory communicates with STM32F103R8 via SPI.
How can I upgrade the Flash of STM32F103R8?
Please help about this subject.
write a bootloader
2012-09-19 06:51 AM
As Erik suggests write a small boot loader capable of erasing, and rewriting an application image to internal flash from the external flash. Such a load might take 4 - 8K, depending on features and functions.
You'd need to break your internal flash into two sections, one at the front where the boot loader resides, and a larger section for the rest to contain an application. You will need to recompile/link your application to exist in the higher address. You should review the app notes on IAP (In Application Programming), and research the topic of boot loaders in general.2012-09-19 12:28 PM
''You should ... research the topic of boot loaders in general''
In particular, you need to give very serious consideration to what happens when (not if) a download fails. Google ''over-the-air update'' aka ''OTA''... GSM & GPRS links are highly liable to drop connections - so your system must be designed to cope 100% reliably with that...
2012-09-19 12:54 PM
Well that is indeed true, but he's already miles ahead by actually being able to stage the image in a large serial flash before starting the process.