User Tools

Site Tools

no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


Previous revision
lpc1114_bootloader [2018/05/27 16:10] (current) – external edit (unknown user)
Line 1: Line 1:
 +======LPC1114 Bootloader======
  
 +NXP's LPC1114 chips (and some others) come with a built-in bootloader. So it's no longer neccessary to upload such a bootloader to factory fresh chips, like it was neccessary with the AVR ATmegas.
 +
 +
 +======Connecting to the Bootloader Manually======
 +
 +Even with a factory fresh chip, you can connect to the chip using a serial terminal (PuTTY, GtkTerm, ...).
 +
 +  * Connect the USB-TTL adapter as usual. You should get an additional serial port on your host's operating system. Baud rate doesn't matter, I've tested 9600 and 115200 baud.
 +  * Connect with the serial terminal to this port.
 +  * Connect PIO0_1 to GND. On the Gen7-ARM, this is also the Z axis Step signal.
 +  * Press and release the Reset button.
 +  * In the serial terminal, enter a question mark (''?'', 0x3F).
 +  * The LPC1114 should answer with "Synchronized" in clear text.
 +  * Send back the same text ("Synchronized"), followed by Enter.
 +  * The LPC1114 should answer with ''OK''.
 +... etc. etc. The protocol is described on p408ff of the LPC1114 User Manual. 
 +
 +If you don't get a response from the chip, press Reset again and start over. If it still doesn't work, it's time to grab the voltage meter or logic analyzer to find out what's going on.
 +
 +======Basic example======
 +
 +Here's a transscript of the first successful attempt to upload a firmware:
 +
 +<code bash>
 +$ git svn clone https://lpc21isp.svn.sourceforge.net/svnroot/lpc21isp
 +[...]
 +$ cd lpc21isp/
 +$ make
 +[...]
 +$ ./lpc21isp -control -bin /tmp/build3402789950117874614.tmp/Blink.cpp.bin \
 +  /dev/ttyUSB0 115200 12000
 +lpc21isp version 1.85
 +File /tmp/build3402789950117874614.tmp/Blink.cpp.bin:
 +  loaded...
 +  image size : 9752
 +Image size : 9752
 +Synchronizing (ESC to abort). OK
 +Read bootcode version: 1
 +7
 +Read part ID: LPC1114.../102, 32 kiB ROM / 4 kiB SRAM (0x1A40902B)
 +Will start programming at Sector 1 if possible, and conclude with Sector 0 to ensure that checksum is written last.
 +Erasing sector 0 first, to invalidate checksum. OK 
 +Sector 1: ...........................|.........................|.........................|.........................
 +Sector 2: ...........................|.............
 +Sector 0: ..........................|.........................|.........................|.........................
 +Download Finished... taking 1 seconds
 +Now launching the brand new code
 +</code>
lpc1114_bootloader.txt · Last modified: 2018/05/27 16:10 (external edit)