2151986_en-US

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

2151986_en-US

2151986_en-US

evkbmimxrt1170_sai_edma sai1 multi channel application

 Hi experts

 I'm using demo evkbmimxrt1170_sai_edma_record_playback_cm7, and I'm using this API

status_t SAI_TransferReceiveLoopEDMA(I2S_Type *base,

sai_edma_handle_t *handle,

sai_transfer_t *xfer,

uint32_t loopTransferCount)


I want to change SAI1 it to 4 rx like this :

starwarrior_0-1755142259460.png

How could I use SAI_TransferReceiveLoopEDMA to receive 4  rx?

Thanks

Re: evkbmimxrt1170_sai_edma sai1 multi channel application

Hi @starwarrior ,


Seems you didn't enable the fifo combined mode for SAI multi channels, so the result was not as expected, and we provide such demo within the RT1170EVKB SDK package, but it requires CS42448 Audio board as well. Please kindly refer to that demo for details.

Kan_Li_0-1756694668998.png


Hope that helps,


Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------


Re: evkbmimxrt1170_sai_edma sai1 multi channel application

Hi Kan

Here is the project I changed "evkmimxrt1170_sai_edma_record_playback_cm7" running on 

MIMXRT1170-EVK. 

It can only receive rx0,.  rx1、2  will pull the signal down to about 0.5V. rx4 didn't pull it down ,but neither can it receive the right data , only receive zero

Could you please help to test it ? 

Thanks

Re: evkbmimxrt1170_sai_edma sai1 multi channel application

Hi Kan

Still the example evkmimxrt1170evm_sai_edma_record_playback_cm7, which use API  SAI_TransferReceiveEDMA(DEMO_SAI, &rxHandle, &xfer)).After changing it to multichannel like this:

SAI_GetClassicI2SConfig(&saiConfig, DEMO_AUDIO_BIT_WIDTH, kSAI_Stereo, (1U << DEMO_SAI_CHANNEL)|(1U << DEMO_SAI_CHANNEL1));

saiConfig.syncMode = DEMO_SAI_RX_SYNC_MODE;

saiConfig.bitClock.bclkPolarity = DEMO_SAI_TX_BIT_CLOCK_POLARITY;

saiConfig.masterSlave = DEMO_SAI_MASTER_SLAVE;

saiConfig.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnRead;

SAI_TransferRxSetConfigEDMA(DEMO_SAI, &rxHandle, &saiConfig);


It will not able to enter into the rx_callback. Can you possibly try to test it?

Thanks

Re: evkbmimxrt1170_sai_edma sai1 multi channel application

Hi @starwarrior ,


Please use the following API instead. 

Kan_Li_0-1755247313713.png


Hope that helps,


Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------


Re: evkbmimxrt1170_sai_edma sai1 multi channel application

Hi Kan

 Thanks for the quick reply. I have already used this API like this

SAI_GetClassicI2SConfig(&saiConfig, DEMO_AUDIO_BIT_WIDTH, kSAI_Stereo, (1U << DEMO_SAI_CHANNEL)|(1U << DEMO_SAI_CHANNEL1));

saiConfig.syncMode = DEMO_SAI_TX_SYNC_MODE;

saiConfig.bitClock.bclkPolarity = DEMO_SAI_TX_BIT_CLOCK_POLARITY;

saiConfig.masterSlave = DEMO_SAI_MASTER_SLAVE;

saiConfig.syncMode = DEMO_SAI_RX_SYNC_MODE;

saiConfig.fifo.fifoCombine = kSAI_FifoCombineModeEnabledOnRead;

SAI_TransferRxSetConfigEDMA(DEMO_SAI, &rxHandle, &saiConfig);


And now I need to use SAI_TransferReceiveLoopEDMA to receive both audio. It looks like this API do not support multichannel ,anything I need to change?

Best Regards

Nick

Re: evkbmimxrt1170_sai_edma sai1 multi channel application

Hi @starwarrior ,


We provide docs on how to configure the SAI DMA driver to support multiple SAI channels, please kindly refer to https://mcuxpresso.nxp.com/mcuxsdk/25.06.00/html/drivers/RT/RT1170/MIMXRT1176/index.html#sai-edma-dr... for details.

Kan_Li_0-1755158914549.png


Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------


标记 (1)
无评分
版本历史
最后更新:
‎11-20-2025 02:55 PM
更新人: