cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f746vgt6 sys timebase source tim problem

mcizmeci
Associate II

0693W000007ZHBEQA4.jpg0693W000007ZHB4QAO.jpg0693W000007ZH9wQAG.jpgfriends, I have a problem, can you help? I am working with the stm32f746vgt6 microcontroller. I came across something that had never happened to me before. I am using freertos. My crystal frequency is 25 Mhz. Whenever I select the sys timebase source as a source, the microcontroller cannot start, it constantly dials tim interup. but the microcontroller ends in the reset printing process. Has anyone been seen before?

7 REPLIES 7

Look at what pins are being initialized and how they relate to connectivity on the PCB

Watch for faults or watchdog timers.

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

@Community member​ e0693W000007ZHMMQA4.jpgmy pcb schematics.the system does not fail. it starts normally when reset is pressed. as if not booting, but it does.

mcizmeci
Associate II

@Community member​

void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)

{

 /* USER CODE BEGIN Callback 0 */

 /* USER CODE END Callback 0 */

 if (htim->Instance == TIM2) {

   HAL_IncTick();

 }

 /* USER CODE BEGIN Callback 1 */

 /* USER CODE END Callback 1 */

}

microcontroller in a continuous loop.

If it dies in the highlighted routine, use the debugger, step into it and follow it to the point of failure.

If it is stuck in a TIM interrupt that would be because you aren't servicing it properly, and it will keep firing until you do.

Check the peripherals register, understand what is flagging, and why you enable it, but fail to deal with it in the IRQHandler.

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

I don't understand what you mean "If it is stuck in a TIM interrupt that would be because you aren't servicing it properly, and it will keep firing until you do." I'm not professional. I civil engeneer. I have to solve this problem but I don't know exactly how to do it.

I'm trying to unpack what you're describing.

I'm trying to understand how MX_GPIO_Init() is involved.

If it is stuck in HAL_TIM_PeriodElapsedCallback(), then presumably TIM2_IRQHandler() is calling into the HAL dispatch code.

You'll need to check what the setup code for TIM2 looks like and how frequently that should be firing, from a human perspective in the debugger it will look like all the time.

Have the callback here toggle a GPIO pin so you can observe via an oscilloscope rather than the debugger.

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

ok. I will try. and I will share the result with you. Thank you very much