2025-02-05 12:35 AM - last edited on 2025-02-05 12:47 AM by Andrew Neil
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.
2025-02-05 12:51 AM
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
2025-02-05 04:47 PM - edited 2025-02-05 10:10 PM
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.
2025-02-05 11:23 PM - edited 2025-02-05 11:25 PM
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.