2020-10-06 08:53 AM
Hello, In my bootloader time base source is Timer 6 and application its SysTick. When I make same time base for both ( i.e. timer 6), my application works fine.
Before jumping to main application I am de-installing timer 6 using below function but still my application is crashing. Any suggestion if I am missing anything here.
void HAL_DenitTick (void){
/* Disable the TIM6 global Interrupt */
HAL_NVIC_DisableIRQ(TIM6_DAC_IRQn);
/* Disable TIM6 clock */
__HAL_RCC_TIM6_CLK_DISABLE();
/* Stop the TIM time Base generation in interrupt mode */
HAL_TIM_Base_Stop(&htim6);
HAL_TIM_Base_DeInit(&htim6);
}
2020-10-06 09:24 AM
https://community.st.com/s/feed/0D53W00000Jl6vkSAB
Figure out where it "crashes", you need to understand the failure.
Disable the TIM6 clock LAST, otherwise you can't access the registers, ie going to be hard to stop/deinit
2020-10-06 09:51 AM
Thanks for Reply. I re-generated project with STMCUBEMx and its started working without your suggested change. Strange....
Anyway I added suggested changes. Will test it more.