You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However I can not figure out how to access relevant initialisation values T::MULTIPLIER and T::frequency() because they are behind sealed (aka private) interface. Values are needed to calculate appropriate value for brr divisor .
Question is, how do I change brr register, accordingly.
Only idea I have so far is to set value relative to current value. So if baud needs to go from 57600 to 115200 one can divide current brr reg by 2,
Is there anything better?
The text was updated successfully, but these errors were encountered:
it's not implemented yet. The inner guts are intentionally not public, you're not supposed to touch registers directly if using the HAL. The fix would be to add a public .set_baudrate() method.
I would like to change uart baud at runtime.
Code seems to be in
usart::configure
and one needs to write appropriate value into brr regHowever I can not figure out how to access relevant initialisation values T::MULTIPLIER and T::frequency() because they are behind sealed (aka private) interface. Values are needed to calculate appropriate value for
brr divisor
.Question is, how do I change
brr
register, accordingly.Only idea I have so far is to set value relative to current value. So if baud needs to go from 57600 to 115200 one can divide current brr reg by 2,
Is there anything better?
The text was updated successfully, but these errors were encountered: