2020-01-04 10:14 PM
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
Solved! Go to Solution.
2020-01-06 03:31 AM
> 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
2020-01-05 03:51 PM
The RM does not appear to exclude this combination so this should work as expected.
Why don't you simply try?
JW
2020-01-06 01:10 AM
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
2020-01-06 03:31 AM
> 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
2020-01-06 04:29 AM
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
2020-02-09 04:10 AM
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.
2020-02-09 06:17 AM
Thanks for reporting! It's good to know, as it widens the choice of pins. :)
2020-02-14 10:50 AM
I've also tried this, but my results weren't successful. I can do half duplexing, I can do swapping, but not both.
With a transmitting app working on USART6 on PC6 (USART6_TX) and PC7 (USART6_RX), I see outputs on PC6 for normal and HDSEL. However, if I add SWAP flag, then output is not seen on either of the pins.
@evan2 Can you share CR2 and CR3 values when HDSEL + SWAP is working?
2020-02-14 11:26 AM
Self solved. I was dropping the RX pin from initialization for half duplexing case and this caused output to go nowhere lol
2020-02-15 03:30 AM
Good to hear! I had initial problems too - I had left the input pins floating which meant that some data was getting through even when I had the connections deliberately wrong. Touching the board would stop the data flow, and that was really confusing me. Adding pull-downs on all pins made it work properly.