A31L12x F/W Packages  1.4.0
ABOV Cortex-M0+ Core based MCUs Integrated Driver
A31L12x_hal_pwr.c
Go to the documentation of this file.
1 /***************************************************************************//****************************************************************************/
34 
35 /* Includes ----------------------------------------------------------------- */
36 //******************************************************************************
37 // Include
38 //******************************************************************************
39 
40 #include "A31L12x_hal_pwr.h"
41 
42 /* Public Functions --------------------------------------------------------- */
43 //******************************************************************************
44 // Function
45 //******************************************************************************
46 
47 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
54 {
55  // Sleep Mode, clear SLEEPDEEP bit
56  SCB->SCR = 0;
57 
58  // Sleep Mode
59  WFI();
60  NOP();
61  NOP();
62  NOP();
63  NOP();
64  NOP();
65  NOP();
66 }
67 
68 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
75 {
76  // Deep-Sleep Mode, set SLEEPDEEP bit
77  SCB->SCR = 0x4;
78 
79  // Deep Sleep Mode
80  WFI();
81  NOP();
82  NOP();
83  NOP();
84  NOP();
85  NOP();
86  NOP();
87 }
88 
Contains all macro definitions and function prototypes support for pwr firmware library on A31L12x.
void HAL_PWR_EnterSleepMode(void)
Enter Sleep mode with co-operated instruction by the Cortex-M0+.
void HAL_PWR_EnterPowerDownMode(void)
Enter Deep Sleep mode with co-operated instruction by the Cortex-M0+.