Skip to main content
Associate
April 29, 2024
Solved

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

  • April 29, 2024
  • 2 replies
  • 1390 views

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

Best answer by PatrickF

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

2 replies

PatrickF
PatrickFBest answer
Technical Moderator
April 29, 2024

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.NEW ! Sidekick STM32 AI agent, see here
csmAuthor
Associate
July 2, 2024

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

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