Question
SPI clock polarity initalization in STM32 Cube L0
Posted on June 18, 2014 at 10:07
I have a project based on the example found in
STM32Cube_FW_L0_V1.0.0\Projects\STM32L053R8-Nucleo\Examples\SPI\SPI_FullDuplex_ComIT I have changed the initialization of SpiHandle.Init.CLKPolarity to SPI_POLARITY_LOW in the call to HAL_SPI_Init. However it seems like the logic level of the clock stays high until I send the first byte of data on the SPI. After the first byte is sent the clock stays low and so on for the following bytes. Are not the setting of low clock polarity supposed to keep the clock line low when in idle state? I think that this would be the correct state after the init call. Or am I missing some additional initalization to do when using low clock polarity? #spi #stm32l0