/****************************************************************************** * Shanghai ChipON Micro-Electronic Co.,Ltd * ****************************************************************************** * $File Name$ : kf32A156_pm.h * * $Author$ : ChipON AE/FAE Group * * $Data$ : 2021-07-08 * * $AutoSAR Version : V2.0 * * $Description$ : This file contains the headers of the PM * ****************************************************************************** * Copyright (C) by Shanghai ChipON Micro-Electronic Co.,Ltd * * All rights reserved. * * * * This software is copyright protected and proprietary to * * Shanghai ChipON Micro-Electronic Co.,Ltd. * ****************************************************************************** * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * REVISON HISTORY * * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * Data Version Author Description * * ~~~~~~~~~~ ~~~~~~~~ ~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * * * * * * * *****************************************************************************/ #ifndef KF32A156_PM_H_ #define KF32A156_PM_H_ #include "KF32A156.h" /** * 备份区寄存器模块软件复位 */ #define PERIPHERAL_RST_STATUS ((uint32_t)0) #define PERIPHERAL_OUTRST_STATUS ((uint32_t)1) #define CHECK_PERIPHERAL_RST(RST) (((RST) == PERIPHERAL_RST_STATUS) \ || ((RST) == PERIPHERAL_OUTRST_STATUS)) /** * DPRAM的B区在standby模式下工作配置 */ #define PM_DPRAM_IN_STANDBY_POWER_DOWN ((uint32_t)0) #define PM_DPRAM_IN_STANDBY_KEEP_DATA ((uint32_t)1) #define CHECK_PM_DPRAM_IN_STANDBY(MODE) (((MODE) == PM_DPRAM_IN_STANDBY_POWER_DOWN) \ || ((MODE) == PM_DPRAM_IN_STANDBY_KEEP_DATA)) /** * LPRAM在standby模式下工作配置 */ #define PM_LPRAM_IN_STANDBY_POWER_DOWN ((uint32_t)0) #define PM_LPRAM_IN_STANDBY_KEEP_DATA ((uint32_t)1) #define CHECK_PM_LPSRAM_IN_STANDBY(MODE) (((MODE) == PM_LPRAM_IN_STANDBY_POWER_DOWN) \ || ((MODE) == PM_LPRAM_IN_STANDBY_KEEP_DATA)) /** * 延时时间 */ #define DELAY_TIME_1ms ((uint32_t)0) #define DELAY_TIME_2ms ((uint32_t)0) #define DELAY_TIME_32us ((uint32_t)1) #define DELAY_TIME_500us ((uint32_t)1) #define CHECK_DELAY_TIME(TIME) (((TIME) == DELAY_TIME_1ms) \ || ((TIME) == DELAY_TIME_2ms) \ || ((TIME) == DELAY_TIME_32us) \ || ((TIME) == DELAY_TIME_500us)) /** * 低功耗外设IO口 */ #define PM_GENERAL_PURPOSE_IO_PORT ((uint32_t)0<> 5) == 0) /** * LDO12基准校准 */ #define CHECK_PM_LDO12_CALIBRATION(CFG) (((CFG) >> 5) == 0) /** * LDO18基准校准 */ #define CHECK_PM_LDO18_CALIBRATION(CFG) (((CFG) >> 5) == 0) /** * 内部低频振荡器偏置电流 */ #define PM_INTLF_BIAS_CURRENT_10nA ((uint32_t)0<> 5) == 0) /** * 低功耗偏置电流校准 */ #define CHECK_PM_LP_BIAS_CALIBRATION(CFG) \ (((CFG) >> 3) == 0) /** * LPBG PUMP校准 */ #define CHECK_PM_PUMP_CALIBRATION(CFG) (((CFG) >> 3) == 0) /** * 外部低频振荡器N管偏置校准 */ #define PM_BRANCH_CURRENT_NONE ((uint32_t)0<