Question
stm32cubeMx generate LL init function void MX_SPI2_Init(void) but th e function is not correct in slave mode.
first line in function MX_SPI2_Init()
LL_SPI_InitTypeDef SPI_InitStruct; is not filled with zero's
and baudrate is not set for slave mode.
But in in funtion LL_SPI_Init baurate is filled in an the destruct SPI CR1 register.
I have there fore init the struct to zero and then there is no moer problem
LL_SPI_InitTypeDef SPI_InitStruct = {0};