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.

RM46L852: UART -> HALF DUPLEX

Part Number: RM46L852

Hello,

I have a question about setting UART up as half duplex.


Do you know if it is possible to achieve that via Hercules MCU controller or do I need to have an extern driver?

It is not specified in examples sections, but shouldn't TX be configured as OUTPUT, while RX as INPUT, or so to say like in the image:

Also, what is "OPEN DRAIN" checkbox used for?

Thanks,
Nemanja

  • Hello Nemanja,
    TX DIR and RX DIR bits are valid only when pin is configured as GIO (SCIPIO1 register). In SCI functional mode TX FUNC and RX FUNC bits defines SCI TX and SCI RX pins (SCIPIO0 register). Please, refer to Chapter 29 of device TRM: www.ti.com/.../spnu514c.pdf .
    You can set one pin as functional and other as GIO.
    Open drain capability is possible only when corresponding pin is set as GIO and output. Table 29-29 of device TRM describes how to enable Open drain capability.

    Best regards,
    Miro
  • Thank you for the answer, Miro.

    This does not clarify for me if it is possible to set it up as Half Duplex or not, though.

    Is it possible to do this:

    (1) Short TX and RX;
    (2) Connect shorted TX & RX to device that uses Half Duplex UART via single wire;
    (2) When using TX block RX. (if so, how);
    (3) When using RX block TX. (I presume the same way as point 3).

    Let's say that I am able to know when the device will talk back. It will talk back after receiving the information. So, after I use TX, I need to use RX immediately and block TX.

    I would like to do this without any extra chip. Should I use resistors to limit the current?

    Thanks,
    Nemanja
  • Hello Nemanja,

    (1) Short TX and RX, and connect shorted TX & RX to device that uses Half Duplex UART via single wire;
    (2) When using TX block RX. (if so, how);
    Disable the RX by clearing RXENA bit in SCIGCR1 register

    (3) When using RX block TX. (I presume the same way as point 3).
    Disable the RX by clearing TXENA bit in SCIGCR1 register
  • Thank you, QJ Wang!