SPI not working with STM32L476VG Discovery Board?
We are using the STM32L476VG Discovery Board and are trying to use the SPI 1 interface. I generated the code through CubeMX with pins PA5, PE13, PE14, PE15. After the code was generated I tried placing this example code into the while loop:
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_RESET);
HAL_SPI_Transmit(&spi, (uint8_t *)message, strlen(message), HAL_MAX_DELAY);
HAL_GPIO_WritePin(GPIOA, GPIO_PIN_4, GPIO_PIN_SET);
HAL_Delay(10);
I then run the code through TrueStudio Debugger and I can't see a clock signal with an oscilloscope. I have also tried different variations of that above code with Hal_TransmitReceive. Is there any example SPI code meant for the STM32L476VG Discovery Board? Am I missing a step after I generate the code with CubeMX?
Thanks!