stm32f4xx-hal icon indicating copy to clipboard operation
stm32f4xx-hal copied to clipboard

Support half-duplex serial

Open llamington opened this issue 2 years ago • 7 comments

Currently the serial function requires a tuple of RX/TX pins. The reference manual states that "the TX and RX lines are internally connected", so only one pin would be required as an argument.

llamington avatar Apr 02 '23 07:04 llamington

You mean both read and write on TX line?

burrbull avatar Apr 02 '23 08:04 burrbull

Yes that's correct

llamington avatar Apr 03 '23 10:04 llamington

Not implemented yet.

It's better to create independent SerialHalfDuplex structure for this with new::(pin: TX) and its own methods. As I understand it will be semantically incompatible with read/write from embedded-hal.

burrbull avatar Apr 03 '23 10:04 burrbull

@llamington Did you ever make any progress on this?

bluespider42 avatar Jun 05 '24 13:06 bluespider42

@bluespider42 no, unfortunately I didn't (I ended up using the STM32HAL library in C)

llamington avatar Jun 05 '24 14:06 llamington

embassy-stm32 hal has a half-duplex uart.

bluespider42 avatar Jun 19 '24 13:06 bluespider42

PR currently in draft https://github.com/stm32-rs/stm32f4xx-hal/pull/781

bluespider42 avatar Oct 21 '24 07:10 bluespider42