LPC552x ADC - Successive reads to RESFIFO

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC552x ADC - Successive reads to RESFIFO

811 次查看
PaulaVelasco
Contributor II

Hi,

I'm trying to configure the ADC in our LPC5528 so it gets interrupted on FIFO 0 watermark, and I'm setting a watermark different than 0.

The interrupt part works: I get interrupted according to the watermark, but the problem comes when I try to read all the values in the FIFO:

1. Interrupt happens according to FIFO 0  watermark

2. I call LPADC_GetConvResultCount() and get "watermark + 1" value

3. I call LPADC_GetConvResult() once to read the oldest value in the FIFO

4. I call LPADC_GetConvResultCount() again and get "0" value

According to the documentation, "Reading RESFIFO provides the oldest unread data word entry in the FIFO and decrements FCOUNT. The FIFO can be emptied by successive reads of RESFIFO", but I can't find a way to read the other values in the FIFO.

I also made sure that I don't reset the FIFO in any way between steps 3. and 4.

And I couldn't find any example in the SDK where the watermark is set to something different than 0.

 

I'd appreciate any help. Thanks!

Paula

标签 (1)
0 项奖励
回复
1 回复

790 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @PaulaVelasco 

 

You can use MCUxpresso configure tool to config , If still can't work, please send you project to me, I 

will help to test on my side.

Alice_Yang_0-1668137017643.png

 

BR

Alice

 

0 项奖励
回复