cancel
Showing results for 
Search instead for 
Did you mean: 

USART: Is it possible to echo oneself?

ran2
Associate III
Posted on August 14, 2013 at 18:34

Hi, if anyone is interested, see my problem and thanks in advance.

I am using STM32F4discovery, but the problem should be general enough for all STM32 MCUs.

I am just curious if it is possible to make :

1. Say, usart2 send to usart3?

2.usart send to itself and receive from itself?

If possible, any special configuration will have to be done?

I am trying to send a byte to usart3 through usart2, the transmission is successful and can be seen from the logic analyzer, however the RXNE bit of usart3 is never set, which means it does not receive anything. The hardware pins are wired up appropriately, and my code should be fine. I am just wondering if anything beyond the normal configuration is needed.

Any comment will be appreciated.

#stm32 #stm32f4 #discovery #usart
3 REPLIES 3
Posted on August 14, 2013 at 18:56

Should be able to loop back connections externally, ie USART2_TX connects to USART3_RX

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
ran2
Associate III
Posted on August 15, 2013 at 10:14

Thanks for the reply!

Is usart3_rx connected to both PB11 and PC11? (The reference manual mark PB11 and PC11 as usart3_rx at the same time). As far as how I understand it, PB11 and PC11 should be equivalent in this case and configuring either will be fine. Correct me if I am wrong. Cheers!

Posted on August 15, 2013 at 16:03

Architecturally it would seem possible to route the same signal to multiple pins at once, I'm not sure what the actual ramification of doing so would be. The pin mux does limit you to one peripheral/device selection per pin.

The way the F2/F4 fabric is implemented you can cherry pick which pins are used to escape individual peripheral signals. There is no forced pairing or combinations.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..