Hardware Serial-USART-synchronous mode or asynchronous mode
Posted: Fri Sep 24, 2021 4:00 pm
Hi everyone!
This is just general topic. I also want to implement in my work. I have a STM32F103C8T6 with Stm32duino offical core running in it.
My question is can we program the microcontroller with USART in synchronous mode? For communication between two STM32F103C8T6 custom made boards. I want to use USART_1 in synchronous mode to transmit or recive data. How can I do that?
I have alredy did some programming. But I think that runs in asynchronous mode that is in half duplex mode.
I have configured my Hardware Serial USART_1 in PA9 as Tx and PA10 as Rx and PC14 as USART_ENABLE to the maxRS485. Whenever I need to send data from microcontroller_1 to microcontroller_2, then I have to make my eable pin HIGH for microcontroller_1 and LOW for microcontroller_2. Then when I need to send data from microcontroller_2 to microcontroller_1 then I have to change the enable pin as HIGH for microcontroller_2 and LOW for microcontroller_1.
I am littel bit confused. Whether I am using synchronous or asynchronous mode in USART_1 in microcontrollers. I know that USART synchronous mode transfer data much faster then asynchronous mode. But after refering official stm32f103 reference mannual and from lots results from internet makes me to think that I might be using asynchronous mode in USART_1. But, I am not sure.
And I also do not see any examples in online for USART in synchronous mode for STM32F103C8T6 board in Arduino IDE. All the examples available are for USART asynchronous mode, I think.
Please let me know your suggestions, oppinions, and corrections for me. Also, please let me know if I am doing something wrong or am I lacking some knowledge in something.
Greetings,
Mustaq
This is just general topic. I also want to implement in my work. I have a STM32F103C8T6 with Stm32duino offical core running in it.
My question is can we program the microcontroller with USART in synchronous mode? For communication between two STM32F103C8T6 custom made boards. I want to use USART_1 in synchronous mode to transmit or recive data. How can I do that?
I have alredy did some programming. But I think that runs in asynchronous mode that is in half duplex mode.
I have configured my Hardware Serial USART_1 in PA9 as Tx and PA10 as Rx and PC14 as USART_ENABLE to the maxRS485. Whenever I need to send data from microcontroller_1 to microcontroller_2, then I have to make my eable pin HIGH for microcontroller_1 and LOW for microcontroller_2. Then when I need to send data from microcontroller_2 to microcontroller_1 then I have to change the enable pin as HIGH for microcontroller_2 and LOW for microcontroller_1.
I am littel bit confused. Whether I am using synchronous or asynchronous mode in USART_1 in microcontrollers. I know that USART synchronous mode transfer data much faster then asynchronous mode. But after refering official stm32f103 reference mannual and from lots results from internet makes me to think that I might be using asynchronous mode in USART_1. But, I am not sure.
And I also do not see any examples in online for USART in synchronous mode for STM32F103C8T6 board in Arduino IDE. All the examples available are for USART asynchronous mode, I think.
Please let me know your suggestions, oppinions, and corrections for me. Also, please let me know if I am doing something wrong or am I lacking some knowledge in something.
Greetings,
Mustaq