cancel
Showing results for 
Search instead for 
Did you mean: 

Application crashing after running from bootloader in case of different time base source

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);
 
}

2 REPLIES 2

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

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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.