i.MX RT1020 如何正確設定做到 I2S Slave?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX RT1020 如何正確設定做到 I2S Slave?

1,602 Views
Alex_Tsai
Contributor II

我有一需求,只需要 1 slave I2S,BCLK, Frame sync都是 external

不過若照SDK 2.7.0 的設置

SAI_GetClassicI2SConfig(&config, kSAI_WordWidth32bits, kSAI_Stereo, kSAI_Channel0Mask);
config.masterSlave = kSAI_Slave;
SAI_TransferRxSetConfigEDMA(SAI_RX, &saiRxHandle, &config);

是無法正常動作的

進一步查看SDK內 fsl_i2s的設置,發現當為Slave時,並沒有針對BCP做設定,這也將造成接收到的音樂資料是錯誤的

pastedImage_1.png

這是合理的嗎?

Labels (1)
0 Kudos
5 Replies

1,474 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Can you help us to put your question in English?

Thanks

0 Kudos

1,474 Views
JeffChang
Contributor III

Hi Vicente,

I had contact to him to check customer question.  It's seem audio format setting issue. 

0 Kudos

1,474 Views
Sabina_Bruce
NXP Employee
NXP Employee

Hello JeffChang

Could you please share the status?

Best Regards,

Sabina

0 Kudos

1,474 Views
JeffChang
Contributor III

Dear Sabina,

RD used old SDK SAI_RxInit() to solve this question.  RD suggest to have SAI_RX and SAI_TX driver sample code for reference. 

When in slave mode,  sample code have not set BCP bit. This will cause the received music data is wrong.

0 Kudos

1,474 Views
Alex_Tsai
Contributor II

How to set the I2S can do Slave mode?

I just need one I2S run in Slave mode, and BCLK, Frame Sync all from external.

However, if reference as SDK 2.7.0,  is not normally operated.

SAI_GetClassicI2SConfig(&config, kSAI_WordWidth32bits, kSAI_Stereo, kSAI_Channel0Mask);
config.masterSlave = kSAI_Slave;
SAI_TransferRxSetConfigEDMA(SAI_RX, &saiRxHandle, &config);

Trace method of fsl_i2s. (ref. above FIG.)

When in Slave mode, and do not set for BCP. This will cause the received music data is wrong.

It is reasonable?

0 Kudos