Other Parts Discussed in Thread: DAC8555
I'm trying to use an F28335 to control a DAC8555. The DAC expects 24-bit long commands, so I plan to transmit 3 8-bit characters in sequence. AFAIU, the SPISTE line would go up after each character, so I have to control the line manually through GPIO19. To do that I need to know when the SPIDAT has completed transmitting the last bit of the 3rd character. My plan is as follow:
- Set SPISTE to low
- Write the 3 characters to SPITXBUF
- Check TXFFST till it reads 0
- Wait for SPIINT flag
- Read SPIRXBUF to clear SPIINT
- Set SPISTE to high
For some reason I don't understand, the SPIINT flag never gets set. For now I just calculate how long it takes to transmit 8 bits at the right bit rate and use DELAY_US after TXFFST reached 0 but it's a hack. Is my logic correct? Am I missing something obvious?
Thanks!