Andreas Schwarz <andrea...@web.de> writes:

> According to TI (http://www-s.ti.com/sc/psheets/slau049b/slau049b.pdf,
> page 278) it is necessary to test TXEPT:
> | Note: Writing to UxTXBUF
> | Writing data to the transmit-data buffer must only be done if buffer
> | UxTXBUF is empty; otherwise, an unpredictable character can be
> | transmitted.

That note says nothing about TXEPT.

> I'm talking to a MMC in SPI-Mode, and if I don't check TXEPT (or
> alternatively URXIFG0) it doesn't work reliably!

It's actually pretty simple: UTXIFG gets set when UTXBUF becomes
empty, i.e. when the data has moved from UTXBUF to the transmitter
shift register and starts to shift out on the output pin. TXEPT is set
when UTXBUF *and* the transmitter shift register are empty, i.e. after
the last bit of the data has been shifted out (and no new data has
been written to UTXBUF).

Best wishes,
-- 
Daniel Néri
Sigicom AB, Sweden


Reply via email to