cancel
Showing results for 
Search instead for 
Did you mean: 

How to upgrade the firmware via GPRS

sbaris
Associate
Posted on September 19, 2012 at 14:33

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.
4 REPLIES 4
emalund
Associate III
Posted on September 19, 2012 at 15:03

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
Posted on September 19, 2012 at 15:51

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Andrew Neil
Evangelist
Posted on September 19, 2012 at 21:28

''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...
Posted on September 19, 2012 at 21:54

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..