lib_CodeRAM.c 990 B

1234567891011121314151617181920212223242526272829303132333435
  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. /* Includes ------------------------------------------------------------------*/
  14. #include "lib_CodeRAM.h"
  15. #ifndef __GNUC__
  16. /**
  17. * @brief Flash deep standby, enter idle mode.
  18. * @note This function is executed in RAM.
  19. * @param None
  20. * @retval None
  21. */
  22. __RAM_FUNC void PMU_EnterIdle_FlashDSTB(void)
  23. {
  24. /* Flash deep standby */
  25. FLASH->PASS = 0x55AAAA55;
  26. FLASH->DSTB = 0xAA5555AA;
  27. /* Enter Idle mode */
  28. SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP_Msk);
  29. __WFI();
  30. }
  31. #endif
  32. /*********************************** END OF FILE ******************************/