Skip to main content
Visitor II
May 28, 2021
Question

I am using the IISDWB and am trying to configure it for FIFO mode. FIFO_STATUS2 is always returning 0x6A signaling that FIFO in going into overrun. Any ideas why this is constantly happening?

  • May 28, 2021
  • 3 replies
  • 1526 views

I read FIFO_STATUS 2 within main, then execute a for loop that will read all bytes stored in FIFO (as per the DIFF_FIFO_BITS : (DIFF_FIFO_BITS are always reading 0x200 as a result of this error with FIFO_STATUS2). And I make sure to read 7 bytes at a time - tag + 6 output registers. Then after the for loop I read the FIFO_STATUS2 and print its value again only for it to be 0x6A still. It never seems to change, which is a bit strange. Not sure what I'm missing or if I configured something inaccurately. Would greatly appreciate any insight with this at all.

    This topic has been closed for replies.

    3 replies

    ST Employee
    June 8, 2021

    Hi @SSedi.1​ ,

    did you set the STOP_ON_WTM bit in FIFO_CTRL2 (08h)?

    that could lead to a FIFO smaller than you want, but the problem remains.

    is the data read from fifo ok, when you read it?

    you have to make sure to read everything to empty the FIFO.

    Let me know if this helps

    Niccolò

    SSedi.1Author
    Visitor II
    June 8, 2021

    Hi Niccolo,

    Thanks for responding!

    I did try setting up the STOP_ON_WTM register.

    The data I read from the FIFO is okay when I read it. I have a for loop that iterates until the counter variable is equal to the value of the DIFF_FIFO_BITS so I do believe I'm reading everything.

    So I am testing this accelerometer on a shaker table at varying frequencies and as soon as the shaker table is turned on, most of the values read from the FIFO are primarily either 0 or 4 with some other values mixed. As the shaker table is oscillating in a regular sine wave I would expect the values read from the accelerometer FIFO to reflect that sine wave pattern, but that's not what I'm seeing. It's almost as though the accelerometer is not spitting out values fast enough, even though the shaker table is currently only set to 100Hz and the accelerometer has an ODR of 26.6kHz and a bandwidth of around 6 khz. Not quite sure how to get the accelerometer to interface properly with the shaker table, but I feel like it should be able to work...

    Thanks,

    Steven

    SSedi.1Author
    Visitor II
    June 8, 2021

    Hi Niccolo,

    Thanks for responding!

    I did try setting up the STOP_ON_WTM register.

    The data I read from the FIFO is okay when I read it. I have a for loop that iterates until the counter variable is equal to the value of the DIFF_FIFO_BITS so I do believe I'm reading everything.

    So I am testing this accelerometer on a shaker table at varying frequencies and as soon as the shaker table is turned on, most of the values read from the FIFO are primarily either 0 or 4 with some other values mixed. As the shaker table is oscillating in a regular sine wave I would expect the values read from the accelerometer FIFO to reflect that sine wave pattern, but that's not what I'm seeing. It's almost as though the accelerometer is not spitting out values fast enough, even though the shaker table is currently only set to 100Hz and the accelerometer has an ODR of 26.6kHz and a bandwidth of around 6 khz. Not quite sure how to get the accelerometer to interface properly with the shaker table, but I feel like it should be able to work...

    Thanks,

    Steven

    ST Employee
    June 15, 2021

    Hi Steven @SSedi.1​ ,

    sorry for the delay, can you check how much time do you use to read the FIFO?

    maybe the problem lies in temporization.

    Niccolò

    SSedi.1Author
    Visitor II
    June 15, 2021

    Hello Niccolo,

    No worries! So on average it seems to take about 118.8 milliseconds to read and empty the FIFO completely. Does that seem to be about right? What exactly do you mean by temporization?

    Thanks so much,

    Steven

    ST Employee
    June 16, 2021

    Hi Steven @SSedi.1​ ,

    with a 26.6kHz ODR, there are 26.6ksamples every second.

    this means that in 100ms there are 2.66ksamples.

    if you read the whole FIFO (3kB, or 500 samples) in the same time that 2660 samples are stored, the FIFO will always be full.

    is it clear?

    Niccolò