Post Go back to editing

AD5940 FIFO threshold interrupt triggered when FIFO is empty

Category: Hardware
Product Number: EVAL5940ECLZ

Hi, I have been trying to interface AD5940 with ESP32. The port library works and seems to have written correct data into the correct addresses.

When I was running the chronoAmp example, the FIFO threshold interrupt was triggered when there was nothing stored in the FIFO (AD5940_FIFOGetCnt() returned 0). I checked the following registers:

REG_INTC_INTCFLAG0: 0x02008000
REG_INTC_INTCSEL0: 0x0200a000
It seems that the registers were set up correctly, what could be the reason of this strange behavior? Any help would be much appreciated.
  • Hi,

    Could you check if fifo_cfg.FIFOThresh  set to the required value?

    Could you ensure that the flag is cleared after each assertion? (AD5940_INTCClrFlag(AFEINTSRC_DATAFIFOTHRESH);)

  • Hi Akila,

    This is the debug output that I've obtained after configuring AD5940 to measure transients, see my comments in parentheses.

    Configuring FIFO...
    REG_AFE_CMDDATACON has value 0x0489
    REG_AFE_DATAFIFOTHRES has value 0x3e80000 (Corresponds to fifo_cfg.FIFOThresh value of 1000)
    REG_AFE_FIFOCON has value 0x6800
    FIFO threshold register is 0x03e80000
    (Interrupt triggered here)
    FIFO count is 0
    Interrupted with flags: 0x02008000
    Interrupt flags after clearing: 0x00008000.
    End of Sequence
    (Then code proceeds onto normal measurements)
    bMeasureTransient is false
    FIFO threshold register is 0x00050000
    FIFO count is 0
    Interrupted with flags: 0x00000000
    Interrupt flags after clearing: 0x00000000

    It seems that the transient measurement ended immediately. Also the normal measurements seem to be broken as well (interrupted with all 0 interrupt flags).

    I suspect this might be a sequencer programming issue? How would you suggest I debug the sequencer?


  • Hi,

    Could you tell which parameter you are watching:






    Also could you tell the value of NumOfData?

  • Hi Akila,

    I have been watching output from AD5940_FIFOGetCnt(), it returns 0 when the interrupt is triggered.

    The value of NumOfData was set to -1 for non-stop operation.

  • Hi,

    While running the ChronoAmp example, do you get the desired output on the terminal?

Reply Children