Skip to main content
evan2
Associate II
January 5, 2020
Solved

UART/USART - enable HDSEL and SWAP at the same time?

  • January 5, 2020
  • 10 replies
  • 3640 views

Hi All,

Could anyone tell me what happens on an STM32H750 (or other STM32) UART if you enable both the HDSEL bit (half-duplex mode using only the TX pin) and the SWAP bit (switch TX and RX pins) at the same time? Will this get me a half-duplex UART using on the RX pin, or is the hardware not flexible enough to do that?

The specific goal here is to get two bidirectional UARTs on pins 92 and 93 on an LQFP100 STM32H750. If this works, then I can make pin 92 LPUART1 TX/RX by enabling HDSEL, and I can make pin 93 USART1 TX/RX by enabling both HDSEL and SWAP.

Thank you

This topic has been closed for replies.
Best answer by waclawek.jan

> I could get a Nucleo-H743, I guess.

I'd say, it's a good idea, for various reasons.

> More fundamentally, I'm concerned about whether this is officially supported or not

This is a user-driven forum, with casual ST presence. You may want to contact ST directly, through FAE or through the web support form.

JW

10 replies

waclawek.jan
Super User
January 5, 2020

The RM does not appear to exclude this combination so this should work as expected.

Why don't you simply try?

JW

evan2
evan2Author
Associate II
January 6, 2020

Thanks very much for the reply. The reason I haven't tried is that I don't have an STM32H750 board yet - I'm still in the initial stages of designing one. The only STM32 board I've got is an older STM32F1 that doesn't have the SWAP register. I could get a Nucleo-H743, I guess.

More fundamentally, I'm concerned about whether this is officially supported or not. If not, there's a chance that it'll work fine in this silicon revision and then stop working in the next, just because ST didn't see any need to ensure that the functionality was retained.

Cheers,

Evan

waclawek.jan
waclawek.janBest answer
Super User
January 6, 2020

> I could get a Nucleo-H743, I guess.

I'd say, it's a good idea, for various reasons.

> More fundamentally, I'm concerned about whether this is officially supported or not

This is a user-driven forum, with casual ST presence. You may want to contact ST directly, through FAE or through the web support form.

JW

evan2
evan2Author
Associate II
February 9, 2020

OK, got a Nucleo-H743ZI and tested it. The answer is ... it works perfectly. If you set HDSEL then you get a bidirectional UART on the TX pin, and if you also set SWAP then you get a bidirectional UART on the RX pin.

If anyone is interested - I got in touch with a couple of distributors regarding the LQFP144 STM32H750, and all of them basically said "we're never planning to stock that, you'll have to order thousands of them from ST directly". So I guess I'm designing my board for the LQFP100 version.

Piranha
Principal III
February 9, 2020

Thanks for reporting! It's good to know, as it widens the choice of pins. :)

evan2
evan2Author
Associate II
January 6, 2020

OK, sounds like I need to go shopping. I'll get in touch with ST as well - I need to ask about when the LQFP144 STM32H750 will actually be available too, since so far nobody seems to have any stock.

Thanks very much for your help.

Cheers,

Evan