cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L0) hal_uart_receive_it baudrate change

Hong Gildong
Associate
Posted on April 16, 2018 at 05:03

hi.

I am using the hal library to communicate uart.

I changed the baudrate during code execution as shown below.

UartHandle.Init.BaudRate     = Baudrate;

if(HAL_UART_Init(&UartHandle) != HAL_OK){ Error_Handler(); }

HAL_UART_Receive_IT(&UartHandle, (uint8_t *)rx_data, BUFFERSIZE);

The baudrate changes very well, but the problem is changing too slowly.

Is there a quick way to change it?

Thank you.

#stm32l031 #uart-rx-interrupt #baudrate-change
1 REPLY 1

Write to UARTx->BRR directly, disable/enable UART if necessary

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