cancel
Showing results for 
Search instead for 
Did you mean: 

External SPI Flash Clock not being set for M4, Zephyr driver

Simon33rd
Associate

Hi All,

I've had the external SPI Flash driver working on the STM32H745_M7, using Zephyr SDK 4.0.0.

But when I setup it up on the M4 side the driver initialization is failing with error:

[1;31m<err> spi_ll_stm32: Could not select SPI domain clock

Further investigation shows that stm32_clock_control_configure(), is called from spi_stm32_init(), and fails to setup the clock path.  In particular it is seeing that PLL_Q clock is not enabled.  PLL 1 is setup on the M7 side and it doesn't look like I should be enabling it again in the M4's device tree again.

How do I get the correct clock path setup for the SPI driver on the M4 side? I need to run the external SPI flash from the M4.

 

Thanks,

Simon

2 REPLIES 2
Sarra.S
ST Employee

Hello @Simon33rd, Could you share the dts for the M4 side?

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.

Simon33rd
Associate

Hi Sarra,

My board .dts settings and the resulting build zephyr.dts attached.

I did also try and use PLL3 given that PLL1 is setup on the M7 side, but I still get the same error.

by the way what is  < &rcc 0x9 0xec50 > doing? I can see the first part is enabling SPI123 clock.

 

 

clocks = < &rcc 0xf0 0x1000 >, < &rcc 0x9 0xec50 >;