Hi all,
Does the Olimex LPC2138 come loaded with a bootloader? If so, how do I activate it?
I’ve got a JTAG programmer/debugger on order, but it would be nice to load some code before it arrives…
Thanks,
Jim Norton
Hi all,
Does the Olimex LPC2138 come loaded with a bootloader? If so, how do I activate it?
I’ve got a JTAG programmer/debugger on order, but it would be nice to load some code before it arrives…
Thanks,
Jim Norton
Read the LPC2138 data sheet and user manual.
Leon
Thanks Leon. I did read the supporting documentation. However, I can’t tell what the proper settings are for the two DIP switch package that are connected P0.14 ( BSL ) and the ICSP. Below you will find the images and text that are relevant to the bootloader. I’ve tried connecting the ICSP serial port to a comms programs and set the DIP switches to various settings and then did board resets… The most I get is the board echoing back my characters, sometimes with garbage. With other settings the board appears to be sending out ‘a’ repeatedly about 1 every second. Since there is no documentation for the board that details how to activate the boot loader I tried what made sense based on the following: ( with no luck ):
From the manual:
The flash boot loader code is executed every time the part is powered on or reset. The
loader can execute the ISP command handler or the user application code. A a LOW level
after reset at the P0.14 pin is considered as an external hardware equest to start the ISP
command handler. Assuming that proper signal is present on X1 pin when the rising edge
on RESET pin is generated, it may take up to 3 ms before P0.14 is sampled and the
decision on whether to continue with user code or ISP handler is made. If P0.14 is
sampled low and the watchdog overflow flag is set, the external hardware request to start
the ISP command handler is ignored. If there is no request for the ISP command handler
execution (P0.14 is sampled HIGH after reset), a search is made for a valid user program.
If a valid user program is found then the execution control is transferred to it. If a valid user
program is not found, the auto-baud routine is invoked.
Pin P0.14 that is used as hardware request for ISP requires special attention. Since P0.14
is in high impedance mode after reset, it is important that the user provides external
hardware (a pull-up resistor or other device) to put the pin in a defined state. Otherwise
unintended entry into ISP mode may occur.
Board Image:
http://jimnorton.org/images/LPC-P2138-2.jpg
From Schematic:
http://jimnorton.org/images/lpc-p2138-sch.gifSo I have an idea of what needs to be done, but trying the various settings I don’t the board to echo any boot loader type prompt…
Any ideas…
Ok, after reading the user manual a bit more I realized I needed to send a ‘?’ character to activate auto-baud detection. I can now enter the boot loader commands and the board responds.
Is the LPC Flash writer utility a front-end to this boot loader interface?
You can use that. I prefer FlashMagic. Things are much easier with a JTAG interface, of course.
Leon