As I earlier was writing about my home made ARM7-Base development board for LPC2148
It is time to write few words on how to use LPC2000 flash ISP utility.
LPC2000 flash utility is a software which is used to program LPC2000 series ARM microcontrollers:
LPC2101, LPC2102, LPC2103, LPC2104, LPC2106, LPC2106, LPC2114, LPC2114, LPC2119, LPC2124, LPC2129, LPC2131, LPC2132, LPC2134, LPC2136, LPC2138, LPC2141, LPC2142, LPC2144, LPC2146, LPC2148, LPC2194.
Programming is done through serial port. As you probably know, the LPC2000 series microcontrollers comes with boot-loader built in. This bootloader provides ISP interface for programming Flash or Ram memories and other operations like erasing. Bootloader is located in upper 8kB flash memory.
Bootloader has an algorithm which detects incoming ISP connection, detects baud rate automatically.
When starting ISP after reset P0.14 has to be pulled down what means that microcontroller is ready to accept ISP commands. Otherwise keep P0.14 pin pulled high to avoid unintended ISP entry.
Lets take a look at main screen of LPC2000 flash utility:
The program has very intuitive screen. First thing what you have to do is to power up your target board, connect serial cable to your computer. Then in a screen select COM port number and baud rate. If you use automatic ISP entry mode, then check DTR/RTS checkbox – in a board DTR and RTS lines has to control P0.14 pin and RESET pin. Otherwise use manual entry mode.
If ‘execute code after upload’ is selected, then after programming completes – an extra reset pulse is sent to reset microcontroller.
We recommend EasyEDA for circuit design and PCB prototype
Next step you have to enter crystal frequency in kilohertz’s. After this press ‘Read Device ID’ to make sure that device is detected correctly. Part ID and boot-loader ID is detected. If successful you can now start programming you microcontroller.
Open hex file and press’upload to flash’ to send code to microcontroller. ‘Compare flash’ button is used to compare original hex file contents with uploaded. This operation is possible if checksum is part of hex file already.
Checksum can be generated as follows:
Open buffer menu and select ‘Flash buffer operations’:
Press ‘load hex file’ and select hex file you need to upload to microcontroller.
Press ‘Vector Calc’ to generate checksum which will be located at the address 0x14. You will notice how this area updates after you press this button. Now you can save hex file back to its location by pressing ‘Save Hex File’.
Now press ‘Download Flash’ to download hex data fro microcontroller.
In a main window press ‘Compare flash’ to compare flash contents and original hex file.
There is also SRAM buffer operations available – pretty same as flash buffer. You can download microcontroller RAM contents, modify and send back to microcontroller.
You can also run program code from selected address location, fill buffer with some values and so on.
Other types of ARM microcontrollers like LPC2220/2210/2290 are not supported by this utility as these microcontrollres don’t have inner flash memory. But utility can be used because it can send ISP still can access SRAM memory, read device ID. Just ignore Error message and go ahead.