SPRUHX5I August 2014 – May 2024 TMS320F28374S , TMS320F28375S , TMS320F28375S-Q1 , TMS320F28376S , TMS320F28377S , TMS320F28377S-Q1 , TMS320F28378S , TMS320F28379S
Uint16 data;
Uint16 dummy;
SpiaRegs.SPICTL.bit.TALK = 1; // Enable Transmit path
SpiaRegs.SPITXBUF = data; // Master transmits data
while(SpiaRegs.SPISTS.bit.INT_FLAG !=1) {} // Waits until data rx’d
dummy = SpiaRegs.SPIRXBUF; // Clears junk data because
// rx’d same data as tx’d