cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446RE - RTC Wake Up from Standby Mode

VGiai.1
Associate

Hi everybody,

I have some problems related to wake up procedure from Standby Mode using RTC Alarm Interrupt.

When the Alarm time is reached, I have a continuous autonomous wake up from Standby Mode.

Could you please help me? Here is the code I provided. The first part is to be copied in the main.c file, the second one in the it.c and the third on in the msp.c file.

Attached you can see the project files.

1 REPLY 1
MM..1
Chief II

For publish code use

/* Enable the LSI OSC */ 
  RCC_LSICmd(ENABLE);

and maybe LSI or LSE is your issue. STANDBY stops HSE and i mean RTC cant work without clock...

Too UART log from your code is helpfull.

And in firmware package exist perfect examples for this

#elif defined (STANDBY_MODE)
  /* STANDBY Mode Entry 
      - Backup SRAM and RTC OFF
      - IWDG and LSI OFF
      - Wake-up using WakeUp Pin (PA.00)
   */
  StandbyMode_Measure();
 
#elif defined (STANDBY_RTC_MODE)
  /* STANDBY Mode with RTC on LSI Entry 
      - RTC Clocked by LSI
      - IWDG OFF and LSI OFF if not used as RTC Clock source
      - Backup SRAM OFF
      - Automatic Wake-up using RTC clocked by LSI (after ~20s)
   */
  StandbyRTCMode_Measure();
 
#elif defined (STANDBY_RTC_BKPSRAM_MODE)
  /* STANDBY Mode with RTC on LSI Entry 
      - RTC Clocked by LSI
      - Backup SRAM ON
      - IWDG OFF
      - Automatic Wake-up using RTC clocked by LSI (after ~20s)
  */
  StandbyRTCBKPSRAMMode_Measure();
#endif

user\STM32Cube\Repository\STM32Cube_FW_F4_V1.26.1\Projects\STM32446E-Nucleo\Examples\PWR\PWR_CurrentConsumption