LPC1517 doens't respond

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC1517 doens't respond

5,021 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Tue Aug 05 07:22:28 MST 2014
I'm experiencing a problem with the ISP and SWD of the LPC1715. I can't debug or program the device, not by the SWD or ISP.

This morning it was working perfectly, but suddenly I couldn't debug the device any more, I was getting some error about RedLink server. So I tried to program the device by ISP, that also wasn't possible. So I assumed the device was broken, and I replaced it for a new one.
With the new device installed I first tested the ISP, and worked fine (I didn't program the device, only read the device ID). Then I started a debug session within LPCXpresso, at first it looked it was okay. But than the error appeared again. After that the ISP also doesn't work anymore.

I use a custom board, with the latest version of LPCXpresso en LPCopen. Can software cause the device to become unusable? The crystal is still oscillating.

Can anyone help me?


Guy

标签 (1)
0 项奖励
回复
23 回复数

4,557 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Thu Aug 07 10:59:54 MST 2014
Yes of course, but if the device is programmed ISP is also working (for now).  :)
0 项奖励
回复

4,557 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Thu Aug 07 10:11:50 MST 2014
.
0 项奖励
回复

4,557 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Thu Aug 07 08:53:37 MST 2014

Quote: BowlingNL
The same procedure works fine when I install a new device, so I doubt that.



A new device is empty, that's something different...
0 项奖励
回复

4,557 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Thu Aug 07 08:46:52 MST 2014

Quote: LabRat

Quote: BowlingNL
I have no explanation why I can't program the device by ISP.



Perhaps your "program the device by ISP" procedure is wrong  :quest:



The same procedure works fine when I install a new device, so I doubt that.
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Thu Aug 07 08:43:30 MST 2014

Quote: BowlingNL
I have no explanation why I can't program the device by ISP.



Perhaps your "program the device by ISP" procedure is wrong  :quest:
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Thu Aug 07 08:28:55 MST 2014
I found out why the reset pin did not reset the device anymore and lost the ability to debug. I used the following code from the LPC1549 Xpresso board library:

//Setup fixed pin functions (GPIOs are fixed)
#define PINENABLE0_VAL 0xFFFFFFFF
#define PINENABLE1_VAL 0x00FFFFFF

/* SWM fixed pin setup */
LPC_SWM->PINENABLE[0] = PINENABLE0_VAL;
LPC_SWM->PINENABLE[1] = PINENABLE1_VAL;


That will disable the RESET, SWCLK, and SWDIO pins. As bit 21, 22, 23 are written '1', what disables the pin functions. The last 2 lines where commented by default and I only changed the first 2 bytes of PINENABLE1_VAL... :~ Maybe change the PINENABLE1_VAL define to 0x1FFFFF in the LPC1549 Xpresso board library for the next release?

I have no explanation why I can't program the device by ISP. I replaced it with a new device again and until now everything works good. I will post it in case it happens again and I found out why.

0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Aug 06 09:17:45 MST 2014
You *must* be able to enter ISP mode, unless you have programmed the CRP (which you say you haven't). Please make sure you read the instructions for entering ISP mode for your chip.

To get the LPCXpresso 1549 into ISP mode, hold down the ISP button while resetting or applying power to the board. Read the user manual for more information.
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Wed Aug 06 09:06:23 MST 2014
That might be, I will check that. But the whole problem is that I can't get in to ISP mode... If I could there wouldn't be a problem, than I just flash working code. But my main concern is that I can't use ISP, which is as far as I know the only way to program the device.

Do you have any other suggestions?
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by lpcxpresso-support on Wed Aug 06 08:04:51 MST 2014
Sounds like you are accessing peripherals without enabling them in the CGU. If the peripheral is not enabled/powered it will cause a hard fault that can be very hard to recover from. To regains access to the chip, you need to:
- boot it into ISP mode (which will prevent your code running)
- fix your code, so it doesn't try to access a peripheral before it is enabled

ISP mode:
http://www.lpcware.com/content/faq/lpcxpresso/regaining-debug-access
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Wed Aug 06 06:23:21 MST 2014
Okay, I was able to reproduce the problem on the Xpresso v2 LPC1549 board. I was debugging the SCT, opened the Debug perspective in LPCXpresso 7.3, while debug running I tried to modify a register value of the SCT. At that moment LPCXpresso crashed and after that the LPC1549 does not respond anymore, not at the SWD or ISP interface. I had the same situation with my custom board with the LPC1517. I didn't mentioned it before, I thought it was just an incident.
I also experience the same issues as I had with the two LPC1517's on my custom board, no response at a reset, crystal oscillator keeps running with reset low and the LED on the Xpresso board keeps on when reset low (button pressed), before it didn't.

Now I am really confused what is the problem, as it can't be the hardware, I have the same problem on the Xpresso board.

Anyone who recognize this problem?

0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Wed Aug 06 03:32:17 MST 2014
So am I  :)

I do not setup the USB clock. What I have flashed in the LPC is actually nothing more than initialization of the pin assignment and system clock, by the board library.

I have flashed this same project in the LPC1549 Xpresso board (rebuild for the 1549), but with the CRP option disabled and it is executing and I am still able to debug...

