Post Go back to editing

ADPD188GG FIFO interrupt on GOPI0 firing too frequently

Hi,

I am working on ADPD188gg eval board interfaced with my custom MCU board i.e; I am not using the EVAL-ADPDUCZ microcontroller board. My custom MCU board connects to ADPD188gg via I2C. I am setting SLOTB_FIFO_MODE = 2 so each sample is 4 bytes. I am running the ADPD chip in float mode with 50 samples/sec rate.

I am trying to read data from 128byte FIFO using interrupt on GPIO0 line. I want to get GPIO interrupt when there are atlease 120bytes in the FIFO. But I see the interrupt is comes as soon as there are 4 bytes of data in the FIFO. The data itself is good but I want to get an interrupt only when atleast 120 bytes of data is ready. So that the MCU does not wake up too often. 

Here is the register configuration set by my code in the following order:

Register Value Comment
0x0F 0x0001  Reset
0x10 0x0001 Program Mode
0x02 0x0004 GPIO0 enable in always driven active high config. GPIO1 disabled 
0x06
0x3C00
FIFO threshold = 0x3C = 60 words (120 bytes)
0x01
0x00BF
FIFO_INT_MASK = 0 (enable), SLOTB_INT_MASK = 0 (enable)
0x0B
0x0001
GPIO0_ALT_CFG = 0x01 (interrupt on GPIO0, as defined in reg 0x01)
0x11
0x30A0
Enable "time slot B" with 32-bit sum of all four channels
0x12
0x00A0
sample rate = 50 samples/sec
0x14
0x0110
0x15
0x0000
0x34
0x0000
0x4B
0x2695
0x58
0x0440
0x3C
0x3206
0x54
0x0AA0
0x35
0x0235
0x36
0x1427
0x3B
0x1D10
0x44
0x1C25
0x45
0xAE65
0x59
0x7008
0x23
0x1530
0x3F
0x5F12
0x5A
0x9F00
0x10
0x0002 
Run Mode

After setting all above, the firmware sees interrupt on every 4 bytes of FIFO data instead of 120 bytes.

Can you suggest what configuration should be changed to make it work. 

Thanks,

Syed Bilal Hasani

Parents
  • Hi Syed,

    The timeslot B interrupt is enabled in your config (bit 6 of register 0x01) so that an interrupt is generated when the data registers are updated. For interrupt-based FIFO read, the timeslot A/B interrupt needs to be disabled.

    In addition, to calculate the FIFO threshold in register 0x06, it is better to substract 1 from the number (refer to page.23 of ADPD188GG datasheet).

    It is also noticed that in register 0x02, the GPIO0 is set to active high (bit 0). Typically it is set to active low. Please check your MCU board for the polarity requirement and set this bit appropriately.

    Regards,

    Glen B. 

  • Hi Glen,

    Thanks for the response. As you suggested I disabled SLOTB_INT_MASK bit by changing reg 0x01 to 0x00FF and the interrupts are now coming after 124 bytes. No other change was required.   

    Thanks,

    Syed Bilal Hasani

  • Hi Syed,

    Thanks for your feedback! It is great that the problem has been solved. 

    Regards,

    Glen B.

Reply Children
No Data