How to dynamically adjust a timer with STM32
I think the mistake that you are doing is you are stopping the timer base clock in IRQHandler() and want to update it in PeriodElapsedCallback(), which will be executed inside the IRQHandler().   

The thing you are looking for is __HAL_TIM_SET_AUTORELOAD macro.

There are individual macros defined in *_hal_tim.h files to update the ARR, CCR etc. values. The only thing you need to do is grab the CCR value dynamically and update the macro, you do not need to stop and start the timer..!
The same problem is addressed  here.