[00:06:49.411,024] <inf> i2s_nrfx: I2S MCK frequency: 256000, actual PCM rate: 8000
Hi,
On nRF54L15, the master clock (MCK) is generated by a frequency generator based on the MCKFREQ register and the sample rate (LRCK) is then derived as LRCK = MCK / RATIO.
Your log shows the I2S driver is currently selecting MCK=256 kHz with LRCK=8 kHz, which implies a 32x ratio. That is why the codec (which expects ~4 MHz MCK) does not match. If the codec requires ~4 MHz MCK, the I2S clocks should be configured for RATIO=512x so that at 8 kHz sample rate you get MCK = 8 kHz Ă— 512 = 4.096 MHz.
So if you want to get a higher MCK (~4 MHz), you should switch to using the nrfx_i2s driver directly. In nrfx_i2s, you can explicitly set:
Hopefully it should work. Best Regards,
Syed Maysum
One of another issue related to i2c communicatrion-
Initially the I2C communication works correctly, but after next debugg it starts failing with error -5 (I/O error) again another debugg it would be work correct again it will fail - I am confused with thi bug
Hi Sharon,
Thanks for your feedback. Just thinking if you are able to solve your request regarding higher MCK and it would be great if we could discuss issues one by one to avoid any confusion. So please correct me if I am wrong that according to your latest update there are 2 main issues. First you want to set the MCK to around 4 MHz and secondly you are getting -eagain error and error -5 errors both?
Could you please also share the output log around these errors (with logging enabled for the I2S driver), so we can see exactly where they occur?
Best Regards,
Syed Maysum
sure