UART baudrate on STM32
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-27 10:33 AM
Posted on March 27, 2018 at 19:33
Hi there,
Is it possible to change the uart baudrate dynamically after it has been initialized?
Kind regards,
#uart #stm32
Labels:
- Labels:
-
UART-USART
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-27 10:37 AM
Posted on March 27, 2018 at 19:37
Yes, but you want to make sure you've finished sending anything that is currently going over the wire before doing so.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-27 11:12 AM
Posted on March 27, 2018 at 20:12
Thanks for replying. Which function should I use in the HAL inside my main program?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-03-27 1:38 PM
Posted on March 27, 2018 at 20:38
On the STM32F7 I'd use something like this..
USART6->CR1 &= ~USART_CR1_UE;
USART6->BRR = APB2Clock / Baud;USART6->CR1 |= USART_CR1_UE;
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
