You can change the UART->BRR by clearing the UE (Uart Enable) bit first in UART-CR1, and then re-enable.
With some awareness of the uint16_t number space, the delta time is actually less complicated to compute than you're making it.
You'd perhaps use PWM Input Capture and filter/check based on normative baud rate expectations. Have patterns or pairs in your a stream you can recognize/verify.
Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..