Slow ADC conversion on Xpresso board

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

Slow ADC conversion on Xpresso board

586 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andrejvrecer on Sun Nov 16 07:07:41 MST 2014
Hi,

I have some issues with ADC conversation. I have used example code from lpcopen_2_08c_lpcxpresso_nxp_lpcxpresso_1549.zip on ADC src.
I have added USB VCom code to my project to use as debug port.

Have used SysTick to sent out debug every 1s. I use uint32_t counter to count how many ADC measurements on 1 channel (ADC0.1) is made in burst mode on SEQ_A
The number is ONLY 19229 times! I can't get anything close to 2MSamples. Also I used osciloscope to measure time between 2 ADC interrupts and time was around 50us which is around the same as numbers of ADCs in 1 sec.

The same problem I have on ACMP where I wished to measure response time on input pulse. From time I pressed external button to LED change using ACMP interrupt it took around 80-100us !! Is this normal? I need response time on less then 10us. Non filters were used on ACMP (bypass mode).

So at the end my research is showing that my xpresso board is "slow"? I have debug out all clocks and are 72MHz and devider is 1 for perihibal.

What am I doing wrong. I can attach code but at the end is example code from you guys.

Before I have used LPC1347 and ADC measure time was around 20us (now 50+)

I have tried Release and Debug compile...both made the same result. Is LPC1549 slow when some debug chip is connected to it?

Please help me I am out of ideas after 3 days of coding.

Andrej
Labels (1)
0 Kudos
4 Replies

543 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Tue Apr 12 05:03:52 MST 2016

Quote: samedtopal
After the  calibriation you have to initsialisation your ClockRate again with the MAC_SAMPLE_RATE. I dont now why but it helps



:D

Then read my link in #1 of this thread, there's explained what's happening  :O
0 Kudos

543 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by samedtopal on Tue Apr 12 04:12:00 MST 2016
Hi andrejvrecer,

It i a late reply but i hope it will help you. I have the same problem, that my ADC need for a conversion 50us. Now we found a result, that the adc makes faster. Around 3us for a conversion. That is about 333kHz and not 2MHz but faster.

The way is this:

After the  calibriation you have to initsialisation your ClockRate again with the MAC_SAMPLE_RATE. I dont now why but it helps

/* Need to do a calibration after initialization and trim */
Chip_ADC_StartCalibration(LPC_ADC0);
while (!(Chip_ADC_IsCalibrationDone(LPC_ADC0))) {}

Chip_ADC_SetClockRate(LPC_ADC0, ADC_MAX_SAMPLE_RATE);

I hope, it will help you

0 Kudos

543 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by andrejvrecer on Tue Dec 16 10:21:03 MST 2014
Thank you,

Got to the same result after additional 3 days of debugging :(

This is sorted now but now I had new problem which I will ask in new thread ... memory problem.

Andrej
0 Kudos

543 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by R2D2 on Fri Dec 05 23:20:02 MST 2014
See: http://www.lpcware.com/content/forum/wrong-lpcopen-adc-init
0 Kudos