Skip to main content
Associate III
February 5, 2025
Question

maximum baudrate on uart in half-duplex mode

  • February 5, 2025
  • 3 replies
  • 1340 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.

3 replies

KnarfB
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
Associate III
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.

gbm
Super User
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.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice