This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P4111: Tx Complete Interrupt Flag Behavior

Part Number: MSP432P4111

I have a colleague who's working with us on the UART communications, and he's got some questions regarding the behavior of the transmit complete interrupt flag, in particular how it works with the DMA. 

To quote his question:

The manual states that the interrupt is generated when the TXBUF is empty and the shift register has transmitted the last bit (i.e. transmission has started and now the TXBUF and shift register are empty). That suggests to me that in DMA mode, the DMA should be able to file the TXBUF with the next character before the shift register has emptied. In practice, I still had to loop on UART_BUSY to get the RS485 to work. So I'd take any info available, examples, DMA interaction, tips on usage, etc...

Can someone provide some insight that would help answer his question?

Thanks.

  • Hello Blt_Banger,

    You are very close with your assumption.  According to the users guide, it appears the DMA is gated by the UCTXIFG flag, which in turn is set only after the transmit shift register is empty and the byte waiting in the UCAxTXBUF register is moved into the transmit shift register on the next BITCLK.

    I'm not sure why to you this suggests the DMA can transfer data into the UCAxTXBUF any sooner than that.  If this is your question then based on this information in the user's guide I don't believe it is possible.

    Are you not able to get the DMA to work properly with the eUSCI_A module?

  • >  the interrupt is generated when the TXBUF is empty and the shift register has transmitted the last bit

    This describes the UCTXCPTIFG, which is the one you would use for RS485 to de-activate the transmitter. [Ref TRM (SLAU356I) Tables 24-18 and 24-6]

    The DMA is triggered  by UCTXIFG, which is the one you would use to load a new byte for transmission. It indicates that the holding register is empty, but doesn't in itself mean that the shift register is empty. [Ref TRM Sec 24.3.16 and 24.3.15.1]

    That said: Erratum USCI42 makes UCTXCPTIFG fairly tricky to use. [Ref Errata sheet (SLAZ697F) p. 4] You may want to stick to polling UCBUSY.

  • Hello Blt_Banger,

    Thanks Bruce for pointing to the formula.

    I believe this information should point you in the right direction.
    If this isn’t the case, please click the "This did NOT resolve my issue" button and reply to this thread with more information.
    If this thread locks, please click the "Ask a related question" button and in the new thread describe the current status of your issue and any additional details you may have to assist us in helping to solve your issues.

**Attention** This is a public forum