Hi
Im about to implement a bootloader for my LPS2103 device. The
firmware is send with RS232 communication.
I have thought of this implementation.
1. On request (via the RS232) the application calls a IAP bootloader
function wich is located in RAM
2. This function disable all interrupt
3. Then the function waits for data on UART0
4. When 4 kB is received (I have 4 kB sectors), the received data is
checked with a CRC.
5. Then the sector is erased and the 4 kB data is programmed
(Verified etc)
6. When all needed sectors has been programmed, the device is
restarted.
I think I have to start with sector 1 first, then sector 2 etc. Then
conclude with Sector 0 to ensure that checksum is written last. (In
case of power fail, I will have the ISP to start??)
Im just a bit unsure how this checksum is written?
What about the bootsector (ISP) in flash. It that located outside the
the sectors?
Schould I make a small standalone serial bootloader program, located
in sector 0 instead and then the application in sector 1 to 7 ?? Or
is the idea of running a part of my main application from RAM to
program the flash ok?
/Thomas
------------------------------------

(You need to be a member of lpc2000 -- send a blank email to lpc2000-subscribe@yahoogroups.com )