Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Can i update the code on LPC2148 remotely via GPRS?

Status
Not open for further replies.

dare_1985

Newbie level 3
Joined
Jul 17, 2008
Messages
3
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,335
Hello,
I have an LPC2148 microcontroller pre-programmed with a code of mine (nevermind what the code does). The LPC2148 is connected to a GPRS modem via its UART, and can communicate via GPRS (listening on a socket connection).

Here is the problem/challenge:
I want to send a completely new code to my LPC2148 remotely via GPRS, and after the LPC2148 receives it and stores it somewhere in flash, the new code should replace the old one completely. A reset should be performed to startup the new code. The idea is that the new code must substitute the old one smoothly without any errors.
I have never tried this, basically i dont have so much experience to pull it off. Can someone help me with an advice how to do it and whether it is possible at all? What are the steps required for this to work? Thanks!
 

I would possibly split the memory into two sections, one for your current code and the new code. You would have to create a bootloader to write to these locations. You would have to allocate a dedicated byte address for the bootloader to determine which location to write the new code. On a GPRS command when downloading new code, the micro should perform a software reset and boot into the bootloader. Once it is in the bootloader, you can start sending your firmware. A timeout can be use to start the main program. You may want to add some error checking to ensure the data from the GPRS is error-free. Hope you get the gist of things.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top