Unexplainable ADC values on LPC1769?

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

Unexplainable ADC values on LPC1769?

371 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Darko8 on Sun Apr 15 14:12:23 MST 2012
Hi,

I'm using all 8 analog CH on LPC1769 ADC by selecting one by one. ADC is running on 12MHz (96MHz system clk divided by 8, and I tried other dividers also).

All analog values are defined with 10k potentiometers directly tied to power supply and if I leave them on some value I can read almost exact values with some small noise present, but every now and then I read 0xF700 to 0xFFF0 on some ADC channel or even very close to 0x0000.
I measured DC level with oscilloscope and it looks OK, without any apparent spikes.

I'm noticing those spikes only when debugging (with RedProbe+ debugging tool OR LPCXpresso link) and SWD is running, if the cable is only connected and firmware is running without debugging then all is OK.


I'm using CMSISv2 and I start AD conversion with or without 100us waiting after AD channel selection. I'm using ADC in single conversion mode by using command ADC_START_NOW.

Any ideas of what could cause such random ADC conversion anomalies while debugging?

Best regards, Darko Obretan
0 Kudos
3 Replies

306 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by xjx on Sat Nov 28 06:38:17 MST 2015
Hello,

I have the same spike problem when using ADCs on LPCxpresso1769. Please see attached file when measuring DC constant values. On the red trace there are spikes.

Both channels show some noise. however, the red one has spikes that go to 0xFFF. Everything is the same for both ADC channels, hardware and software, but red channel shows these spikes.

any hints?

I tried adding capacitors as said by DARKO8 above, however this does not fix the problem.

regards
xJx
0 Kudos

306 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Darko8 on Mon Apr 16 04:26:33 MST 2012
Hi,

I measured signal with better 250MHz bandwidth oscilloscope and 1GHz probe and I measured some very short spikes on the AD inputs and when I added some 1u ceramic capacitors, the noise was gone, so I suppose it was the PCB noise issue after all.

Regards, Darko Obretan
0 Kudos

306 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Darko8 on Mon Apr 16 00:01:25 MST 2012
Hi,

I found out that detected system frequency in Red trace target speed is simply wrong. It shows 93500000Hz instead of 96000000. I set this frequency manually to 96MHz and only when I start trace function this problem with wrong readings from AD disappears...
But, if I stop debugging session and start it again same problem reoccur. Target speed stays at correct 96MHz between debugging sessions, so:

Where can I permanently set same clock setting, that is applied only when starting trace function?

Regards, Darko Obretan
0 Kudos