Programming LPC4370

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Programming LPC4370

1,884 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Mon Feb 16 08:06:27 MST 2015
Hello friends,

Recently I designed hardware for LPC4370. In the board I put pinout for JTAG debugger. When I supply power through USB, the LED, which I used same port and pin as in LPC-link II, starts blink. But when I tried to download program through JTAG, I get message "Chip error fail". I check the connection of the JTAG and its ok. I used TRST, TDI, TMS, TCK, TDO and RESET pins to connect with JTAG. Can someone please help me regarding this?
Labels (1)
0 Kudos
Reply
14 Replies

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Sun Mar 01 13:14:12 MST 2015
Hi mshrestha789,
As mentioned by LessThanZero, if you have debugger connection issue, better first debug that issue. The simplest approach will be put device in ISP mode and check device IDE in Keil debugger window. If IDE is not there it means there is hardware problem.
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Thu Feb 26 08:46:43 MST 2015

Quote: mshrestha789

This is the first time I am doing flash less microcontroller. I look into internet and found out about quad-SPI flash. Now I plan to add quad-SPI flash to the circuit. Will adding any quad-SPI IC solve the problem?



Adding an external flash memory does not solve the debug circuit problem.
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Thu Feb 26 07:26:52 MST 2015
Hi,

This is the first time I am doing flash less microcontroller. I look into internet and found out about quad-SPI flash. Now I plan to add quad-SPI flash to the circuit. Will adding any quad-SPI IC solve the problem?

In the user manual, I noticed LPC43xx Boot ROM. But In the flash magic I didn't find option for LPC4370. There is only LPC4330, so can I program this microcontroller using USART0 and flash magic? 
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Tue Feb 24 10:32:31 MST 2015
The LPC43xx parts have internal pullups for most signals. One exception seems to be TCK (SWCLK) and TDO (SWO). The datasheet suggests 10K - 100K pullups for these signals (UM10503 Section 50.6.2).

In case you have other hardware issues, do you have a duplicate part to try? Your schematic is one part of the picture. There's no way for the forum to tell anything else about your prototype (e.g. jumpered connections, or trace size/spacing, etc.).

One thing I did notice is you're using a linear voltage regulator. Is heat a potential problem?

LessThanZero
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Tue Feb 24 09:25:42 MST 2015
Hi mshrestha789,
I do not see flash chip in your schematic.
Where do you want to download code?
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Tue Feb 24 02:39:23 MST 2015
Hi,

Yes I did point to point signal continuity test.

I couldn't establish any kind of debug connection. It only shows the error message. Is there any other way to verify the connection?
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LessThanZero on Tue Feb 24 01:10:39 MST 2015
I looked at your schematic. You say the debug circuit checks out, but how did you determine this? Point to point signal continuity? Putting aside flash program for one moment, can you establish any kind of a debug connection (SWD/JTAG)? If so, is it possible to view core registers, and access a RAM bank?

The debug circuit reference design in the FAQ is not a strict requirement, but you can consider it as one way to maximize your chance of success. The LPC-Link2 schematic is somewhat harder to follow than the Xpresso v2 schematic, which came later. Another reference can be found in the LPC43xx ARM Cortex-M4/M0 User Manual (UM10503).

It would be a good idea to step back and verify basic debug functionality using SWD as suggested in the first paragraph.

LessThanZero
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Mon Feb 23 22:46:35 MST 2015
HI,

Please find the schematic attached herewith.
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Mon Feb 23 22:04:02 MST 2015
Hi mshrestha789,
LPC4370 does not have internal flash,therefore you can download code either in external SPIFI flash or external parallel NOR flash.
Can you post schematic of your board?
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Mon Feb 23 21:27:04 MST 2015
Yes I did use pullup on DBGEN and I am using Keil IDE.

But I haven't use external flash device. Will using any external SPI flash memory solve this problem?
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Mon Feb 23 09:52:09 MST 2015
Hi mshrestha789,

Did you have pullup on DBGEN?
Are you using Keil IDE?
Which external Flash device is connected to your board? Is it QSPI flash or parallel NOR flash?
You will to have select corresponding flash driver.

Please post detailed information so that forum can help you better.
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Mon Feb 23 08:43:23 MST 2015
Hi,

I have rechecked the circuit. The circuit is ok.

I am using KEIL ULINK Pro debugger.

I followed the design of the LPC-link-2 board. It doesn't have any pull-up resistors on TCK and TDO pin. I even tried with pull-up resistor on those pins. But I still get same error message Error: Flash Download failed - "Cortex-M4". Please help me regarding this.
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Feb 16 12:18:23 MST 2015
To follow up on our earlier post, once you have double checked your hardware ...

Can you also confirm whether you are trying to download to RAM or external Flash?

If you are using external flash, what flash device and which flash driver are you using?

If you are trying to download to RAM, you will need to edit the launch configuration for your project and replacing the "Reset Script" specified in the launch configuration script settings with "LPC18LPC43RamReset.scp". For details of how edit the launch configuration, see:

http://www.lpcware.com/content/faq/lpcxpresso/launch-configuration-menu

If you continue to have problems, it would be help if you could also post your debug log:

http://www.lpcware.com/content/faq/lpcxpresso/debug-log

Regards,
LPCXpresso Support
0 Kudos
Reply

1,450 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Mon Feb 16 08:29:36 MST 2015
Are you using LPCXpresso? Which Version?
Which Debug Probe are you using?
Have you followed the debug design information here?
http://www.lpcware.com/content/faq/lpcxpresso/debug-design
0 Kudos
Reply