1842451_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

1842451_en-US

1842451_en-US

1-slot delay when using I2S with DSP/TDM mode

Using the EVK MIMXRT685 as I2S slave configured as:

  • TDM / DSP mode A (mono)
  • 16 slots (channels) per frame
  • 512 SCK per frame
  • 32 SCK per slot
  • 24 bits of audio data per slot, left aligned (but I'm sampling 32-bits)
  • WS pulsed for one SCK time
  • Data sampled on WS rising edge

A sample capture for the first 2 channels in the following picture (`0x000001FF` on the first channel, and `0x00000200` on the second channel, ...)

Screenshot 2024-04-08 at 14.58.45.png

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?

i.MXRT 600Re: 1-slot delay when using I2S with DSP/TDM mode

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.

Re: 1-slot delay when using I2S with DSP/TDM mode

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.

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 04:19 PM
更新者: