Using the EVK MIMXRT685 as I2S slave configured as:
A sample capture for the first 2 channels in the following picture (`0x000001FF` on the first channel, and `0x00000200` on the second channel, ...)
The I2S controller is used in interrupt mode configured as follows:
I2S_RxGetDefaultConfig(&s_RxConfig);
s_RxConfig.masterSlave = kI2S_MasterSlaveNormalSlave;
s_RxConfig.mode = kI2S_ModeDspWsShort;
s_RxConfig.leftJust = true;
s_RxConfig.divider = 1;
s_RxConfig.oneChannel = true;
s_RxConfig.dataLength = 32;
s_RxConfig.frameLength = 32;
The problem is that the first channels / slot is skipped.
If I break into the I2S ISR and check the content of `FIFORD` the first data I get is `0x00000200` instead of `0x000001FF`.
Why the first slot / channel is skipped?
Solved! Go to Solution.
This is due to a misconfiguration of the I2S instance on my side.
To read 16-channels we need at least I2S instances (for example I2S4 and I2S5), configured as follows:
s_RxConfig.masterSlave = kI2S_MasterSlaveNormalSlave; s_RxConfig.mode = kI2S_ModeDspWsShort; s_RxConfig.dataLength = 32; s_RxConfig.frameLength = 32 * 16U; s_RxConfig.position = 0; I2S_RxInit(I2S5, &s_RxConfig); I2S_EnableSecondaryChannel(I2S5, kI2S_SecondaryChannel1, false, (64 * 1)); I2S_EnableSecondaryChannel(I2S5, kI2S_SecondaryChannel2, false, (64 * 2)); I2S_EnableSecondaryChannel(I2S5, kI2S_SecondaryChannel3, false, (64 * 3)); s_RxConfig.position = 256; I2S_RxInit(I2S4, &s_RxConfig); I2S_EnableSecondaryChannel(I2S4, kI2S_SecondaryChannel1, false, 256 + (64 * 1)); I2S_EnableSecondaryChannel(I2S4, kI2S_SecondaryChannel2, false, 256 + (64 * 2)); I2S_EnableSecondaryChannel(I2S4, kI2S_SecondaryChannel3, false, 256 + (64 * 3));
To be perfectly honest the user manual is not crystal clear about how and when to use multiple instances and channels pairs.
This is due to a misconfiguration of the I2S instance on my side.
To read 16-channels we need at least I2S instances (for example I2S4 and I2S5), configured as follows:
s_RxConfig.masterSlave = kI2S_MasterSlaveNormalSlave; s_RxConfig.mode = kI2S_ModeDspWsShort; s_RxConfig.dataLength = 32; s_RxConfig.frameLength = 32 * 16U; s_RxConfig.position = 0; I2S_RxInit(I2S5, &s_RxConfig); I2S_EnableSecondaryChannel(I2S5, kI2S_SecondaryChannel1, false, (64 * 1)); I2S_EnableSecondaryChannel(I2S5, kI2S_SecondaryChannel2, false, (64 * 2)); I2S_EnableSecondaryChannel(I2S5, kI2S_SecondaryChannel3, false, (64 * 3)); s_RxConfig.position = 256; I2S_RxInit(I2S4, &s_RxConfig); I2S_EnableSecondaryChannel(I2S4, kI2S_SecondaryChannel1, false, 256 + (64 * 1)); I2S_EnableSecondaryChannel(I2S4, kI2S_SecondaryChannel2, false, 256 + (64 * 2)); I2S_EnableSecondaryChannel(I2S4, kI2S_SecondaryChannel3, false, 256 + (64 * 3));
To be perfectly honest the user manual is not crystal clear about how and when to use multiple instances and channels pairs.
Hello @carlocaione ,
I'm looking into this issue, and I'll respond you as soon as possible. In the meantime, can you provide me information about what example of the SDK you're using and in which version you're working with?
BR,
Habib.