This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

I2S interrupt priority on nrf5340

Hi,

We are working on nrf5340 with the nrfx I2S implementation. We have configured the I2S IRQ for every 5 miliseconds.
However, we have observed that successive IRQ introduce 100 micro seconds delay which results into a deleay over time.

Is there any way to reduce this delay in the I2S IRQ?

We have observed "#define CONFIG_NUM_METAIRQ_PRIORITIES 0" in the autoconf.h file.
Is this the maximum priority for I2S IRQ? Is there anyway to increase the priority for I2S IRQ?

Thanks,
Nishant

Parents Reply
  • By the way, what nRF53 version are you using? And what i2s microphone are you using? An Adafruit i2s mems microphone?

    If you are using an nRF53 PDK v0.8.0 or older and the mention sensor (Adafruit i2s mems) it won't work, since 32 bit sample are not supported due to this errata, which the Adafruit sensor requires.

    See the comment made by another colleague:

    "I2S microphones have a scaling of WS (Word Select) speed relative to that of the BCLK clock speed. This has also been called the data word length. For the microphone used in the I2S MEMS Adafruit breakout, the datasheet specifies: “WS must be BCLK/64”. One word is therefore 64 clock cycles. WS is interchangeable with LRCK. Now, this rate has to be set as a setting for the nRF I2S peripheral, named “CONFIG.RATIO” . Under Master clock (MCK), an important limitation is given: “The MCK/LRCK ratio shall be a multiple of 2 * CONFIG.SWIDTH”. Therefore, since MCK/LRCK = 64, the Sample Width SWIDTH has to be 32. From the top of the I2S section, we see that the old nRF peripheral supports: “8, 16 and 24-bit sample width”. This is the reason that the old I2S peripheral does not support the Adafruit I2S MEMS microphone."

    A workaround for this is explained here: https://github.com/gregtomasch/nRF52_24-bit-_I2S_Microphone_Audio_Recording_Utility

    I learned this the hard way, thus the delayed response from me.


    However, if this is not an issue for you, I will get it working on my side and help you with the initial question (100 micro seconds delay).

    Best regards,

    Simon

Children
Related