lpc1768 board or the MCB1700
does anybody know how to switch bins files using the hardware reset route, so when I press the reset button it will switch bins.
I know for software it could be something like this perharps
<
> int main (void) { for (;;) If extern "C" void lpc1768_reset(); flash.write = binfile1 else flash.write = binfile2 endif } <
>
thanks,
thomas
The chip can remember state after a reset - the RAM isn't automatically cleared.
So you can store a magic signature in RAM somewhere. Or you can connect an EEPROM or F-RAM memory for telling current/next binary to run.
You can obviously not just reprogram the flash with new binaries. But you can store more than one application and have a boot loader decide which application to start.
So you would first have to learn how to implement a boot loader. Come back when you have managed that, and it will be meaningful to discuss the concept of selecting which application to start. A boot loader can even do a full fallback waiting for a new binary on a serial port or downloading an application from a SPI-connected flash memory. Lots can be done. But first you need a working concept with a boot loader and with applications linked for use at an address different from the address range where the boot loader is stored.
Note that you can't catch the reset - it really do force a reset of the processor. So you have to make your decission after the processor have restarted. So whatever you do, you can't have any for loop that alternates between two applications.
Hello,
Do you perhaps know how to change overwrite the date stamp of the bin file, My idea is to have two bin files on the flash memory and to change the date stamp of the first bin file so it is now older than the second and then force a reset on the micro control causing the second bin file to now be loaded into the flash memory because it has the newer time date stamp.
If you can please help me figure out how to overwrite the date stamp this would be really helpful.
How could anyone but you possibly know whether there's any kind of time stamp in your binary files, much less how to change it?
View all questions in Keil forum