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.

AFE881H1: Hart modem baud rate

Part Number: AFE881H1

The new question is, how do I configure the TI Hart modem to communicate at 1200 baud on the UART?

Here are the steps that I am currently trying:

1. set the REG_MODE bit in register UBM to 1

2. set the HART_EN bit in register MODEM_CFG to 1

3. set the UART_BAUD bit in register MODEM to 0

My incoming Hart messages are still using 9600 baud on the UART.

What am I missing?

Thank you.

  • Hi,

    Are you looking to use UART Break Mode at 1200 baud or SPI+UART mode at 1200 baud to communicate with the modem?

    UART Break Mode (UBM) uses UART with break characters to set all registers and HART.
    SPI+UART mode uses SPI for registers, but UART for the HART FIFO.

    Thanks,
    Lucas

  • John,

    In UART Break Mode, the UART data is always received and transmitted at 9600 baud. If there is HART information, it is also transmitted using 9600 baud with UART breaks. If you want to set the device to 1200 baud for the UART, you would need to use the SPI to communicate with the registers.

    Joseph Wu

  • I want to use UART Break Mode to set the registers during my initialization sequence.

         - register 0x16 is first set to 0x0001 (UBM mode).

         - register 0x0E is set to 0x0048 (TxAmp set to 500mv and Hart Enable).

         - the UART_BAUD bit in register 0x02 is set to 0

    Then I want use 1200 baud for the Hart messages.

    I do not have an SPI connection.

  • Do you have any thoughts on how to handle the 32-byte limit on the FIFO size?

    There are some standard Hart messages that are more than 32 bytes in size.

  • John,


    I'll post here even though we had a conference call. For this last post, generally we can use UBM in 9600 baud for all communication including register read and writes. With the FIFO, the MODEM STATUS has several bits that can be monitored (or used to set an alarm) to indicate the number of elements in the FIFO. These flags can indicate the FIFO is full, empty, or some level in between that you can set. There are also registers that can you can read to determine the level of the FIFO.

    In that case you would read out the FIFO until it's empty and then start reading again once it is full again.

    I did come up with an alternative to using a GPIO to bit-bang a UART break. Can your micro easily reset the UART baud rate? If so, you could fake the UART break by setting the baud to a lower rate. Then, you could send in a 0 character to mimic a break. When you finished, then you could reset the baud rate to 9600 and resume communication.

    Regardless, I'm sure we'll have some further discussion on this device.

    Joseph Wu

  • John,


    I did get hold of the digital designer this afternoon. He says that if you set the UBM mode and enable HART, you can then set the UART to 1200 baud, and that should get the device to act as a HART to UART pass through. However, because there is some formatting done by the device, there is approximately a one character latency in the transmmission. This is about 11 bit times.

    Because of this, there is some extra monitoring involved. The /RTS line will need to be held a little longer to send data and you will have one more character to read when the CD line goes low.

    The digital designer did say he could have another conference call. However, he suggests using Webex instead of Teams, as he was never able to get the audio or chat to work.


    Joseph Wu

  • Yes, we should have another call. I have tried what he is suggesting (see my earlier post), by I have not been able to get it to work at 1200.

    Can you send a Webex invite?

  • John,

    I have one meeting in the morning, and I'll check on his availability.

    Joseph Wu

  • This is a good idea. I will try it.

  • John,

    If you're referring to using a lower baud rate to mimic the UART break, I can't really take credit for it. I happened to read it somewhere when searching for UART break info.

    I know that Mike has quite a few meetings tomorrow scattered through the day. I'll see when he might be able to jump in on a quick call. Note, we're in Tucson which is currently on Pacific time. If you're in Central, we're two hours behind you.

    Joseph Wu

  • John,

    I haven't been able to get hold of the digital designer today. I just wanted to check in to see if that UART break method helped in the communication at all.

    Regardless, I'll keep trying to set up a meeting.

    Joseph Wu

  • Hi John,

    Were you able to try the UART break method that was mentioned previously?

    Thanks,
    Lucas