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.

Firmware updating from remote location

Status
Not open for further replies.
Re: firmware updating from remote location

Yes, emailing the file and something else.
 

Re: firmware updating from remote location

Hi,

It depends on what interfaces you have.
Theoretically everything is possible. You decide how it works.

For our devices we built a "secure update" bootloader (but it needs external FLASH memory).
The idea: either the old application is running or the new application is running.
It avoids to hang in an intermediate state where the old application is not valid anymore and the new one is not valid yet.
It is so proove that a break in data transmission may happen at any time and a power loss may happen any time during the complete update process.

I´ve never seen our bootloader to fail.

Klaus
 

Re: firmware updating from remote location

Bootloader should be simple to reduce memory usage. In one application I did it like that - main application download fw file in hex format to SD card, which i'm using for logging and then restart MCU. It goes to boot section, search for the file, update fw, then delete file and reboot again to main application.
 

Re: firmware updating from remote location

If I want to update a MCU PIC18F452 from remote place what can I do? What should I use for it?
 

Re: firmware updating from remote location

Hi,

The first rule is: give enough/useful informations.
Then ask elaborated questions - not that general like "what can I do"

In post#3 I already wrote: it depends on the interfaces.
As long as you don't tell us ... we don't know.

There is a place "X". From here you want to initiate the update.
There is a place "Y". There is your PIC.

Tell us all about the complete data transmission from X to Y.

Klaus
 

Re: firmware updating from remote location

I don't know what to do. Suppose I've a device designed with PIC18F452 and it is working in the other country. Now I want to update the fw from my country without help of any human.

In that case how the complete project should be designed so that I can update the fw from my place? Anything can be used or any suitable way should be chosen.

Example of my imagination:

The working device will include a programmer which can program the controller PIC MCU, PIC18F452.
There will be a GPRS/wifi module that can connect the device with internet.

I can send or upload a .hex file from my PC to a website or email to an address.

But I don't know the rest. How to download the .hex file from internet and burn it to the MCU.

I don't know any details than these. And want to learn how to do this type of work.
 

Re: firmware updating from remote location

Let's say this mcu is to simple for such application. First you need to get the fw somehow. Then you should verify it at least by checking CRC. Then you should flash it and check that mcu is loading properly. If not, it should be able to roll back to original fw in case of any error. All this stuff requires a lot of mcu resources.
 
Re: firmware updating from remote location

Hi,

I've a device designed with PIC18F452 and it is working in the other country

how the complete project should be designed

I really have problems to find out what your situation is.
Is the circuit already working? Or are you still in the design state?

At least we now know that you have connection to the internet....

But I don't know the rest. How to download the .hex file from internet and burn it to the MCU.
If you´re still in the design state then go to the manufacturer´s internet site and do a search for
"bootloader" and
"self programming"

I´t still is unclear if you are asking about: hardware, software, bootloader, interface, protocols, PC-Hardware, PC_software...

Klaus
 

Re: firmware updating from remote location

Basically the steps are:

1. Make sure you have software SECURELY saved in the PIC or somewhere that can access it for programming. There is no point in wiping the code used to update it as part of the programming process!

2. transfer the file to an external memory device, use email, FTP or whatever you want.

3. run the bootloader program to transfer the code from the external memory to the PIC internal memory.

4. restart it so the new code runs.

Note that the bootloader code MUST be protected (hint: CONFIG5L register) so the updating process can't overwrite the code it is using itself.

Brian.
 

I don't know any details than these. And want to learn how to do this type of work.

As mentioned earlier, crucial information are missing for a more accurate response, but as said you need your microcontroller to have a bootloader program and a connection (most common, serial), preferably to a system close to the microcontroller. There may be other ways, but the one I worked on was done by a local PC that, whenever the microcontroller restarted, it entered in a 'listening mode' during few seconds where, upon detecting a request command continuously sent at regular shrt intervals from the PC, the uC automatically switched to a bootloader mode and received the binaries from the computer. The computer then erased this hex file after receiving the successful load confirmation from bootloader, which meant that at further uC reset, in case which there were no files to be downloaded, after elapsed the 'listening mode' timeout, uC would not proceed with bootload and would start in normal mode.
 

Recently i worked on bootloader development.I used SIM808 module and FTP protocol to access hex file to be uploaded from remote server.

- - - Updated - - -

which controller you are using?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top