2021-02-23 12:49 PM
friends, 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?
2021-02-23 01:22 PM
Look at what pins are being initialized and how they relate to connectivity on the PCB
Watch for faults or watchdog timers.
2021-02-23 01:36 PM
@Community member emy pcb schematics.the system does not fail. it starts normally when reset is pressed. as if not booting, but it does.
2021-02-23 01:42 PM
@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.
2021-02-23 01:44 PM
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.
2021-02-23 02:27 PM
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.
2021-02-23 02:43 PM
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.
2021-02-23 02:56 PM
ok. I will try. and I will share the result with you. Thank you very much