Skip to main content
Visitor II
February 5, 2025
Question

maximum baudrate on uart in half-duplex mode

  • February 5, 2025
  • 2 replies
  • 1313 views

I am using uart on STM32L07 to simulate 1-wire for operating ds28e22. 1-bit timing is more than 1us and less than 2us. When I set baudrate at 666666 which meant 1 bit timing was 1.5us, I found the rising edge was too slow (more than 1 us). So I want to know what's maximum rate for uart under half-duplex mode.

thanks.

    This topic has been closed for replies.

    2 replies

    Super User
    February 5, 2025

    The baud rate is internally generated from the UART clock. If the clock rate is too low, the baud rate will be off. 

    How did you measure "the rising edge"? 

    hth

    KnarfB

    dh_leslieAuthor
    Visitor II
    February 6, 2025

    The internal clock connected to uart is 32MHz. Connect TX pin to Oscilloscope directly. And there is no difference with or without pull up resistor to 3.3V on Tx Pin.

    The pic shows the 1-bit (simulatied by uart, uart sends 0xe0. it consists of 1-bit start, 8-bit data and 1-bit stop) rising edge measured from Tx Pin. Baudrate is 500000. If I set baudrate 666666, Rx will receive nothing from Tx. BTW, it seems rising edge is fine when uart is under Asynchronous mode.

    Graduate
    February 6, 2025

    You may set the TX pin to maximum "speed" in OSPEEDR register, BUT OneWire is open-drain, so that's normal that the rising edge is slow - no problem.