2018-03-27 10:33 AM
Hi there,
Is it possible to change the uart baudrate dynamically after it has been initialized?
Kind regards,
#uart #stm322018-03-27 10:37 AM
Yes, but you want to make sure you've finished sending anything that is currently going over the wire before doing so.
2018-03-27 11:12 AM
Thanks for replying. Which function should I use in the HAL inside my main program?
2018-03-27 01:38 PM
On the STM32F7 I'd use something like this..
USART6->CR1 &= ~USART_CR1_UE;
USART6->BRR = APB2Clock / Baud;USART6->CR1 |= USART_CR1_UE;