I've added a Bluetooth Low Energy module to a board based on a PIC that has 128K flash program memory.
I want to update the firmware from a mobile phone using Bluetooth Low Energy. The hex file is 250KBytes and the update process last for more than 20 minutes!!!
Is there any way to divide my code in some smaller independent modules in order to update only a small part of code?
Thanks!
Ttelmah
Joined: 11 Mar 2010 Posts: 19504
Posted: Thu Jun 21, 2018 12:10 pm
First thing to do, is ensure you actually send the data in multiples of the erase block size of the chip. Whatever you do don't just send single Intel hex lines. Many larger chips like this will have erase block sizes like 512words. It is the erase that takes the most time, and if you erase a block and write this it'll be far quicker than if you are sending smaller blocks.
Your programming code at the source end can simply do a compare and only send blocks that have changed.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum