HAL_SPI_Transmit times out
I have STM32CubeIDE Version: 1.12.0 and a STM32MP157F evaluation board.
Created a M4 project and assigned SPI1 to it, generated the code.
I then created a function to read a register:
const uint16_t opcode = 0xe000;
uint8_t value = 0;
HAL_GPIO_WritePin(GPIOZ, GPIO_PIN_3, GPIO_PIN_RESET);
HAL_SPI_Transmit(&hspi1, &opcode, 2, 100);
HAL_SPI_Receive(&hspi1, &value, 1, 100);
HAL_GPIO_WritePin(GPIOZ, GPIO_PIN_3, GPIO_PIN_SET);
It always fails in HAL_SPI_Transmit at SPI_WaitOnFlagUntilTimeout.
Any ideas on why?
