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.

UART2 RTS manual control

Other Parts Discussed in Thread: TMS320DM355

Hello,

 

Wondering if I can manually control the RTS output state rather than setting auto flow control.  I've got more than 14 bytes that need to be transfered and want to wait manually until I have received everything, then in my slot hit the rts and transmit.

This is for a two-wire, half-duplex RS-485 implementation.

 

Thanks for any help.

  • MikeP said:

    Wondering if I can manually control the RTS output state rather than setting auto flow control.

    I believe this is possible.  The TMS320DM355 ARM Subsystem Reference Guide (SPRUFB3) in Table 9-7 shows the pin multiplexing mode that would allow GIO[22] to be used rather than UART2_RTS.  If you manually controlled GIO[22], you would likely get the result you are looking for.

  • Brandon,

     

    I guess I didn't say, but I'm actually using a DM357 so the pinmux isn't an option.  However, by disabling the autoflow and manually enabling and disabling rts, I am able to toggle the rts line manually.

     

    However, I have another issue with this that I'm looking for some advice on.  There is an interrupt saying when the TX FIFO is empty, but not when the TX shift register is empty, so it makes it a little more difficult to know when to let the RTS line go.  There is a bit available in the register that says when the FIFO and shift register are empty, but not an interrupt.

     

    Any suggestion on how to best implement a solution that will let the RTS line go when the shift register is empty other than sit around and wait for the shift empty bit to toggle after the FIFO empty interrupt?  Also, I'm guessing the shift register is 8 bits is this assumption correct?  I was unable to find that information in the datasheet.  If I know the size of the shift register and my transmission speed, I can probably figure something else out.

     

    Please let me know you thoughts.

  • MikeP said:

    However, I have another issue with this that I'm looking for some advice on.  There is an interrupt saying when the TX FIFO is empty, but not when the TX shift register is empty, so it makes it a little more difficult to know when to let the RTS line go.  There is a bit available in the register that says when the FIFO and shift register are empty, but not an interrupt.

    Any suggestion on how to best implement a solution that will let the RTS line go when the shift register is empty other than sit around and wait for the shift empty bit to toggle after the FIFO empty interrupt?  Also, I'm guessing the shift register is 8 bits is this assumption correct?  I was unable to find that information in the datasheet.  If I know the size of the shift register and my transmission speed, I can probably figure something else out.

    I don't see another way to get an interrupt based on the transmitter empty flag.  Therefore, you may need to poll this bit.

    For data, the shift register is 8 bits.  But you might need to factor in the start bit, parity bit (if enabled), and the number of stop bits configured which could be 1, 1.5 or 2.