How to play a tone cyclically through SAI channel

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

How to play a tone cyclically through SAI channel

960件の閲覧回数
BlackTurbo
Contributor III

Hi, I have a question about how to cyclically play a tone wav through SAI channel. Currently I'm using a RT1062 for my GUI application, one of the tone requirement is to play a beep sound continuousely once I keep a button pressed. But I don't know how to cyclically play the beep. Could someone help with it?

Thanks.

@markruthenbeck 

0 件の賞賛
返信
3 返答(返信)

955件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @BlackTurbo 

   Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

   If you want to cyclically play a tone wav, you can use the timer, when the time is reach, then you can trigger the SAI transfer.

   About the SAI transfer code, you can refer to the RT SDK:

SDK_2_10_0_EVK-MIMXRT1060\boards\evkmimxrt1060\driver_examples\sai\edma_transfer

 

Wish it helps you!

Best Regards,

Kerry

0 件の賞賛
返信

953件の閲覧回数
BlackTurbo
Contributor III

Is the Scatter/gather feature (through eDMA TCD config) applied for this application?

0 件の賞賛
返信

939件の閲覧回数
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @BlackTurbo ,

   Why you need to use the scatter/gather function?

   From the DMA scatter/gather function, you can see:

Scatter/gather is the process of automatically loading a new TCD into a channel. It allows
a DMA channel to use multiple TCDs; this enables a DMA channel to scatter the DMA
data to multiple destinations or gather it from multiple sources.

   But to you, your destination is the same SAI data buffer, not the multiple destination.

  So, you can refer to the SDK DMA SAI code, and transfer your SAI data, then in the other time(you can use timer to define your needed time), periodically send the data.

 

Wish it helps you!

Best Regards,

Kerry

0 件の賞賛
返信