SPI Halfduplex Problem

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
Hi all ,
I try to read the values of an angle sensor via the SPI bus. ( Infineon TLE 5012)
With only one data line the Chip must be driven in half-duplex mode.
Problem: The Data pin is not tristate in receive Mode( Input Mode ) , no reception is in the RX Buffer?
Does anyone have experience with half-duplex mode?

Her my attemt :

SPI001_WriteData(&SPI001_Handle0,&SendData,SPI001_STANDARD_HPC_OUTPUTMODE );
SPI001_WriteData(&SPI001_Handle0,&data_rx,SPI001_STANDARD_HPC_INPUTMODE );
while((SPI001_GetFlagStatus(&SPI001_Handle0,\
SPI001_FIFO_STD_RECV_BUF_FLAG))!=SPI001_SET)
{}
SPI001_ReadData(&SPI001_Handle0,&ReadData0);
SPI001_WriteData(&SPI001_Handle0,&data_rx,SPI001_STANDARD_HPC_INPUTMODE );
while((SPI001_GetFlagStatus(&SPI001_Handle0,\
SPI001_FIFO_STD_RECV_BUF_FLAG))!=SPI001_SET)
{}

SPI001_ReadData(&SPI001_Handle0,&ReadData1);

Thank you for support
0 Likes
0 Replies