Other Parts Discussed in Thread: TMS320F28069, CONTROLSUITE
Hello,
I have a problem with my MCU TMS320F28069PZA (piccolo controlstick). I use it in slave mode and i can only send data just after read it. I don't understand why because SPI work in full duplex so normally i can send data when i want. The master is a PIC, and it work perfectly.
Code example:
while(SpiaRegs.SPISTS.bit.INT_FLAG !=1) { }
test = SpiaRegs.SPIRXBUF&0xFF;//read
SpiaRegs.SPITXBUF='P';/write
while(SpiaRegs.SPISTS.bit.INT_FLAG !=1) { }
test = SpiaRegs.SPIRXBUF&0xFF;//read
That's work but i want to do that:
SpiaRegs.SPITXBUF='P';//write
while(SpiaRegs.SPISTS.bit.INT_FLAG !=1) { }
test = SpiaRegs.SPIRXBUF&0xFF;//read
SpiaRegs.SPITXBUF='O';//write
while(SpiaRegs.SPISTS.bit.INT_FLAG !=1) { }
test = SpiaRegs.SPIRXBUF&0xFF;//read
With this code no data is send.
My question is why the slave don't want to send data every time???
