A31R71x F/W Packages  1.5.0
ABOV Cortex-M0+ Core based MCUs Integrated Driver
A31R71x_hal_pwr.c
Go to the documentation of this file.
1 /***************************************************************************//****************************************************************************/
34 
35 /* Includes ----------------------------------------------------------------- */
36 //******************************************************************************
37 // Include
38 //******************************************************************************
39 
40 #include "A31R71x_hal_pwr.h"
41 
42 /* Public Functions --------------------------------------------------------- */
43 //******************************************************************************
44 // Function
45 //******************************************************************************
46 
47 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
53 {
54  // Sleep Mode, clear SLEEPDEEP bit
55  SCB->SCR = 0;
56 
57  // Sleep Mode
58  WFI();
59  NOP();
60  NOP();
61  NOP();
62  NOP();
63 }
64 
65 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
71 {
72  // Deep-Sleep Mode, set SLEEPDEEP bit
73  SCB->SCR = 0x4;
74 
75  // Deep Sleep Mode
76  WFI();
77  NOP();
78  NOP();
79  NOP();
80  NOP();
81 }
82 
Contains all macro definitions and function prototypes support for pwr firmware library on A31R71x.
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+.