How to receive SPI in Half-duplex-Mode?
Hallo,
i dont unterstand how i can receive data in Spi Half-Duplex-Mode.
My used Controller is STM32F446RET.
STM32CubeMX is configured as follow
Thats my Code:
HAL_GPIO_WritePin(CS_GPIOxLib, CS_GPIO_PinLib, GPIO_PIN_RESET);
status = HAL_SPI_Transmit(hspiLib, (uint8_t*)®ister_Address_calculation, 1, 10000);
status = HAL_SPI_Receive(hspiLib, (uint8_t*)Value, 1, 10000);
if(status != HAL_OK)
{
Error_Handler();
}
HAL_GPIO_WritePin(CS_GPIOxLib, CS_GPIO_PinLib, GPIO_PIN_SET);A Logic Analyser shows that there are same Errors on the SPI when i try to receive.

But when i changed
hspi3.Init.Direction = SPI_DIRECTION_1LINE;to
hspi3.Init.Direction = SPI_DIRECTION_2LINES;the SPI looks better:

Is this wrong implemented by STM32Cube?
When i changed my Code back to
hspi3.Init.Direction = SPI_DIRECTION_1LINE;&
HAL_GPIO_WritePin(CS_GPIOxLib, CS_GPIO_PinLib, GPIO_PIN_RESET);
status = HAL_SPI_TransmitReceive(hspiLib, (uint8_t*)®ister_Address_calculation, (uint8_t*)Value, 1, 10000);
if(status != HAL_OK)
{
Error_Handler();
}
HAL_GPIO_WritePin(CS_GPIOxLib, CS_GPIO_PinLib, GPIO_PIN_SET);the Function HAL_SPI_TransmitReceive goes in TIMEOUT.
When i changed SPI Direction to
hspi3.Init.Direction = SPI_DIRECTION_2LINES;i can see, that STM32 dont spend clocks for receive

Is there anything wrong in my code?
Is there an example code?
