Where to start help with the basics

Started by JustJames, September 24, 2015, 03:24:35 AM

Previous topic - Next topic


Hi all,
Im after help in the basics and how to use flashmagic.
I have been playing with jlink programming using a usb segger device on my XP laptop which has no com port

In my playing I have got to a basic level and now need to use flashmagic for a specific issue but I have no idea on how to connect to my chip, I can understand how to use flashamgic software.

My board is an old commercially available car ecu programmer, the company is no longer in existance, it is fitted with the LPC2478 chip.
On the side of the board is a jlink interface, well its a 20 pin connector that connects to the jtag connections tdo/tms/tdi/tck/rst/vcc/earths
So my normal process is to connect my jlink, reset the unit and reprogram it with the new code, its not hard to do and I have done it for a few other people when they have a specific issue.
We have then moved on and added a new feature which I want to protect so iread up on CRP protection and thought yep thats cool so it was added to the .bin file and we have been playing with it but now I have locked my own chip
I dont need to read the chip I just need to wipe it all and then reprogram it

I have found the articles on how to do it, sending the commands
U 23130    (Unlock) 0 = SUCCESS response
E 0 29        (Erase all sectors for 512K Flash) 9 = SECTOR_NOT_PREPARED_FOR_WRITE_OPERATION

So after 3 days on the interweb and reading many forums I can see that flashmagic will allow me to erase the chip entirely which is excellent news, Ive read through the forum and can not find the basic information on how to connect to the chip to do this.

I feel its a stupid question but Ive given up on searching and will just ask!
How do I physically to my chip!

Thanks in advance

Andy Ayre

You need to connect USART0 to your PC's COM port. If your PC doesn't have a COM port then a good quality USB to RS232 cable will do.

RS232 voltages are not compatible with microcontrollers, so you need a MAX232 or similar inbetween. You can get small modules from ebay and other places that go from USB to USART Tx/Rx TTL for just a few dollars. For example: http://www.ebay.com/itm/FT232RL-FTDI-Module-Mini-Port-USB-to-TTL-3-3V-5-5V-for-Arduino-Serials-Adapter-/221832721129

You need to get the microcontroller into ISP mode. This requires controlling the voltage on the ISP entry pin P2.10.

All of this is described in the LPC2478 user manual from NXP which you can download from www.nxp.com/microcontrollers

For an example circuit see the Keil MCB2300 board schematics http://www.keil.com/mcb2300/mcb2300-schematics.pdf

Embedded Systems Academy, Inc.
support at esacademy dot com