lpcware

LPC Link2 as Target, use buffered J6 pins for IO

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by pockpock on Mon Jul 14 14:44:18 MST 2014
Hi,

I'm currently using two LPC Link2s: one for programming/debugging and the other one as a target as described in the FAQ [1]. The blink example works as expected and so I moved on to a more complex test: I tried using the pins at the J6 port. For this purpose I used the schematic of the embedded artists homepage [2].

Some of the buffers are permanently configured as an output (TCK, TDI), some are configured as input (RTCK, TDO) while others can be configured (RESET, TMS).

This is the list of GPIO positions and settings I created reading the schematic and LPC43xx reference manual:

1.8   P1_5 (J4)    TMS_DIR     --
1.9   P1_6 (K4)    TMS, SWDIO  J6 p2
1.7   P1_14 (J8)   TDO, SWO    J6 p4
0.12  P1_17 (H10)  TCK, SCK    J6 p3
0.13  P1_18 (J10)  TDI         J6 p5
5.5   P2_5 (D10)   RESET       J6 p6
5.6   P2_6 (G9)    RESET_DIR   --


I've been able to use all of them except the RESET line, even though I only changed the pins. i.e the following code works (TMS oscillates @100Hz):

#define PORT 1
#define DIR  (1<<8)
#define SIG  (1<<9)
...
GPIO_SetDir(PORT, DIR, 1);
GPIO_SetDir(PORT, SIG, 1);
GPIO_SetValue(PORT, DIR);
while(1) {
GPIO_SetValue(PORT, SIG);
systick_delay(5);
GPIO_ClearValue(PORT, SIG);
systick_delay(5);
}


But the same code with following defines doesn't (RESET stays high the entire time).

#define PORT 5
#define DIR  (1<<6)
#define SIG  (1<<5)


I checked for a hardware defect by using the same LPC Link 2 as a debug probe and pulling the RESET pin low/high from LPCXpresso IDE, which worked. Did I miss something? How can I use the RESET pin?

Regards,
Stefan

Refs:
1. http://www.lpcware.com/content/faq/lpcxpresso/using-lpclink2-as-lpc4370-eval
2. http://www.embeddedartists.com/products/lpcxpresso/lpclink2.php

Outcomes