A31L12x F/W Packages  1.4.0
ABOV Cortex-M0+ Core based MCUs Integrated Driver
A31L12x_hal_pmu.c
Go to the documentation of this file.
1 /***************************************************************************//****************************************************************************/
34 
35 /* Includes ----------------------------------------------------------------- */
36 //******************************************************************************
37 // Include
38 //******************************************************************************
39 
40 #include "A31L12x_hal_pmu.h"
41 
42 /* Public Functions --------------------------------------------------------- */
43 //******************************************************************************
44 // Function
45 //******************************************************************************
46 
47 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
53 {
54  PMU->PWRCR = PMU->PWRCR
55  | ( PMU_PWRCR_ALLPWR_Off << PMU_PWRCR_ALLPWR_Pos )
56  | ( PMU_PWRCR_WTIDKY_Value << PMU_PWRCR_WTIDKY_Pos )
57  ;
58 }
59 
60 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
66 {
67  PMU->PWRCR = PMU->PWRCR
68  | ( PMU_PWRCR_FLASHPWR_Off << PMU_PWRCR_FLASHPWR_Pos )
69  | ( PMU_PWRCR_WTIDKY_Value << PMU_PWRCR_WTIDKY_Pos )
70  ;
71 }
72 
73 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
79 {
80  PMU->PWRCR = PMU->PWRCR
81  & ~( PMU_PWRCR_FLASHPWR_Off << PMU_PWRCR_FLASHPWR_Pos )
82  | ( PMU_PWRCR_WTIDKY_Value << PMU_PWRCR_WTIDKY_Pos )
83  ;
84 }
85 
86 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
92 {
93  PMU->PWRCR = PMU->PWRCR
94  | ( PMU_PWRCR_SRAMRTPWR_RetentionPower << PMU_PWRCR_SRAMRTPWR_Pos )
95  | ( PMU_PWRCR_WTIDKY_Value << PMU_PWRCR_WTIDKY_Pos )
96  ;
97 }
98 
99 /*-------------------------------------------------------------------------*//*-------------------------------------------------------------------------*/
105 {
106  PMU->PWRCR = PMU->PWRCR
107  & ~( PMU_PWRCR_SRAMRTPWR_RetentionPower << PMU_PWRCR_SRAMRTPWR_Pos )
108  | ( PMU_PWRCR_WTIDKY_Value << PMU_PWRCR_WTIDKY_Pos )
109  ;
110 }
111 
void HAL_PMU_Disable_FlashPowerOff(void)
Disable flash power off.
void HAL_PMU_Enable_SRAMRetentionPower(void)
Enable the sram retention power function.
void HAL_PMU_Enable_FlashPowerOff(void)
Enable flash power off.
void HAL_PMU_Disable_SRAMRetentionPower(void)
Disable the sram retention power function.
void HAL_PMU_Enable_AllPowerOff(void)
Enable all power off function.
Contains all macro definitions and function prototypes support for pmu firmware library on A31L12x.