You are reading a single comment by @mhoneywill and its replies. Click here to read the full conversation.
  • This could be done in software by setting a required pin that you wanted to use for the TXEN when configuring the UART. Then before data was loaded into the UART and its FIFO this TXEN pin could be set. Then by having a simple interrupt handler for the TC (transmit complete) interrupt of the UART you could reset this TXEN pin. If the TXEN bit was not specified or was 0 when the UART was configured then GPIO pin would be toggled.

    This would be nice as no timers would be required, would work no matter what the baud rate and should require very little additional code.

    Note it would be could to be able to specify the state the TXEN pin should be in for Transmit, by default for a MAX485 type 8 pid device TXEN should be high for transmit, and low for recieve. In this case as soon as the UART is configured with TEXN support, the requested TXEN line should be taken low to allow RS485 reception (Which should be the default state)

About

Avatar for mhoneywill @mhoneywill started