Using PIO0_10 means no JTAG and no debug?

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

Using PIO0_10 means no JTAG and no debug?

669 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trryt on Mon May 03 03:04:39 MST 2010
I wanted to use 3 channel PWM so in my program I configured PIO0_10 as output:
LPC_IOCON->JTAG_TCK_PIO0_10 &= ~0x07;
LPC_IOCON->JTAG_TCK_PIO0_10 |= 0x03;
First time after doing that, I got an error on debug start (when my program has changed the pin function from JTAG to GPIO) and I found it normal.
But now when I try to modify the program the LPCXpresso can't connected with the target. Is this mean that mean that LPC1114 flashed with PIO0_10 configured as GPIO cannot be re-flashed with LPCLink any more??? Or is it some other error of LPCXpresso? Frankly speaking once in a few runs it cannot connect with the board from strange reasons. One thing I've noticed is that after a hibernation or sleeping the PC LPCXpresso cannot connect to LPCLink, but rebooting always helped.
Now it stops on 5%[Connect] Remote Configuration Complete and does not respond. The LPCLink LED is on.
I've tried to switch debugger to SWV and then I get an error:
Error launching Release\blinky.axf
Remote communication error: No error.
Is using the UART bootloader the only possibility to flash the LPC1114 or is just anothe error in LPCXpresso??
0 Kudos
Reply
7 Replies

622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trryt on Mon May 03 10:07:25 MST 2010
I was cheking datasheet to find out on which pin I have PWM output... I was suggested with JTAG by LPCXpresso. But whether it's JTAG or SWD this pin is needed by the LPCLink and that's important.
0 Kudos
Reply

622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by leon_heller on Mon May 03 09:24:59 MST 2010
According to the data sheet that pin has the following functions: SWCLK/PIO0_10/SCK0/CT16B0_MAT2. It has nothing to do with JTAG. It's always a good idea to check the data sheet and user manual if you aren't sure about something like that.
0 Kudos
Reply

622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Mon May 03 08:12:08 MST 2010

Quote: trryt
So why the pin is named JTAG_TCK_PIO0_10 when there's no JTAG? Why it doesn't have SWD in name? But it's not important. Putting LPC1114 in bootloader mode solves the problem (even without erasing it). So for those who don't know about bootloader and will lock there chips here is what to do:
1) Power up the board;
2) Pull down FT/GPIO
3) While holding FT/GPIO down, pull down and release RST pin
and now LPC1114 is in bootloader mode and SWD works again (till next reset).



Hi trryt,
Unfortunately old versions of the code is circulating and all the JTAG stuff should have been removed.
Thanks a lot for also sharing the ISP bootloader solution.

Just to be clear, PIO0_1 should be pulled low while resetting the device, this will cause the device to go ISP mode.

Kind regards
0 Kudos
Reply

622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trryt on Mon May 03 05:18:09 MST 2010
So why the pin is named JTAG_TCK_PIO0_10 when there's no JTAG? Why it doesn't have SWD in name? But it's not important. Putting LPC1114 in bootloader mode solves the problem (even without erasing it). So for those who don't know about bootloader and will lock there chips here is what to do:
1) Power up the board;
2) Pull down FT/GPIO
3) While holding FT/GPIO down, pull down and release RST pin
and now LPC1114 is in bootloader mode and SWD works again (till next reset).
0 Kudos
Reply

622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Mon May 03 04:34:39 MST 2010

Quote: trryt
OK I will use UART bootloader. But it seems to me strange to me why SWD isn't working because as I wrote before I only changed the JTAG pin but not SWD and as I understand it these are totally seperate interfaces.



Hi trryt,
The LPC1100 doesn't have JTAG at all, only SWD. The TCK pin (PIO0_10) is one of the few pins used by SWD.
By changing its function to GPIO/SSP_CLK/MAT2 will disable SWD functionality at that moment.

Kind regards,
0 Kudos
Reply

622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by trryt on Mon May 03 03:40:20 MST 2010
OK I will use UART bootloader. But it seems to me strange to me why SWD isn't working because as I wrote before I only changed the JTAG pin but not SWD and as I understand it these are totally seperate interfaces.
0 Kudos
Reply

622 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by NXP_Europe on Mon May 03 03:24:24 MST 2010

Quote: trryt
I wanted to use 3 channel PWM so in my program I configured PIO0_10 as output:
LPC_IOCON->JTAG_TCK_PIO0_10 &= ~0x07;
LPC_IOCON->JTAG_TCK_PIO0_10 |= 0x03;
First time after doing that, I got an error on debug start (when my program has changed the pin function from JTAG to GPIO) and I found it normal.
But now when I try to modify the program the LPCXpresso can't connected with the target. Is this mean that mean that LPC1114 flashed with PIO0_10 configured as GPIO cannot be re-flashed with LPCLink any more??? Or is it some other error of LPCXpresso? Frankly speaking once in a few runs it cannot connect with the board from strange reasons. One thing I've noticed is that after a hibernation or sleeping the PC LPCXpresso cannot connect to LPCLink, but rebooting always helped.
Now it stops on 5%[Connect] Remote Configuration Complete and does not respond. The LPCLink LED is on.
I've tried to switch debugger to SWV and then I get an error:
Error launching Release\blinky.axf
Remote communication error: No error.
Is using the UART bootloader the only possibility to flash the LPC1114 or is just anothe error in LPCXpresso??



Hi trryt,
Unfortunately it look like you 'locked' the device for SWD usage. If the SWD pins are configured as different function, always add a 2-3 sec delay before changing the function. This will give you (or the LPC-link) the ability/time to halt the CPU before the SWD pins are changed.
The only way to 'unlock' the LPC1114 indeed is by using the UART bootloader. Using flashmagic you can erase the flash content and everything is solved.

Kind regards,
0 Kudos
Reply