AnsweredAssumed Answered

How to change the uart baudrate dinamically

Question asked by Denis Gottardello on Jan 30, 2018
Latest reply on Feb 1, 2018 by Denis Gottardello

Hi. I need to change the uart baudrate dinamically.

I have tryied this but sems to not work. Have you got an example to show?



    serial->Init.BaudRate= BaudRate;
    serial->Init.WordLength = UART_WORDLENGTH_8B;
    serial->Init.StopBits = UART_STOPBITS_1;
    serial->Init.Parity = UART_PARITY_NONE;
    serial->Init.Mode = UART_MODE_TX_RX;
    serial->Init.HwFlowCtl = UART_HWCONTROL_NONE;
    serial->Init.OverSampling = UART_OVERSAMPLING_16;
    serial->Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE;
    serial->AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT;