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 update over the air

Status
Not open for further replies.

akshaybhavsar

Full Member level 2
Joined
May 5, 2016
Messages
135
Helped
2
Reputation
4
Reaction score
2
Trophy points
18
Activity points
898
I want to update firmware for PIC32MX230F064D over the air through SIM808 module.How to get it done?How can i start with this?
 

It's usually required to have a memory device (e.g. serial flash) that can store the firmware image.
 

How can i receive it?By HTTP,TCP?

- - - Updated - - -

Will it be hex file?
 

Updating fw from HEX is a most suitable way, but hex file have to be store somewhere first temporary. Most common way - store it to SD card first.
But you can use part of available flash also.
 

How can i receive it?By HTTP,TCP?
- - - Updated - - -
Will it be hex file?
It will be anything you consider appropriate. Hex has the advantage of using the compiler output with no additional processing. But you may want to pack additional info into the image file.

Most compilers, e.g. XC16 don't generate on it's own a CRC to verify the image consistency. You need to supplement CRC check.
 

Once i receive firmware from SIM808 UART,after that it needs to be stored into flash?

- - - Updated - - -

do I need to develop bootloader?
 

Most important reason why I'm using HEX format is that is has:
1. Already compilied as mentioned FvM
2. Has all memory offsets devided by regions
3. Every string has CRC
4. Simple format to parse values
Negative facts:
1. Unefficient using of memory - file size is a really big compare to original binary image.
 

Once i store hex file into external flash memory.How to get it into program memory?What care needs to be taken?
 

Once i receive firmware from SIM808 UART,after that it needs to be stored into flash?
- - - Updated - - -
do I need to develop bootloader?
Reception of the firmware update will be usually performed by the application code, because it needs network stack etc. Rewriting the processor application flash need a boot loader in case of doubt.

Regarding per line hex checksum, it can't guarantee the image consistency, e.g. detect missing lines. That's why an overall CRC is wanted. Protection against counterfeit software is another point.

- - - Updated - - -

Once i store hex file into external flash memory. How to get it into program memory? What care needs to be taken?
The question is common to boot loader operation, not specific to over-the-air update, I think. I suggest to review the existing PIC24/dsPIC boot loader examples and application notes.
 

So i only need PIC32mx controller,sim900,external flash and bootloader.Nothing else.
 

External flash is also an option. For example, currently I'm working with STM32F030CC which has 256kB flash memory. I defenetly will not use so much. So, 2kB I dedicated to use as EEPROM to store DB, and 30-40kB can be used to store image of updated firmare, and 2-4kB for bootloader in begining of space to take control right after reset.
 

How to get PIC32 into firmware upgrade mode?

- - - Updated - - -

Once i receive firmware.Where to store it?which part of memory region?
 

Seems to be we already answered on this questions.
You choose the region. You dedicate it in sw. You store it.
With decoding hex format I can help you, but don't expect that I will do your job.
 

Please tell me how to get it into Firmware upgrade mode?

- - - Updated - - -

I read application note bt nowhere is mentioned procedure to get it into firmware upgrade mode
 

I have no idea what a you speaking about. You just need get memory offset, byte array and size of that array to flash it to memory. With that I can help you because did the same some time ago.
 

When we power up controller it goes into either firmware upgrade mode or use application mode?how to switch in between them?
 

Boot sequence doesn't really matter. You can enter boot mode during power up or later by switching memory content - just send core to another application pointer.
Bootloader and main sw is a different projects located separatly from each other in memory space.
 

As of now,I could write bootloader firmware and i tested it through pic32 bootloader PC application.But PC application sends commands to PIC32 for connecting ,erasing,programming.I couldnt get those commands
 

Who told you that you can use original PC application. You should write your own. Basically, I will do the same this week for one my project. Since BLE module allows to send only 20 bytes in a row, and HEX file consist of a strings 16 bytes lenght, it will be 2 bytes for offset and 2 bytes for command and CRC. And it will fit!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top