SPI clock polarity in the STM32H7 Cube library, HAL vs LL [SOLVED]
Dear experts,
I'm having a weird issue with SPI initialization on STM32H743/753 .
The device connected to the SPI master needs HIGH clock polarity (CPOL). So we clicked this in CubeMX, and the generated code indeed has "hspi1.Init.CLKPolarity = SPI_POLARITY_HIGH" and it works.
Then we switched to LL for the SPI. The LL variant is obviosly
" SPI_InitStruct.ClockPolarity = LL_SPI_POLARITY_HIGH;"
But now it fails, and works if we change it to LL_SPI_POLARITY_LOW!
Has anybody seen this behavior? H7 HAL library v 1.9.0
