cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 UART Hardware Flow RTS/CTS

sundar
Associate II
Posted on March 05, 2014 at 09:06

Hello,

Im Trying to Communicate between Stm32 to FT5000(Lon ShortStack) through UART Hardware Flow ,...I need to Assert and De-assert RTS/CTS,.....How do i achieve this ,....? Please Help,

Thank You,

Sanil 

#stm32-uart-hardware-flow-rts/cts
5 REPLIES 5
chen
Associate II
Posted on March 05, 2014 at 12:19

Hi

''I need to Assert and De-assert RTS/CTS,.....How do i achieve this ,....? Please Help,''

Read section ''30.3.14 Hardware flow control'' of the reference manual.

''RTS and CTS flow control can be enabled independently by writing respectively RTSE and CTSE bits to 1 (in the USART_CR3 register).''

If you are using Standard Peripheral Library - please refer to the documentation (help file)

sundar
Associate II
Posted on March 06, 2014 at 05:22

Hello,

Thank you for the reply,...how do i make them (CTS/RTS) high or low w.r.t  my application, i tried to setbit(gpioA12 RTS ),showing some unaccepted behaviour,..

.Please let me Know the Right Procedure to check/control them (CTS/RTS)

Regards,

Sanil

Posted on March 06, 2014 at 07:35

Decide if you want to do it via Hardware, or Software. If hardware then configure the peripheral in that mode, and the pins in AF mode. If software configure them as input(CTS)/output(RTS) and inspect/control as desired.

Whatever STM32 part you're using the following example may be instructive:

STM32F10x_StdPeriph_Lib_V3.5.0\Project\STM32F10x_StdPeriph_Examples\USART\HyperTerminal_HwFlowControl\main.c
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
sundar
Associate II
Posted on March 06, 2014 at 13:53

Hi Clive ,

Thank you for the Inputs,.....My Application Requires To control it through Software,.....Will try what u have suggested ,...will  get back to you if any issue  

Regards,

Prem

Posted on March 06, 2014 at 19:32

That's generally how I would approach it, given the STM32 USARTs have effectively no depth, any modulation in the flow is going to depend heavily on buffering you've placed behind the USART. The HW comes into play when you choose NOT to service the USART.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..