ADC channel 5 (AD4) problem

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

ADC channel 5 (AD4) problem

1,038 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mnossik on Fri Jul 23 07:32:12 MST 2010
I was looking at the ADC example code and trying it on the LPC1114 (REV A) board. I noticed that the line selecting the AD4 pin function is commented out in the example, and as a result the ADC is always showing 0 for this pin. The other 7 pins (AD0-AD3 and AD5-AD7) are enabled and ADC reads some non-0 values on them.

When I removed the comment and tried to run the same code that now does select AD4, along with the other pins, I got an error message. Unfortunately, I did not write it down, and after a few times toggling the AD4 enable on and off, I am now getting

"02: Failed on connect: Ee(02). Not connected to emulator.
Emu(0): Connected. Was: None. DpID: EDB6. Info=T1S6RGRIA"

Is there a known problem with AD4 being enabled and perhaps a workaround? There must have been a reason why the line 160 was commented out in adc.c
0 Kudos
Reply
1 Reply

1,024 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rcazalis on Sat Jul 24 06:16:09 MST 2010
Hi,

the reason is because this pin is shared with SWDIO which is used by the debugger. If you need this pin to be an AD line then you need to program your board as if you were releasing your code but you then can't use the debugger.

It is the same with SWCLK on pin P0.10. If you need it as an IO then you can't use debugger.
0 Kudos
Reply