Other Parts Discussed in Thread: AM3359
Hi, I have SPI code running on the AM3359 configured as a master, and I am trying to use the TXS bit to check when a word has been sent, and the Tx register is ready for a new word. When I run my code, the following is observed:
1) After enabling the SPI channel, CH0STAT=0x02 (TXS=1)
2) After loading my first word into the TX0 register, CH0STAT=0x07 (EOT, TXS, RXS =1) and the word gets sent
3) After loading my second word into the TX0 register, CH0STAT = 0x05 (EOT, RXS=1 and TXS=0). TXS NEVER goes back to "1" state. Word doesn't get sent
From this point on, TXS never goes to 1 and my code is hung waiting for the transmission to complete. I am looking for the TXS bit to go to 1 to indicate the word has been send. Am I not using this correctly? (If I base my new load on the EOT bit, no data is transmitted and the TX0 register always has the 2nd value, never an updated value). I verified the channel is enabled throughout this whole process. If I disable/enable the channel using CH0CTRL bit 0, the TXS bit gets reset back to 1 and I can repeat steps 1-3.
Just to add, if I disable the SPI after waiting a while after loading TX0 then reenable before transmission, I can get all my data to go, but this is very inefficient. I would like to just use the bits for what they were designed for.
Thanks.