SDK 2.12.1 - RT1052 SAI (MQS): proper init/de-init flow w/ FreeRTOS?

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

SDK 2.12.1 - RT1052 SAI (MQS): proper init/de-init flow w/ FreeRTOS?

2,034 次查看
variable_andrew
Senior Contributor I

The SAI demo shows how to init the SAI, but not de-init.

I'm wondering if how I'm initializing (or deinitializing) is leading to some system instability, as when the SAI has completed playing a sound clip, and i run my deinit code, the system somehow gets stuck in the `SAI3_TX_IRQHandler` perhaps once in a few hours of use here (so not easy to reproduce) WHILE the code is actually running the deinit routine (EDMA_Deinit), as per:

Screen Shot 2023-01-23 at 1.20.36 PM.png

 

I only run the deinit routine once my clip has completed playing (and this works fine 99.9% of the time...), but it still seems to create instability.

 

Attached is the base source code for my SAI control.

I was deinit'ing the Mclk as well as everything else, but made it only so I would init that once @ system startup in hopes that it'd fix my issue. (It didn't).

Another option is to never de-init, but I thought that I should force the SAI to abort any existing DMA's when I'm done w/ a sound clip, right?

标记 (1)
0 项奖励
回复
3 回复数

1,949 次查看
variable_andrew
Senior Contributor I

anything?

 

0 项奖励
回复

2,013 次查看
variable_andrew
Senior Contributor I

bumping this thread up for help / ideas

0 项奖励
回复

1,973 次查看
variable_andrew
Senior Contributor I

any ideas?

0 项奖励
回复