Strange behavior ADC4 only.

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

Strange behavior ADC4 only.

517 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rody on Tue Mar 15 01:07:00 MST 2016
Setup:
I use the ADC in burst mode on DMA, but I also test it without DMA (polling). The global ADC register is not used.
I excluded reentrancy problems, I'm sure that is not the issue.

The first problem was (but is now solved) was glitches in all ADC's. Like everybody else I just filtered it. BUT it is now solved!
The ADC clock must be <= 13MHz. Standard when using lpcopen the adc divider is 4. When the pclk is set to 96Mhz (like many will do) the adc clk will be to high (96/4=24MHz). I set the divider to 8 and the glitched are gone.

But the main reason I looked at the timing and init was because I had not only had glitches on all channels but particularly ADC4 was very bad.
This problem came with a new batch of hardware and was not before. So without changing the software only ADC4 has strange behavior on the new hardware.

[u]This leave me to the problem I have now[/u]:

I connected a voltage using a opamp (buffer), the output of the opamp is stable and is not oscillating. Each channel has is own opamp the input to all opamps is the same voltage.
1. All channels give a stable value but the value on ADC4 is fluctuating a view bits, even after filtering (with large T).
2. When the software is started by applying the voltage to the target, i have another value than when I reset the target (RST pin).
    Example:
    - starting the target -> value = 2704
    - after resetting the target -> value = 2720
This can be easily reproduced!
When I cool the target a bit the value is the same a startup and reset. I warm it up (just to 30 decrease Celsius) the problem occurs again.

I did try many things in hardware and software, but nothing really works. Adding a small C (22pF) to the ADC input does help, the value then only changes 6 (2704, 2711)
If i connect a voltage directly to ADC, so no opamp, the value is also ok. I seems the opamp output is not hard enough, but measuring on the opamp output with a  6 1/2 digit meter or scope tells me that the output voltage is stable an is not dropping.

Anyone else with this problem on ADC4 only?


Labels (1)
0 Kudos
Reply
4 Replies

485 Views
lpcware
NXP Employee
NXP Employee
bump
0 Kudos
Reply

485 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by rody on Wed Mar 16 00:47:34 MST 2016
@tdrazich: I use the 100 pins TQFP, the adc is indeed near the clock. Is replaced the opamp with a new one from the same type and the output is now stable. But this doesn't explain the offset difference on startup and reset. After reset it is lower and it stays that way. it is about 17 of the 4048, but this way to large for the PT100 measurement.

@wmues: I do not have any spikes anymore, in the adc values (also without the 22pF), this is solved by init the adcclock properly. Main issue is the offset problem. Replacing the opamp with a lower impedance solves the issue dough. But it is strange why this is only on ADC4 on different targets in the latest batch and not in the 25 targets before.
0 Kudos
Reply

485 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by wmues on Tue Mar 15 11:10:44 MST 2016
Please consider that your OP-Amp output has a low resistance only for low frequencies. For high frequencies, the resistance will grow, and induced high frequency spikes will make it into the ADC. This is why the small capacitor helps.
0 Kudos
Reply

485 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by tdrazich on Tue Mar 15 10:43:07 MST 2016
I had a similar issue with a design years back that used an LPC2368. I witnessed ADC[4] not being as stable as the other channels. It would always be bouncing around by several ticks. I assumed the issue was because ADC[4] was on pin 21 and XTAL was on pin 22. I saw the issue go away when configuring the cpu clock source for the internal oscillator and disabling the external oscillator. This was years ago, so I'd recommend doing the same test to confirm. That is also assuming that you're using a package where ADC[4] is on a pin next to the XTAL pins. I ended up adding a hardware filter to my design and I didn't require stability on that channel.

Also, I'm interested to find out the real cause. :)

-Tyler
0 Kudos
Reply