cancel
Showing results for 
Search instead for 
Did you mean: 

SAI can't work in M4 in stm32mp157,when A7 is running.

csm
Associate

hi,

I use SAI interface for reading data  by M4 core in stm32mp157

Only  in debug M4 mode(M4 is running and A7 isn't running),the read can success.

When A7 core is running, the read will be failed(A7 is running ,but SAI is used by M4).

 

when a7 is running.

Using HAL_SAI_Receive , time out will bu return .

Using HAL_SAI_Receive_DMA ,busy will be return .

csm_0-1714369714257.png

in device tree ,sai is disable

1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

Hi @csm 

have you adapted the Device Tree to tell Linux that SAI is handled by Cortex-M4 and SAI related clocks should be enabled ?
Please have a look to

https://wiki.st.com/stm32mpu/wiki/How_to_configure_system_resources#Configuring_clock_and_regulator_system_resources

 

Regards

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

2 REPLIES 2
PatrickF
ST Employee

Hi @csm 

have you adapted the Device Tree to tell Linux that SAI is handled by Cortex-M4 and SAI related clocks should be enabled ?
Please have a look to

https://wiki.st.com/stm32mpu/wiki/How_to_configure_system_resources#Configuring_clock_and_regulator_system_resources

 

Regards

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
csm
Associate

Apart from this reason  PatrickF mentioned, there is another reason。

Device tree use one of SAI  pins as other functions ,that I ignored 。