LPC552x ADC - Successive reads to RESFIFO

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

LPC552x ADC - Successive reads to RESFIFO

810件の閲覧回数
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 返信

789件の閲覧回数
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 件の賞賛
返信