Sign in

username:

password:



Not a member?

Search lpc2000



Search tips

Subscribe to lpc2000



lpc2000 by Keywords

2106 | ADC | ARM7 | Atmel | Bootloader | CAN | CrossStudio | CrossWorks | DDS | ECos | Ethernet | ETM | FIFO | FLASH | FPGA | GCC | GDB | GNU | GNUARM | GPIO | I2C | IAP | IAR | JTAG | Kickstart | LCD | Linux | LPC | LPC-E2294 | LPC2000 | LPC2100 | LPC2104 | Lpc2106 | Lpc210x | LPC2114 | LPC2119 | LPC2124 | LPC2129 | Lpc2138 | LPC213x | LPC21xx | LPC2210 | LPC2212 | LPC2214 | LPC2292 | LPC2294 | LPC2xxx | LPC3128 | MCB2100 | Olimex | Philips | PWM | Rowley | RTC | RTOS | SPI | SSP | UART | UART0 | UART1 | ULINK | USB | Watchdog | Wiggler

Ads

Discussion Groups

Discussion Groups | LPC2000 | Simple IAP bootloader

Discussion group dedicated to the Philips LPC2000 family of ARM MCUs

Simple IAP bootloader - ostehaps01 - Oct 3 8:22:41 2008

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 )


Re: Simple IAP bootloader - jsm09a - Oct 3 9:02:53 2008

--- In l...@yahoogroups.com, "ostehaps01" wrote:

> 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??)

ISP should be there, but you may need to pull a special pin to get
into it.

> Im just a bit unsure how this checksum is written?
> What about the bootsector (ISP) in flash. It that located outside the
> the sectors?

Haven't checked your specific processor, but it is on the others. You
should be able to see a "hole" in the sector/memory map of the larger
devices.

> 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?

We chose the separate bootloader approach (in flash). If your
bootloader code is part of your application and you regularly reload
it, you may run the risk of getting stuck with no bootloader.
------------------------------------



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