Incomplete ADC conversions on LPC1224

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

Incomplete ADC conversions on LPC1224

560 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Nathael on Fri Sep 19 02:23:42 MST 2014
Hi all,

I have a problem with ADC conversions, wich are incomplete when I reduce the delay between two samples, even if the "done" bit is set.
I've tested about everything I could find, but to no end.

The first few conversions after reset are OK (same value as with a longer delay between two samples), but then the conversions stop after 6 bits of sampling : I always get 63 or (1024 - 63 = 961) as conversion values if the voltage is above 200mV (which corresponds to value 63 if power is 3.2V)
Edit : the conversions on the top values are also OK, if voltage is between Vref and Vref-200mV I also have valid values.

If the delay between two software triggered conversions is above 250ms I have no problem.
If the voltage is below 200mV I can run samples with as little as 10ms between each with no problem (did not test lower delay).

I tried software triggered single conversions, burst conversions of single and multiple channels, and timer triggered conversions of single and multiple channels, same problem. (Not with the provided code, burst and timer triggered conversions are not supported yet in this code)

I tried with a precision LDO of 3.0V as Vref, with powerfull, stabilized, lab power supply able to provide 2.5A, but no changes. A scope sees no variation on VDD or Vref.

I do not understand why changing the delay between two samples triggers a different behaviour.

I also can sample 3 channels with a 10ms delay between the channel samples, but then the delay before the next sample set has to be three times longer ....

Code to reproduce the problem can be found here : http://git.techno-innov.fr/?p=mod_gpio_demo  (only single software trigered conversions possible with this code, but enougth to reproduce the problem)
Add "adc_display(LPC_ADC_NUM(1));" before the end of the while loop and it will display the adc channel 1 conversion value on UART1 (UART may be changed in examples.c, it is the first argument of the serial_write call)
You can change the ADC number in LPC_ADC_NUM(1) (between 0 and 7).

The "default" delay allows infinite conversions with no errors, but if you change the delay value (25) in chenillard(25); to "2", then you can see the problem.

Compile using gcc under linux (run "make" in the main directory) and flash using lpctools (package available in debian SID, or source code available here : http://git.techno-innov.fr/?p=lpctools).

Warning, the code changes the content of the user information flash, to prevent this remove the "#define USER_INFO 1" line.

The board used is my gpio Demo module, board schematics are available here : http://techdata.techno-innov.fr/Modules/GPIO_Demo/System_Reference_Manual_Module_GPIO_Demo_v03.pdf
Labels (1)
0 Kudos
1 Reply

521 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Nathael on Thu Feb 05 17:29:37 MST 2015
Hi,

I did not come back sooner but the 2.1 version of the LPC1224 reference manual includes an errata which states that Brown-Out detection must be powered to operate the ADC.

See Section 19.2 of UM10441 revision 2.1 or newer for more information
0 Kudos