cancel
Showing results for 
Search instead for 
Did you mean: 

Set USART2_RTS when GPIO is in alternate function mode.

zoltan
Associate
Posted on August 25, 2014 at 16:06

I have a STM32L152RCT6 mcu and a bluetooth module connected to usart2. I've also set up the dma for the communication. The gpio is set to alternate function mode. It works, however sometimes a packet loss happens. The manufacturer of the bt modul has suggested that maybe there's a problem with the rts signal and the bt module sends data while i'm processing the previous. So now i would like to test to set the rts manually while i'm processing the incoming packet to prevent the bt module to send anything. However the gpio is set to alternate function mode and i can't set the rts. Is there any way to set the rts pin while it's in af mode?

2 REPLIES 2
Posted on August 25, 2014 at 16:20

Why can't you simply reconfigure the pin?

Can you change behaviour via RTSE or RXE?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
zoltan
Associate
Posted on August 26, 2014 at 10:54

I have tried and it's working but only when my gpio is in OUT mode. If the gpio is set to af mode, then setting it or the pin or the ODR has no effect on the rts level.