This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Generating clock to mimic 48kHz sample clock for I2S device

Hi everyone, 

I am working on interfacing the nRF52840DK with a 24-bit mems microphone INMP441 through the I2S peripheral. As multi-sources pointed out that the nRF52840 does not support 32-bit word size. (ie. WS (LRCLK) frame = 64 BCLK pulses wide) and 48kHz sampling.

As the workaround, I configured the nRF52840 as an I2S slave and provided the BCLK (48kHz) and LRCLK(3.125MHz) externally from a signal generator. The I2S works completely fine. 

As moving forward, I have tried to use the PMWs to mimic the BCLK (48kHz) and LRCLK(3.125MHz) by following this GitHub repo: https://github.com/gregtomasch/nRF52_24-bit-_I2S_Microphone_Audio_Recording_Utility. However, the two PMW signals are not in sync and the output is garbled.

As a result, I would like to know is there any alternative that I can generate two in-sync clock signals from PMW or other peripheral?

Many Thanks
Anthony

Parents
  • Sorry for bringing this token up.  Recently, I received a bread-out board of ICS-43434(similar to INMP441, but a newer model from InvenSense). Although it is not perfect, I found out that the workaround is applicable to ICS-43434. It is possible to use PWMs to mimic 48kHz sample clock, the trick is to link up the PWMs with EGU event through PPI, and trigger them by EGU event, just like Sigurd said.

    I think it is because the timing of the clock signal is less tight on ICS-43434, I haven't verified the reason but this workaround works for me. 
    To conclude, this workaround works on ICS-43434 but not on INMP441.

    Sigurd, thanks for your help.

Reply
  • Sorry for bringing this token up.  Recently, I received a bread-out board of ICS-43434(similar to INMP441, but a newer model from InvenSense). Although it is not perfect, I found out that the workaround is applicable to ICS-43434. It is possible to use PWMs to mimic 48kHz sample clock, the trick is to link up the PWMs with EGU event through PPI, and trigger them by EGU event, just like Sigurd said.

    I think it is because the timing of the clock signal is less tight on ICS-43434, I haven't verified the reason but this workaround works for me. 
    To conclude, this workaround works on ICS-43434 but not on INMP441.

    Sigurd, thanks for your help.

Children
No Data
Related