cancel
Showing results for 
Search instead for 
Did you mean: 

RTC Wakeup Interrupt not working on STM32H7 dual-core MCU

Boozo
Associate II

Hello everybody,

I'm using STM32CubeIDE version v1.7.0 and Firmware package FW_H7 v1.9.0.

The tests were made on a Nucleo H745ZI (dual-core MCU).

Test 1:

  • Enabled RTC for the M7
  • Configured RTC Wakeup parameters
  • Enabled RTC Wakeup interrupt on NVIC

Result: The RTC Wakeup interrupt is not firing!

Test 2:

  • Enabled RTC for the M4
  • Configured RTC Wakeup parameters
  • Enabled RTC Wakeup interrupt on NVIC

Result: The RTC Wakeup interrupt is not firing!

Made the same test configuration on a Nucleo H743ZI (single-core MCU) and there the RTC Wakeup interrupt is firing! (At least there 8))

Any ideas?

3 REPLIES 3
Boozo
Associate II

After some investigation I have found out that the problem is within the EXTI interrupt for the wakeup timer.

In the HAL_RTCEx_SetWakeUpTimer_IT() function the EXTI interrupt is currently only enabled when having a single-core MCU:

#if !defined(DUAL_CORE)
  /* RTC WakeUpTimer Interrupt Configuration: EXTI configuration */
  __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT();
#endif

but should be more like

/* RTC WakeUpTimer Interrupt Configuration: EXTI configuration */
#if defined(DUAL_CORE)
  if (HAL_GetCurrentCPUID() == CM7_CPUID)
  {
    __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT();
  }
  else
  {
    __HAL_RTC_WAKEUPTIMER_EXTID2_ENABLE_IT();
  }
#else  /* SINGLE_CORE */
  __HAL_RTC_WAKEUPTIMER_EXTI_ENABLE_IT();
#endif /* DUAL_CORE */

to support also dual-core MCUs!

Would be nice to have this code corrected in the next firmware package release.

Thanks to everyone from STMicoelectronics and from the community for your great work :sparkling_heart:

Hi @Boozo​ ,

Thanks for bringing this issue to our attention and for sharing the solution you find.

From my side, I'll report it to our development team who will deeply check your proposal, and if validated to integrate it in coming package release as you suggested.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Boozo
Associate II

Just saw that the functions HAL_RTC_SetAlarm_IT(), HAL_RTCEx_SetTimeStamp_IT() and HAL_RTCEx_SetTamper_IT() do need similar adjustments!