I have a question about the SPI on the F28027 in master mode.
I'd like to the software to control the Slave Select instead of relying on the SPISTE.
In order to control the Slave Select, I have to wait for the SPI to finish transmitting.
I'm just wondering how to actually know when transmission has finished?
I've looked through the TMS320x2802x, 2803x Piccolo Serial Peripheral
Interface (SPI).
I've tried polling the SPISTS register, particularly the SPI INT FLAG bit (bit 6).
I thought it went high once it finished transmitting.
I've also tried reading the SPISTEA line of GPIO19.
Here is a snippet of the coded I've tried to transmit and wait for it to finish transmitting.
However it just hangs.
Could some one let me know how to wait for the SPI to finish transmitting?
The commented out while loops are different ways I've attempted to wait
GPIO_setLow(myGpio, GPIO_Number_0);
SPI_write(mySpi, 0xA5 << 8);
SPI_write(mySpi, 0x5A << 8);
// Wait until data is tx
//while (SpiaRegs.SPISTS.bit.BUFFULL_FLAG !=0);
while (SpiaRegs.SPISTS.bit.INT_FLAG == 0);
//while(!GpioDataRegs.GPADAT.bit.GPIO19);
GPIO_setHigh(myGpio, GPIO_Number_0);