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
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.
BR
Alice