RT1064: Is it possible to use DMA to service two separate SAI buses at the same time?

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

RT1064: Is it possible to use DMA to service two separate SAI buses at the same time?

1,966 次查看
mrecoskie
Contributor III

Hi,

I have tried using the DMA HAL API to service two SAI buses (two separate attached codecs) on the RT1064 however I seem to be running into limitations.  Is it possible to use DMA in this scenario and has anyone successfully made this work?

Regards,

Mark

 

0 项奖励
回复
6 回复数

1,954 次查看
mrecoskie
Contributor III

Hi,

Thank you for the response.  This sample uses the low level DMA API. 
Does it not suffer from the same limitations when used for both SAI1 and SAI2 at the same time?

Mark

 

0 项奖励
回复

1,950 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

You can connect the different SAI interfaces to the available eDMA Channels.
It's important to add the eDMA can only dispatch one at time.

If you have more question don't hesitate to ask me.
Best regards,
Pavel

0 项奖励
回复

1,942 次查看
mrecoskie
Contributor III

Thank you.  Can this be found in the documentation anywhere?

So from my understanding - if I want to achieve different, concurrent audio steams across multiple SAI buses at the same time I should move to an interrupt model.  Is that correct?

0 项奖励
回复

1,918 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello,

The eDMA this post could be help you. Section 2. eDMA Channels - What is and how to configure the eDMA channel link... - NXP Community
You could use a good control of the IRQ. I recommend review this chapter may be help you, 6.4.8 Suspend/resume a DMA channel with active hardware service requests, from the reference manual I add the link below.

i.MX RT1064 Processor Reference Manual (nxp.com)

Best regards,

Pavel

0 项奖励
回复

1,906 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, 

I found this Application Note, maybe would help you.
Using Multi-Channel Feature of SAI (nxp.com)

Best regards,
Pavel

0 项奖励
回复

1,958 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello mrecoskie

The DMA can't dispatcher at the same time, but I suggest check the example from the SDK sai_edma_record_playback, may help you.

Regards,

Pavel_Hernandez

0 项奖励
回复