LPCXpresso LPC1114: Debug doesn't work

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

LPCXpresso LPC1114: Debug doesn't work

633 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc_veter on Mon May 02 00:49:23 MST 2011
At Debug deduces the message: "02:Failed on connect: Ee(07). Bad ASK returned from status - wire error.:"
It has begun after code writing:

        //AD4
LPC_IOCON->SWDIO_PIO1_3 &= ~0x00;   
LPC_IOCON->SWDIO_PIO1_3 |=  0x00;   
//AD5
LPC_IOCON->PIO1_4 &= ~0x07;   
LPC_IOCON->PIO1_4 |=  0x00;   
//P1.5
LPC_IOCON->PIO1_5 &= ~0x07;   
LPC_IOCON->PIO1_5 |=  0x00;   
//P1.8
LPC_IOCON->PIO1_8 &= ~0x07;   
LPC_IOCON->PIO1_8 |=  0x00;   
//P0.6
LPC_IOCON->PIO0_6 &= ~0x07;   
LPC_IOCON->PIO0_6 |=  0x00;   
//P0.10
LPC_IOCON->SWCLK_PIO0_10 &= ~0x00;   
LPC_IOCON->SWCLK_PIO0_10 |=  0x00;   
//P3.0
LPC_IOCON->PIO3_0 &= ~0x07;   
LPC_IOCON->PIO3_0 |=  0x00;   
//P3.1
LPC_IOCON->PIO3_1 &= ~0x07;   
LPC_IOCON->PIO3_1 |=  0x00;   

                //AD4
GPIOSetDir( 1, 3, 1 );
GPIOSetValue( 1, 3, 0 );
//AD5
GPIOSetDir( 1, 4, 1 );
GPIOSetValue( 1, 4, 0 );
//P1.5
GPIOSetDir( 1, 5, 1 );
GPIOSetValue( 1, 5, 0 );
//P1.8
GPIOSetDir( 1, 8, 1 );
GPIOSetValue( 1, 8, 0 );
//P0.6
GPIOSetDir( 0, 6, 1 );
GPIOSetValue( 0, 6, 0 );
//P0.10
GPIOSetDir( 0, 10, 1 );
GPIOSetValue( 0, 10, 0 );
//P3.0
GPIOSetDir( 3, 0, 1 );
GPIOSetValue( 3, 0, 0 );
//P3.1
GPIOSetDir( 3, 1, 1 );
GPIOSetValue( 3, 1, 0 );

I wanted to draw these pins as outputs. I changing the pin assignments for swd which disables debug.

How to recover operation LPC1114?
0 Kudos
7 Replies

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc_veter on Mon May 02 08:36:51 MST 2011
Thanks.
0 Kudos

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon May 02 06:35:36 MST 2011
If you change SWD pin function to something else, you'll lose SWD function.:mad:

Of course you can always switch to ISP mode (as you have already figured out), but Debugging is using SWD...
0 Kudos

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc_veter on Mon May 02 04:41:02 MST 2011

Quote: Zero

Now your new code is running



It is possible or not change functions of pins for SWD: P1.3 and P0.10, doing by their outputs? Disconnects debugging change of assignment or not?
0 Kudos

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc_veter on Mon May 02 04:06:52 MST 2011
Thanks. All beginning to work!
0 Kudos

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon May 02 03:27:50 MST 2011
No,

1. Power off
2. Ground ISP-pin (P0.1)
3. Power on

Now you are in ISP mode and should be able to program again.

4. Release ISP-pin (P0.1)
5. Reset (aktive reset = low)
6. Now your new code is running (or not :))
0 Kudos

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc_veter on Mon May 02 03:16:41 MST 2011

Quote: Zero
Switch to ISP mode:

http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip



That is I should make this sequence:
1 board off, place pin p0.1 (lpc1114) on gnd
2 power on
3 put pin p0.0 (RESET) on level '1' , then '0'
4 p0.1 - not connected to GND

Or not?
0 Kudos

610 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon May 02 03:03:41 MST 2011
Switch to ISP mode:

http://support.code-red-tech.com/CodeRedWiki/DebugAccessChip
0 Kudos