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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,011 次查看
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

這是合理的嗎?

标签 (1)
0 项奖励
回复
5 回复数

1,883 次查看
vicentegomez
NXP TechSupport
NXP TechSupport

Can you help us to put your question in English?

Thanks

0 项奖励
回复

1,883 次查看
JeffChang
Contributor III

Hi Vicente,

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

0 项奖励
回复

1,883 次查看
Sabina_Bruce
NXP Employee
NXP Employee

Hello JeffChang

Could you please share the status?

Best Regards,

Sabina

0 项奖励
回复

1,883 次查看
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 项奖励
回复

1,883 次查看
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 项奖励
回复