LPC5528: ADC at high resolution misses codes

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC5528: ADC at high resolution misses codes

2,137件の閲覧回数
danielholala
Senior Contributor II

Hi,

I'm using the LPC5528 on a custom board and ran code based on the "lpadc_interrupt" example (SDK version 2.12.0).

The ADC clock is at 18.5 MHz. The input of ADC0 is held at 1/2 Vcc (aka. half rail) using a simple voltage divider. Further, I output 2000 samples that are acquired as fast as possible.

This is the output plotted as a histogram when the ADC is configured in low-resolution (full range contains 4096 code symbols):

data1-lores.png

Then I change the code to configure the ADC in high-resolution using:

 

#define DEMO_LPADC_USE_HIGH_RESOLUTION 1

 

 

This is the output plotted as a histogram when the ADC is configured in high-resolution (full range contains 65536 code symbols) using

data1.png

 

This is a part of the histogram data:

 

...
 32761  73 
 32762  0
 32763  0
 32764  0
 32765  0
 32766  160  
 32767  0
 32768  1
 32769  0  
 32770  51  
 32771  0
 32772  0
 32773  0
 32774  342 
 32775  1  
 32776  0
 32777  0
 32778  45  
...

 

 Obviously some output codes are missing.

Why is this? 

Thanks!
Daniel

 

 

 

ラベル(2)
タグ(1)
0 件の賞賛
返信
6 返答(返信)

2,114件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Pls try to calibrate the ADC, then use the ADC example code to sample analog channel, then do the histogram.

LPADC_Init(DEMO_LPADC_BASE, &mLpadcConfigStruct);

LPADC_DoOffsetCalibration(DEMO_LPADC_BASE);

LPADC_DoAutoCalibration(DEMO_LPADC_BASE);

 

Pls have a try.

BR

XiangJun Rong

2,100件の閲覧回数
danielholala
Senior Contributor II

Hi @xiangjun_rong ,

as you know, the code I'm running is based on the "lpadc_interrupt" example from the SDK. 

Starting from there, I extended the example code by adding:

 

#define DEMO_LPADC_DO_OFFSET_CALIBRATION true // changed to true

 

 This enables offset calibration. In MCUXpresso IDE the code looks like:

danielholala_0-1669909427338.png

As you can see, the three lines of code that you provided are used in this example.

Running this code on LPCXpresso55S28 demo board with the input of ADC channel 0A (pin 4 of connector P19, i.e., pin 20 of MCU) held at 1/2 AVDD results in this histogram:

data1.png

This doesn't look any better. In fact, the result on the demo board is worse as conversion results are shifted towards higher values away from the "correct" 1/2 full scale value 🤨.

Any idea why this is and what I could try next?

Thanks.
Best regards,
Daniel

 

0 件の賞賛
返信

2,081件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

Regarding the missing code of ADC result sample, I do not know if the design/test team has the spec, anyway, I have asked AE team, I will give you a reply after I get feedback.

BR

XiangJun rong

2,055件の閲覧回数
alex_yang
NXP Employee
NXP Employee

Hi ,

 

It's a sticky code issue on LPC55S28, which already confirm by design, will be fixed in future slicion version.

Due to deisgn request. Customer need to assign NDA if they want to see more details explanation on this. 

1,362件の閲覧回数
danielholala
Senior Contributor II

Hi,

I see that this issue has not been documented in the errata sheet for LPC55S2x/LPC552x. I think it is important to know which silicon versions are affected.

Further, I wonder whether the ADC in LPC553x family exhibits missing codes, too.

Please advise!

Thanks.
Daniel

 

 

 

 

0 件の賞賛
返信

2,020件の閲覧回数
danielholala
Senior Contributor II

Thanks for the information. I suggest to mention this ADC issue in the Errata Sheet (it's not discussed in version 2.2).

As workaround, one has to enable averaging, I guess. Do you see any other workaround?

0 件の賞賛
返信