Hi - I have a new board with very minimal parts other than a STM32L451VET6 micro and a SPI LCD.
I have implemented SPI and the micro is sending data when I single step the program. When I just let it run it Sends exactly three and one half bytes... every time. I am using the following code :
HAL_GPIO_WritePin(DISP_CS_GPIO_Port, DISP_CS_Pin, GPIO_PIN_RESET); // set CS low
HAL_SPI_Transmit(&hspi1, (uint8_t *)&spi_init_cmds_new, 18, 100); // write init data to display
HAL_GPIO_WritePin(DISP_CS_GPIO_Port, DISP_CS_Pin, GPIO_PIN_SET); // set CS high
it seems like some sort of timing issue because it will single step and send two bytes at a time with CS toggling between them as it should. It setup for Master transmit only since my display doesn't have a read function.
I set the internal clock (MSI RC ) to 8000 with a SPI prescaler of 128 for a baud of 62.5kbits. Here is the SPI config :

for testing I added a HAL_Delay(500); line right after the SPI write and when single stepping it locked up on that line...
Any ideas are appreciated !!
Thanks