SPRUJ53B April 2024 – September 2024 TMS320F28P550SJ , TMS320F28P559SJ-Q1
Uint16 rdata;
Uint16 dummy;
SpiaRegs.SPICTL.bit.TALK = 0; // Disable Transmit path
SpiaRegs.SPITXBUF = dummy; // Send dummy to start tx
// NOTE: because TALK = 0, data does not tx onto SPIPICOA pin
while(SpiaRegs.SPISTS.bit.INT_FLAG !=1) {} // Wait until data received
rdata = SpiaRegs.SPIRXBUF; // Controller reads data