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.
Hello
i am trying to implement a RS485 Interface with an MSP430 using the eUSCI modul and a RS485 tranciever.
There i noticed a unexpected behavior by the UCTXCPT Flag/Interrupt and also some weird wording in the MSP430i20xx User Guide. (SLAU335A Revised September 2020)
1) the wording issue in the user guide:
Under "10.4.11 UCAxIFG Register" in Table 10-18
the Discription for the "UCTXCPTIFG" is as follows:
"Transmit ready interrupt enable. UCTXRDYIFG is set when the entire byte in the
internal shift register got shifted out and UCAxTXBUF is empty."
Am i correct in the assumption, that it should read: "Transmit complete interrupt flag. UCTXCPTIFG is set....." ?
2) the unexpectet behavior:
i am trying to implement a RS485 Interface with an MSP430 using the eUSCI modul and a RS485 tranciever.
the transciever can be switched into with Pin P1.1 into recieve(Low) or transmit(High) Mode.
Currently i am using the UCTXIFG Flag/Interrupt to call a fuction, that loads the Data into the UCAxTXBUF.
After the Last byte of data was loaded into UCAxTXBUF, the Interrupt enable get's changed from UCTXIE to UCTXCPTIE.
The Intention being, that the next interrupt by the eUSCI module is that "Transmitt Complete interrupt." That interrupt is supposed to be set, when the UART has alredy send the complete Byte.
The interrupt will then deactivate the RS485 transciever (P1.1 = Low) and then set itself back to UCRXIE, where the MSP will wait for the next recieved message.
Howerver i have noticed, that the UCTXIFG is set way to early. Therefore the P1.1 is set to aerly as well, causing the last Byte to be send, to be nearly completly missing
Is this a known hardware bug? or is my unterstanding of that perticular flag wrong?
If necessary i can provide the simpler code later as well
Thank you for your time,
Kind regards MN.
**Attention** This is a public forum