Skip to main content
Hong Gildong
Visitor II
April 16, 2018
Question

STM32L0) hal_uart_receive_it baudrate change

  • April 16, 2018
  • 1 reply
  • 500 views
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
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
August 10, 2018

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

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