2022-01-16 09:56 AM
I am enabling SPI1 controller and selecting PLL3Q as its kernel clock source on CubeMX. But automatic code is not generated for it.
It looks like #DEFINES for SPI1 do not exist in stm32mp1-clksrc.h, while they do exist for other SPI controllers.
2022-01-17 12:15 AM
Hi @BAdam.2 ,
in Cortex-M4 project, you should see SPI1 clock init in HAL_SPI_MspInit(), only used in Development Mode (i.e. without Linux).
In Linux DT, you should see CLK_SPI2S1_PLL3Q line in stm32mp157f-yourproject-mx-u-boot.dtsi
please check you have :
&m4_spi1{
...
status = "okay";
}
in stm32mp157f-yourproject-mx.dts
but also that you don't have any &spi1 node status = "okay" (as SPI1 must not be enabled for Linux if assigned to M4)
Check also that pll3 is correctly defined in DT.
Usually, this work out of the box with CubeMx generated DT.
Regards.