LPC LINK question

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

LPC LINK question

675 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Thu May 05 06:15:32 MST 2011
I noticed that most of the separated boards people dont bother using the swo signal to debug. Is it cruitial for some function or can I pass it also.
0 Kudos
Reply
10 Replies

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Sun May 08 11:02:16 MST 2011

Quote: Zero
I think you've found your problem already and it wasn't SWO 


Yup and was a really stupid mistake of mine which I cannot share :)
0 Kudos
Reply

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sun May 08 05:03:29 MST 2011
I think you've found your problem already and it wasn't SWO  :).

Just to clarify SWD and avoid confusion:

LPC-Link SWD requires:


[LIST]
[*]SWCLK
[*]SWDIO
[*]GND
[/LIST]
Red Trace requires also SWD (= SWV).

Using this pins for other things or changing it's functions will result in loss of SWD :mad:.

So a working LPC-Link SWD for LPC11.. / LPC12.. / LPC13.. / LPC17.. is a simple 4-wire connection:


[LIST]
[*]Reset
[*]SWCLK
[*]SWDIO
[*]GND
[/LIST]
Picture:

http://www.flickr.com/photos/58892165@N08/5406234290/

See also Code Red SWD description:

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

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Sun May 08 03:32:54 MST 2011
 int GetBatteryValue()
 {
            /* ADC IN4 */
// LPC_IOCON->ARM_SWDIO_PIO1_3   &= ~0x8F;
// LPC_IOCON->ARM_SWDIO_PIO1_3   |= 0x02;  

 LPC_IOCON->ARM_SWDIO_PIO1_3    = 0x02;
 


 
 long d = ADCRead(4); //SWO
 d *= 1640;
 //d *= 2;
 return d >> 8;
 
 }

This is the function I am trying to run. And after using it it becoms impossible to upload. (out of the function is used for SPI again, I dont  know is it good to  multiplex it like that, but my hardware really dont leave me  much of a choice)
0 Kudos
Reply

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat May 07 15:00:34 MST 2011
Reset function for IOCON_PIO0_9 is PIO0_9. So SWO is disabled by default and everthing is working fine here.
How did you disable SWO?
0 Kudos
Reply

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Sat May 07 14:54:26 MST 2011
yes
0 Kudos
Reply

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Sat May 07 13:55:06 MST 2011
Are we talking about LPC1343?
0 Kudos
Reply

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Sat May 07 13:50:27 MST 2011
I noticed after disabling the SWO even that i dont use it hardwarely , after that i cant  upload. Need to pull down GPIO 0.1 in order to work.
0 Kudos
Reply

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bobi-one on Thu May 05 12:22:24 MST 2011
It really works :D , and it seemed all the times my device reported " cannot connect to emulator" was because of the sweat, kapton tape and god knows what on the board, which is all gone with a little bit Isopropyl alcohol.
0 Kudos
Reply

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by larryvc on Thu May 05 11:39:44 MST 2011

Quote: Zero
Works fine for me with several boards / LPC-Links, even with 30cm SWD wires...



I'm suffering from too much information syndrome after attending ESC and the flight there and back.

Just to verify your answer Zero, we can use SWD without the swo signal?

Thanks for letting us know that it works with long leads. For us metric inept types 30cm is 11.81102362204724 inches.:rolleyes:

Larry
0 Kudos
Reply

666 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Thu May 05 06:33:33 MST 2011
Works fine for me with several boards / LPC-Links, even with 30cm SWD wires...
0 Kudos
Reply