2020-04-10 02:55 PM
I have a very peculiar problem with my STM32F745 MCU. I have generated code with CubeMX which is very basic and doesn't initialize any peripherals at all.
Main simply initializes the HAL, clock & then goes into an infinite loop that increments a counter variable.
However, after a short time the loop stops and the application seems stuck. Debugging shows that the time it takes the application to stop working is constant - the value of the counter is always the same - and when inspecting the PC register after the app gets stuck it always points to RTC_Alarm_IRQHandler.
Suspecting spurious interrupts, I have attempted to disable RTC alarms and the interrupt itself but nothing seems to be working. It always ends up getting stuck with PC showing towards the same IRQ handler.
I've tried disabling the interrupt using both:
HAL_NVIC_DisableIRQ(RTC_Alarm_IRQn);
__HAL_RTC_ALARM_EXTI_DISABLE_IT();
And have also deactivated alarms. When debugging I can confirm that the disable functions are executed and registers are set to correct values.
Has someone experienced anything similar?
2020-04-12 12:17 AM
And you have the right MCU selected in CubeMX?
2020-04-12 02:41 AM
Yes, I have. I'm using STM32F745VET6 LQFP100 and have selected STM32F745VETx LQFP100 in the CubeMX project.