1 /**
2   ******************************************************************************
3   * @file    lib_CodeRAM.c
4   * @author  Application Team
5   * @version V4.4.0
6   * @date    2019-01-18
7   * @brief   Codes executed in SRAM.
8   ******************************************************************************
9   * @attention
10   *
11   ******************************************************************************
12   */
13 
14 /* Includes ------------------------------------------------------------------*/
15 #include "lib_CodeRAM.h"
16 
17 #ifndef __GNUC__
18 /**
19   * @brief  Flash deep standby, enter idle mode.
20   * @note   This function is executed in RAM.
21   * @param  None
22   * @retval None
23   */
PMU_EnterIdle_FlashDSTB(void)24 __RAM_FUNC void PMU_EnterIdle_FlashDSTB(void)
25 {
26   /* Flash deep standby */
27   FLASH->PASS = 0x55AAAA55;
28   FLASH->DSTB = 0xAA5555AA;
29   /* Enter Idle mode */
30   SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP_Msk);
31   __WFI();
32 }
33 #endif
34 
35 /*********************************** END OF FILE ******************************/
36