My only suggestion right now is that it has something to do with the CRP. I haven't got another device right now, but as soon as I have it, I will continue to test the project without the CRP enable, as I did for the Xpresso board right now.

To be continued...  (any suggestion is welcome in the meantime ;) )
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Wed Aug 06 02:37:51 MST 2014
At this point I'm clueless...

Without details (schematic, board layout, project, board library) that's vague guessing here...

I've still no clue what you have flashed in your LPC (e.g.did you disable USB clock?)...

So it's up to you to review everything  :)






0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Wed Aug 06 02:11:02 MST 2014

Quote: LabRat

Quote: BowlingNL
I'm using the LQFP48. I'm pulling low the PIO0_4 (5) and PIO0_16 (24). Rx and Tx are connected to PIO0_14 (22) and PIO0_15 (23).



That's a correct default connection. So which program did you flash?

Did you pull up ISP pins and Reset for SWD usage?

Are you using a custom LPCOpen board library?



I use a custom LPCopen board library, but based on the LPC1549 Xpresso board. And I do pull up the ISP pins.

What I noticed is that when I pull down the reset pin, the crystal oscillator does not stop.Only when I pull down the reset pin and than put the power on, the crystal oscillator is stopped. I have checked the level on the reset pin and they are good.
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Tue Aug 05 08:50:34 MST 2014

Quote: BowlingNL

Quote: LabRat

Quote: BowlingNL
I forgot, this is the error message I get when I start a debug session:

Error in final launch sequence
Error: Error reported by server (redlinkserv.exe):
RedlinkAPI: [color=#f00]Wire Ack Fault - target connected?[/color]



That's my favourite error message  :)

It's describing a wire problem and asking you if you've connected the target...

Of course you get this error message also, if you change SWD pin functions...



If I had changed the SWD pin functions, it would yes. But than I still need to be able to use the ISP?



Yes, losing SWD isn't difficult and not a problem. But losing ISP is a sure indication of real problems, usually hardware...
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Tue Aug 05 08:43:43 MST 2014

Quote: BowlingNL
I'm using the LQFP48. I'm pulling low the PIO0_4 (5) and PIO0_16 (24). Rx and Tx are connected to PIO0_14 (22) and PIO0_15 (23).



That's a correct default connection. So which program did you flash?

Did you pull up ISP pins and Reset for SWD usage?

Are you using a custom LPCOpen board library?
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Tue Aug 05 08:35:34 MST 2014

Quote: LabRat

Quote: BowlingNL
I forgot, this is the error message I get when I start a debug session:

Error in final launch sequence
Error: Error reported by server (redlinkserv.exe):
RedlinkAPI: [color=#f00]Wire Ack Fault - target connected?[/color]



That's my favourite error message  :)

It's describing a wire problem and asking you if you've connected the target...

Of course you get this error message also, if you change SWD pin functions...



If I had changed the SWD pin functions, it would yes. But than I still need to be able to use the ISP?
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Tue Aug 05 08:33:49 MST 2014
I'm using the LQFP48. I'm pulling low the PIO0_4 (5) and PIO0_16 (24). Rx and Tx are connected to PIO0_14 (22) and PIO0_15 (23).

I use the FTDI C232HD USB->UART converter, and it has always worked reliable with different LPC's (800 and 1768).

Yes, there is a transceiver connected, but I do not (yet) have a CAN interface for my PC. So I can't test that for now.

What I don't understand is that the device is working, but when I program it stops responding... While the program is at this moment nothing more than initializing the peripherals and pins. And I have worked yesterday also with this board, without any problem.
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Tue Aug 05 08:26:45 MST 2014

Quote: BowlingNL
I noticed that I have activated the CRP option in the project configuration. But, in crp.c I have this statement: __CRP const unsigned int CRP_WORD = CRP_NO_CRP;. Can this be the problem?



No, NO_CRP is no CRP = nothing is protected  :)


Quote: BowlingNL
I know about the two ISP pins, they are both pulled down, so it must enter USART0 ISP mode. And it does, with a new device.

What else can I do wrong or need to check?



I'm not sure which "LPC1715" you are using and which pins in detail you are pulling low...

LPCOpen Samples are for LQFP64...

But anyway, if ISP isn't working that's usually a hardware problem.

Is your UART converter reliable?

Another option would be to test CAN-Bootloader, if you've connected a transceiver...
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by LabRat on Tue Aug 05 08:25:42 MST 2014

Quote: BowlingNL
I forgot, this is the error message I get when I start a debug session:

Error in final launch sequence
Error: Error reported by server (redlinkserv.exe):
RedlinkAPI: [color=#f00]Wire Ack Fault - target connected?[/color]



That's my favourite error message  :)

It's describing a wire problem and asking you if you've connected the target...

Of course you get this error message also, if you change SWD pin functions...
0 项奖励
回复

4,558 次查看
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by BowlingNL on Tue Aug 05 08:19:13 MST 2014
I forgot, this is the error message I get when I start a debug session:

Error in final launch sequence
Error: Error reported by server (redlinkserv.exe):
RedlinkAPI: Wire Ack Fault - target connected?
0 项奖励
回复