![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Color Oled(SSD1331) connect to STMicroelectronics Nucleo-F466
mbed-os/targets/TARGET_Freescale/TARGET_MCUXpresso_MCUS/TARGET_K82F/drivers/fsl_smc.h@3:f3764f852aa8, 2018-10-11 (annotated)
- Committer:
- kadonotakashi
- Date:
- Thu Oct 11 02:27:46 2018 +0000
- Revision:
- 3:f3764f852aa8
- Parent:
- 0:8fdf9a60065b
Nucreo 446 + SSD1331 test version;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kadonotakashi | 0:8fdf9a60065b | 1 | /* |
kadonotakashi | 0:8fdf9a60065b | 2 | * Copyright (c) 2015, Freescale Semiconductor, Inc. |
kadonotakashi | 0:8fdf9a60065b | 3 | * All rights reserved. |
kadonotakashi | 0:8fdf9a60065b | 4 | * |
kadonotakashi | 0:8fdf9a60065b | 5 | * Redistribution and use in source and binary forms, with or without modification, |
kadonotakashi | 0:8fdf9a60065b | 6 | * are permitted provided that the following conditions are met: |
kadonotakashi | 0:8fdf9a60065b | 7 | * |
kadonotakashi | 0:8fdf9a60065b | 8 | * o Redistributions of source code must retain the above copyright notice, this list |
kadonotakashi | 0:8fdf9a60065b | 9 | * of conditions and the following disclaimer. |
kadonotakashi | 0:8fdf9a60065b | 10 | * |
kadonotakashi | 0:8fdf9a60065b | 11 | * o Redistributions in binary form must reproduce the above copyright notice, this |
kadonotakashi | 0:8fdf9a60065b | 12 | * list of conditions and the following disclaimer in the documentation and/or |
kadonotakashi | 0:8fdf9a60065b | 13 | * other materials provided with the distribution. |
kadonotakashi | 0:8fdf9a60065b | 14 | * |
kadonotakashi | 0:8fdf9a60065b | 15 | * o Neither the name of Freescale Semiconductor, Inc. nor the names of its |
kadonotakashi | 0:8fdf9a60065b | 16 | * contributors may be used to endorse or promote products derived from this |
kadonotakashi | 0:8fdf9a60065b | 17 | * software without specific prior written permission. |
kadonotakashi | 0:8fdf9a60065b | 18 | * |
kadonotakashi | 0:8fdf9a60065b | 19 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
kadonotakashi | 0:8fdf9a60065b | 20 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
kadonotakashi | 0:8fdf9a60065b | 21 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
kadonotakashi | 0:8fdf9a60065b | 22 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR |
kadonotakashi | 0:8fdf9a60065b | 23 | * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
kadonotakashi | 0:8fdf9a60065b | 24 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
kadonotakashi | 0:8fdf9a60065b | 25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON |
kadonotakashi | 0:8fdf9a60065b | 26 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
kadonotakashi | 0:8fdf9a60065b | 27 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
kadonotakashi | 0:8fdf9a60065b | 28 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
kadonotakashi | 0:8fdf9a60065b | 29 | */ |
kadonotakashi | 0:8fdf9a60065b | 30 | |
kadonotakashi | 0:8fdf9a60065b | 31 | #ifndef _FSL_SMC_H_ |
kadonotakashi | 0:8fdf9a60065b | 32 | #define _FSL_SMC_H_ |
kadonotakashi | 0:8fdf9a60065b | 33 | |
kadonotakashi | 0:8fdf9a60065b | 34 | #include "fsl_common.h" |
kadonotakashi | 0:8fdf9a60065b | 35 | |
kadonotakashi | 0:8fdf9a60065b | 36 | /*! @addtogroup smc */ |
kadonotakashi | 0:8fdf9a60065b | 37 | /*! @{ */ |
kadonotakashi | 0:8fdf9a60065b | 38 | |
kadonotakashi | 0:8fdf9a60065b | 39 | |
kadonotakashi | 0:8fdf9a60065b | 40 | /******************************************************************************* |
kadonotakashi | 0:8fdf9a60065b | 41 | * Definitions |
kadonotakashi | 0:8fdf9a60065b | 42 | ******************************************************************************/ |
kadonotakashi | 0:8fdf9a60065b | 43 | |
kadonotakashi | 0:8fdf9a60065b | 44 | /*! @name Driver version */ |
kadonotakashi | 0:8fdf9a60065b | 45 | /*@{*/ |
kadonotakashi | 0:8fdf9a60065b | 46 | /*! @brief SMC driver version 2.0.3. */ |
kadonotakashi | 0:8fdf9a60065b | 47 | #define FSL_SMC_DRIVER_VERSION (MAKE_VERSION(2, 0, 3)) |
kadonotakashi | 0:8fdf9a60065b | 48 | /*@}*/ |
kadonotakashi | 0:8fdf9a60065b | 49 | |
kadonotakashi | 0:8fdf9a60065b | 50 | /*! |
kadonotakashi | 0:8fdf9a60065b | 51 | * @brief Power Modes Protection |
kadonotakashi | 0:8fdf9a60065b | 52 | */ |
kadonotakashi | 0:8fdf9a60065b | 53 | typedef enum _smc_power_mode_protection |
kadonotakashi | 0:8fdf9a60065b | 54 | { |
kadonotakashi | 0:8fdf9a60065b | 55 | #if (defined(FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 56 | kSMC_AllowPowerModeVlls = SMC_PMPROT_AVLLS_MASK, /*!< Allow Very-low-leakage Stop Mode. */ |
kadonotakashi | 0:8fdf9a60065b | 57 | #endif |
kadonotakashi | 0:8fdf9a60065b | 58 | #if (defined(FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 59 | kSMC_AllowPowerModeLls = SMC_PMPROT_ALLS_MASK, /*!< Allow Low-leakage Stop Mode. */ |
kadonotakashi | 0:8fdf9a60065b | 60 | #endif /* FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 61 | kSMC_AllowPowerModeVlp = SMC_PMPROT_AVLP_MASK, /*!< Allow Very-Low-power Mode. */ |
kadonotakashi | 0:8fdf9a60065b | 62 | #if (defined(FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) && FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) |
kadonotakashi | 0:8fdf9a60065b | 63 | kSMC_AllowPowerModeHsrun = SMC_PMPROT_AHSRUN_MASK, /*!< Allow High-speed Run mode. */ |
kadonotakashi | 0:8fdf9a60065b | 64 | #endif /* FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 65 | kSMC_AllowPowerModeAll = (0U |
kadonotakashi | 0:8fdf9a60065b | 66 | #if (defined(FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 67 | | |
kadonotakashi | 0:8fdf9a60065b | 68 | SMC_PMPROT_AVLLS_MASK |
kadonotakashi | 0:8fdf9a60065b | 69 | #endif |
kadonotakashi | 0:8fdf9a60065b | 70 | #if (defined(FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 71 | | |
kadonotakashi | 0:8fdf9a60065b | 72 | SMC_PMPROT_ALLS_MASK |
kadonotakashi | 0:8fdf9a60065b | 73 | #endif /* FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 74 | | |
kadonotakashi | 0:8fdf9a60065b | 75 | SMC_PMPROT_AVLP_MASK |
kadonotakashi | 0:8fdf9a60065b | 76 | #if (defined(FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) && FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) |
kadonotakashi | 0:8fdf9a60065b | 77 | | |
kadonotakashi | 0:8fdf9a60065b | 78 | kSMC_AllowPowerModeHsrun |
kadonotakashi | 0:8fdf9a60065b | 79 | #endif /* FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 80 | ) /*!< Allow all power mode. */ |
kadonotakashi | 0:8fdf9a60065b | 81 | } smc_power_mode_protection_t; |
kadonotakashi | 0:8fdf9a60065b | 82 | |
kadonotakashi | 0:8fdf9a60065b | 83 | /*! |
kadonotakashi | 0:8fdf9a60065b | 84 | * @brief Power Modes in PMSTAT |
kadonotakashi | 0:8fdf9a60065b | 85 | */ |
kadonotakashi | 0:8fdf9a60065b | 86 | typedef enum _smc_power_state |
kadonotakashi | 0:8fdf9a60065b | 87 | { |
kadonotakashi | 0:8fdf9a60065b | 88 | kSMC_PowerStateRun = 0x01U << 0U, /*!< 0000_0001 - Current power mode is RUN */ |
kadonotakashi | 0:8fdf9a60065b | 89 | kSMC_PowerStateStop = 0x01U << 1U, /*!< 0000_0010 - Current power mode is STOP */ |
kadonotakashi | 0:8fdf9a60065b | 90 | kSMC_PowerStateVlpr = 0x01U << 2U, /*!< 0000_0100 - Current power mode is VLPR */ |
kadonotakashi | 0:8fdf9a60065b | 91 | kSMC_PowerStateVlpw = 0x01U << 3U, /*!< 0000_1000 - Current power mode is VLPW */ |
kadonotakashi | 0:8fdf9a60065b | 92 | kSMC_PowerStateVlps = 0x01U << 4U, /*!< 0001_0000 - Current power mode is VLPS */ |
kadonotakashi | 0:8fdf9a60065b | 93 | #if (defined(FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 94 | kSMC_PowerStateLls = 0x01U << 5U, /*!< 0010_0000 - Current power mode is LLS */ |
kadonotakashi | 0:8fdf9a60065b | 95 | #endif /* FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 96 | #if (defined(FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 97 | kSMC_PowerStateVlls = 0x01U << 6U, /*!< 0100_0000 - Current power mode is VLLS */ |
kadonotakashi | 0:8fdf9a60065b | 98 | #endif |
kadonotakashi | 0:8fdf9a60065b | 99 | #if (defined(FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) && FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) |
kadonotakashi | 0:8fdf9a60065b | 100 | kSMC_PowerStateHsrun = 0x01U << 7U /*!< 1000_0000 - Current power mode is HSRUN */ |
kadonotakashi | 0:8fdf9a60065b | 101 | #endif /* FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 102 | } smc_power_state_t; |
kadonotakashi | 0:8fdf9a60065b | 103 | |
kadonotakashi | 0:8fdf9a60065b | 104 | /*! |
kadonotakashi | 0:8fdf9a60065b | 105 | * @brief Run mode definition |
kadonotakashi | 0:8fdf9a60065b | 106 | */ |
kadonotakashi | 0:8fdf9a60065b | 107 | typedef enum _smc_run_mode |
kadonotakashi | 0:8fdf9a60065b | 108 | { |
kadonotakashi | 0:8fdf9a60065b | 109 | kSMC_RunNormal = 0U, /*!< Normal RUN mode. */ |
kadonotakashi | 0:8fdf9a60065b | 110 | kSMC_RunVlpr = 2U, /*!< Very-low-power RUN mode. */ |
kadonotakashi | 0:8fdf9a60065b | 111 | #if (defined(FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) && FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) |
kadonotakashi | 0:8fdf9a60065b | 112 | kSMC_Hsrun = 3U /*!< High-speed Run mode (HSRUN). */ |
kadonotakashi | 0:8fdf9a60065b | 113 | #endif /* FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 114 | } smc_run_mode_t; |
kadonotakashi | 0:8fdf9a60065b | 115 | |
kadonotakashi | 0:8fdf9a60065b | 116 | /*! |
kadonotakashi | 0:8fdf9a60065b | 117 | * @brief Stop mode definition |
kadonotakashi | 0:8fdf9a60065b | 118 | */ |
kadonotakashi | 0:8fdf9a60065b | 119 | typedef enum _smc_stop_mode |
kadonotakashi | 0:8fdf9a60065b | 120 | { |
kadonotakashi | 0:8fdf9a60065b | 121 | kSMC_StopNormal = 0U, /*!< Normal STOP mode. */ |
kadonotakashi | 0:8fdf9a60065b | 122 | kSMC_StopVlps = 2U, /*!< Very-low-power STOP mode. */ |
kadonotakashi | 0:8fdf9a60065b | 123 | #if (defined(FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 124 | kSMC_StopLls = 3U, /*!< Low-leakage Stop mode. */ |
kadonotakashi | 0:8fdf9a60065b | 125 | #endif /* FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 126 | #if (defined(FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 127 | kSMC_StopVlls = 4U /*!< Very-low-leakage Stop mode. */ |
kadonotakashi | 0:8fdf9a60065b | 128 | #endif |
kadonotakashi | 0:8fdf9a60065b | 129 | } smc_stop_mode_t; |
kadonotakashi | 0:8fdf9a60065b | 130 | |
kadonotakashi | 0:8fdf9a60065b | 131 | #if (defined(FSL_FEATURE_SMC_USE_VLLSCTRL_REG) && FSL_FEATURE_SMC_USE_VLLSCTRL_REG) || \ |
kadonotakashi | 0:8fdf9a60065b | 132 | (defined(FSL_FEATURE_SMC_USE_STOPCTRL_VLLSM) && FSL_FEATURE_SMC_USE_STOPCTRL_VLLSM) || \ |
kadonotakashi | 0:8fdf9a60065b | 133 | (defined(FSL_FEATURE_SMC_HAS_LLS_SUBMODE) && FSL_FEATURE_SMC_HAS_LLS_SUBMODE) |
kadonotakashi | 0:8fdf9a60065b | 134 | /*! |
kadonotakashi | 0:8fdf9a60065b | 135 | * @brief VLLS/LLS stop sub mode definition |
kadonotakashi | 0:8fdf9a60065b | 136 | */ |
kadonotakashi | 0:8fdf9a60065b | 137 | typedef enum _smc_stop_submode |
kadonotakashi | 0:8fdf9a60065b | 138 | { |
kadonotakashi | 0:8fdf9a60065b | 139 | kSMC_StopSub0 = 0U, /*!< Stop submode 0, for VLLS0/LLS0. */ |
kadonotakashi | 0:8fdf9a60065b | 140 | kSMC_StopSub1 = 1U, /*!< Stop submode 1, for VLLS1/LLS1. */ |
kadonotakashi | 0:8fdf9a60065b | 141 | kSMC_StopSub2 = 2U, /*!< Stop submode 2, for VLLS2/LLS2. */ |
kadonotakashi | 0:8fdf9a60065b | 142 | kSMC_StopSub3 = 3U /*!< Stop submode 3, for VLLS3/LLS3. */ |
kadonotakashi | 0:8fdf9a60065b | 143 | } smc_stop_submode_t; |
kadonotakashi | 0:8fdf9a60065b | 144 | #endif |
kadonotakashi | 0:8fdf9a60065b | 145 | |
kadonotakashi | 0:8fdf9a60065b | 146 | /*! |
kadonotakashi | 0:8fdf9a60065b | 147 | * @brief Partial STOP option |
kadonotakashi | 0:8fdf9a60065b | 148 | */ |
kadonotakashi | 0:8fdf9a60065b | 149 | typedef enum _smc_partial_stop_mode |
kadonotakashi | 0:8fdf9a60065b | 150 | { |
kadonotakashi | 0:8fdf9a60065b | 151 | kSMC_PartialStop = 0U, /*!< STOP - Normal Stop mode*/ |
kadonotakashi | 0:8fdf9a60065b | 152 | kSMC_PartialStop1 = 1U, /*!< Partial Stop with both system and bus clocks disabled*/ |
kadonotakashi | 0:8fdf9a60065b | 153 | kSMC_PartialStop2 = 2U, /*!< Partial Stop with system clock disabled and bus clock enabled*/ |
kadonotakashi | 0:8fdf9a60065b | 154 | } smc_partial_stop_option_t; |
kadonotakashi | 0:8fdf9a60065b | 155 | |
kadonotakashi | 0:8fdf9a60065b | 156 | /*! |
kadonotakashi | 0:8fdf9a60065b | 157 | * @brief SMC configuration status. |
kadonotakashi | 0:8fdf9a60065b | 158 | */ |
kadonotakashi | 0:8fdf9a60065b | 159 | enum _smc_status |
kadonotakashi | 0:8fdf9a60065b | 160 | { |
kadonotakashi | 0:8fdf9a60065b | 161 | kStatus_SMC_StopAbort = MAKE_STATUS(kStatusGroup_POWER, 0) /*!< Entering Stop mode is abort*/ |
kadonotakashi | 0:8fdf9a60065b | 162 | }; |
kadonotakashi | 0:8fdf9a60065b | 163 | |
kadonotakashi | 0:8fdf9a60065b | 164 | #if (defined(FSL_FEATURE_SMC_HAS_VERID) && FSL_FEATURE_SMC_HAS_VERID) |
kadonotakashi | 0:8fdf9a60065b | 165 | /*! |
kadonotakashi | 0:8fdf9a60065b | 166 | * @brief IP version ID definition. |
kadonotakashi | 0:8fdf9a60065b | 167 | */ |
kadonotakashi | 0:8fdf9a60065b | 168 | typedef struct _smc_version_id |
kadonotakashi | 0:8fdf9a60065b | 169 | { |
kadonotakashi | 0:8fdf9a60065b | 170 | uint16_t feature; /*!< Feature Specification Number. */ |
kadonotakashi | 0:8fdf9a60065b | 171 | uint8_t minor; /*!< Minor version number. */ |
kadonotakashi | 0:8fdf9a60065b | 172 | uint8_t major; /*!< Major version number. */ |
kadonotakashi | 0:8fdf9a60065b | 173 | } smc_version_id_t; |
kadonotakashi | 0:8fdf9a60065b | 174 | #endif /* FSL_FEATURE_SMC_HAS_VERID */ |
kadonotakashi | 0:8fdf9a60065b | 175 | |
kadonotakashi | 0:8fdf9a60065b | 176 | #if (defined(FSL_FEATURE_SMC_HAS_PARAM) && FSL_FEATURE_SMC_HAS_PARAM) |
kadonotakashi | 0:8fdf9a60065b | 177 | /*! |
kadonotakashi | 0:8fdf9a60065b | 178 | * @brief IP parameter definition. |
kadonotakashi | 0:8fdf9a60065b | 179 | */ |
kadonotakashi | 0:8fdf9a60065b | 180 | typedef struct _smc_param |
kadonotakashi | 0:8fdf9a60065b | 181 | { |
kadonotakashi | 0:8fdf9a60065b | 182 | bool hsrunEnable; /*!< HSRUN mode enable. */ |
kadonotakashi | 0:8fdf9a60065b | 183 | bool llsEnable; /*!< LLS mode enable. */ |
kadonotakashi | 0:8fdf9a60065b | 184 | bool lls2Enable; /*!< LLS2 mode enable. */ |
kadonotakashi | 0:8fdf9a60065b | 185 | bool vlls0Enable; /*!< VLLS0 mode enable. */ |
kadonotakashi | 0:8fdf9a60065b | 186 | } smc_param_t; |
kadonotakashi | 0:8fdf9a60065b | 187 | #endif /* FSL_FEATURE_SMC_HAS_PARAM */ |
kadonotakashi | 0:8fdf9a60065b | 188 | |
kadonotakashi | 0:8fdf9a60065b | 189 | #if (defined(FSL_FEATURE_SMC_HAS_LLS_SUBMODE) && FSL_FEATURE_SMC_HAS_LLS_SUBMODE) || \ |
kadonotakashi | 0:8fdf9a60065b | 190 | (defined(FSL_FEATURE_SMC_HAS_LPOPO) && FSL_FEATURE_SMC_HAS_LPOPO) |
kadonotakashi | 0:8fdf9a60065b | 191 | /*! |
kadonotakashi | 0:8fdf9a60065b | 192 | * @brief SMC Low-Leakage Stop power mode configuration. |
kadonotakashi | 0:8fdf9a60065b | 193 | */ |
kadonotakashi | 0:8fdf9a60065b | 194 | typedef struct _smc_power_mode_lls_config |
kadonotakashi | 0:8fdf9a60065b | 195 | { |
kadonotakashi | 0:8fdf9a60065b | 196 | #if (defined(FSL_FEATURE_SMC_HAS_LLS_SUBMODE) && FSL_FEATURE_SMC_HAS_LLS_SUBMODE) |
kadonotakashi | 0:8fdf9a60065b | 197 | smc_stop_submode_t subMode; /*!< Low-leakage Stop sub-mode */ |
kadonotakashi | 0:8fdf9a60065b | 198 | #endif |
kadonotakashi | 0:8fdf9a60065b | 199 | #if (defined(FSL_FEATURE_SMC_HAS_LPOPO) && FSL_FEATURE_SMC_HAS_LPOPO) |
kadonotakashi | 0:8fdf9a60065b | 200 | bool enableLpoClock; /*!< Enable LPO clock in LLS mode */ |
kadonotakashi | 0:8fdf9a60065b | 201 | #endif |
kadonotakashi | 0:8fdf9a60065b | 202 | } smc_power_mode_lls_config_t; |
kadonotakashi | 0:8fdf9a60065b | 203 | #endif /* (FSL_FEATURE_SMC_HAS_LLS_SUBMODE || FSL_FEATURE_SMC_HAS_LPOPO) */ |
kadonotakashi | 0:8fdf9a60065b | 204 | |
kadonotakashi | 0:8fdf9a60065b | 205 | #if (defined(FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 206 | /*! |
kadonotakashi | 0:8fdf9a60065b | 207 | * @brief SMC Very Low-Leakage Stop power mode configuration. |
kadonotakashi | 0:8fdf9a60065b | 208 | */ |
kadonotakashi | 0:8fdf9a60065b | 209 | typedef struct _smc_power_mode_vlls_config |
kadonotakashi | 0:8fdf9a60065b | 210 | { |
kadonotakashi | 0:8fdf9a60065b | 211 | #if (defined(FSL_FEATURE_SMC_USE_VLLSCTRL_REG) && FSL_FEATURE_SMC_USE_VLLSCTRL_REG) || \ |
kadonotakashi | 0:8fdf9a60065b | 212 | (defined(FSL_FEATURE_SMC_USE_STOPCTRL_VLLSM) && FSL_FEATURE_SMC_USE_STOPCTRL_VLLSM) || \ |
kadonotakashi | 0:8fdf9a60065b | 213 | (defined(FSL_FEATURE_SMC_HAS_LLS_SUBMODE) && FSL_FEATURE_SMC_HAS_LLS_SUBMODE) |
kadonotakashi | 0:8fdf9a60065b | 214 | smc_stop_submode_t subMode; /*!< Very Low-leakage Stop sub-mode */ |
kadonotakashi | 0:8fdf9a60065b | 215 | #endif |
kadonotakashi | 0:8fdf9a60065b | 216 | #if (defined(FSL_FEATURE_SMC_HAS_PORPO) && FSL_FEATURE_SMC_HAS_PORPO) |
kadonotakashi | 0:8fdf9a60065b | 217 | bool enablePorDetectInVlls0; /*!< Enable Power on reset detect in VLLS mode */ |
kadonotakashi | 0:8fdf9a60065b | 218 | #endif |
kadonotakashi | 0:8fdf9a60065b | 219 | #if (defined(FSL_FEATURE_SMC_HAS_RAM2_POWER_OPTION) && FSL_FEATURE_SMC_HAS_RAM2_POWER_OPTION) |
kadonotakashi | 0:8fdf9a60065b | 220 | bool enableRam2InVlls2; /*!< Enable RAM2 power in VLLS2 */ |
kadonotakashi | 0:8fdf9a60065b | 221 | #endif |
kadonotakashi | 0:8fdf9a60065b | 222 | #if (defined(FSL_FEATURE_SMC_HAS_LPOPO) && FSL_FEATURE_SMC_HAS_LPOPO) |
kadonotakashi | 0:8fdf9a60065b | 223 | bool enableLpoClock; /*!< Enable LPO clock in VLLS mode */ |
kadonotakashi | 0:8fdf9a60065b | 224 | #endif |
kadonotakashi | 0:8fdf9a60065b | 225 | } smc_power_mode_vlls_config_t; |
kadonotakashi | 0:8fdf9a60065b | 226 | #endif |
kadonotakashi | 0:8fdf9a60065b | 227 | |
kadonotakashi | 0:8fdf9a60065b | 228 | /******************************************************************************* |
kadonotakashi | 0:8fdf9a60065b | 229 | * API |
kadonotakashi | 0:8fdf9a60065b | 230 | ******************************************************************************/ |
kadonotakashi | 0:8fdf9a60065b | 231 | |
kadonotakashi | 0:8fdf9a60065b | 232 | #if defined(__cplusplus) |
kadonotakashi | 0:8fdf9a60065b | 233 | extern "C" { |
kadonotakashi | 0:8fdf9a60065b | 234 | #endif /* __cplusplus */ |
kadonotakashi | 0:8fdf9a60065b | 235 | |
kadonotakashi | 0:8fdf9a60065b | 236 | /*! @name System mode controller APIs*/ |
kadonotakashi | 0:8fdf9a60065b | 237 | /*@{*/ |
kadonotakashi | 0:8fdf9a60065b | 238 | |
kadonotakashi | 0:8fdf9a60065b | 239 | #if (defined(FSL_FEATURE_SMC_HAS_VERID) && FSL_FEATURE_SMC_HAS_VERID) |
kadonotakashi | 0:8fdf9a60065b | 240 | /*! |
kadonotakashi | 0:8fdf9a60065b | 241 | * @brief Gets the SMC version ID. |
kadonotakashi | 0:8fdf9a60065b | 242 | * |
kadonotakashi | 0:8fdf9a60065b | 243 | * This function gets the SMC version ID, including major version number, |
kadonotakashi | 0:8fdf9a60065b | 244 | * minor version number, and feature specification number. |
kadonotakashi | 0:8fdf9a60065b | 245 | * |
kadonotakashi | 0:8fdf9a60065b | 246 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 247 | * @param versionId Pointer to the version ID structure. |
kadonotakashi | 0:8fdf9a60065b | 248 | */ |
kadonotakashi | 0:8fdf9a60065b | 249 | static inline void SMC_GetVersionId(SMC_Type *base, smc_version_id_t *versionId) |
kadonotakashi | 0:8fdf9a60065b | 250 | { |
kadonotakashi | 0:8fdf9a60065b | 251 | *((uint32_t *)versionId) = base->VERID; |
kadonotakashi | 0:8fdf9a60065b | 252 | } |
kadonotakashi | 0:8fdf9a60065b | 253 | #endif /* FSL_FEATURE_SMC_HAS_VERID */ |
kadonotakashi | 0:8fdf9a60065b | 254 | |
kadonotakashi | 0:8fdf9a60065b | 255 | #if (defined(FSL_FEATURE_SMC_HAS_PARAM) && FSL_FEATURE_SMC_HAS_PARAM) |
kadonotakashi | 0:8fdf9a60065b | 256 | /*! |
kadonotakashi | 0:8fdf9a60065b | 257 | * @brief Gets the SMC parameter. |
kadonotakashi | 0:8fdf9a60065b | 258 | * |
kadonotakashi | 0:8fdf9a60065b | 259 | * This function gets the SMC parameter including the enabled power mdoes. |
kadonotakashi | 0:8fdf9a60065b | 260 | * |
kadonotakashi | 0:8fdf9a60065b | 261 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 262 | * @param param Pointer to the SMC param structure. |
kadonotakashi | 0:8fdf9a60065b | 263 | */ |
kadonotakashi | 0:8fdf9a60065b | 264 | void SMC_GetParam(SMC_Type *base, smc_param_t *param); |
kadonotakashi | 0:8fdf9a60065b | 265 | #endif |
kadonotakashi | 0:8fdf9a60065b | 266 | |
kadonotakashi | 0:8fdf9a60065b | 267 | /*! |
kadonotakashi | 0:8fdf9a60065b | 268 | * @brief Configures all power mode protection settings. |
kadonotakashi | 0:8fdf9a60065b | 269 | * |
kadonotakashi | 0:8fdf9a60065b | 270 | * This function configures the power mode protection settings for |
kadonotakashi | 0:8fdf9a60065b | 271 | * supported power modes in the specified chip family. The available power modes |
kadonotakashi | 0:8fdf9a60065b | 272 | * are defined in the smc_power_mode_protection_t. This should be done at an early |
kadonotakashi | 0:8fdf9a60065b | 273 | * system level initialization stage. See the reference manual for details. |
kadonotakashi | 0:8fdf9a60065b | 274 | * This register can only write once after the power reset. |
kadonotakashi | 0:8fdf9a60065b | 275 | * |
kadonotakashi | 0:8fdf9a60065b | 276 | * The allowed modes are passed as bit map. For example, to allow LLS and VLLS, |
kadonotakashi | 0:8fdf9a60065b | 277 | * use SMC_SetPowerModeProtection(kSMC_AllowPowerModeVlls | kSMC_AllowPowerModeVlps). |
kadonotakashi | 0:8fdf9a60065b | 278 | * To allow all modes, use SMC_SetPowerModeProtection(kSMC_AllowPowerModeAll). |
kadonotakashi | 0:8fdf9a60065b | 279 | * |
kadonotakashi | 0:8fdf9a60065b | 280 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 281 | * @param allowedModes Bitmap of the allowed power modes. |
kadonotakashi | 0:8fdf9a60065b | 282 | */ |
kadonotakashi | 0:8fdf9a60065b | 283 | static inline void SMC_SetPowerModeProtection(SMC_Type *base, uint8_t allowedModes) |
kadonotakashi | 0:8fdf9a60065b | 284 | { |
kadonotakashi | 0:8fdf9a60065b | 285 | base->PMPROT = allowedModes; |
kadonotakashi | 0:8fdf9a60065b | 286 | } |
kadonotakashi | 0:8fdf9a60065b | 287 | |
kadonotakashi | 0:8fdf9a60065b | 288 | /*! |
kadonotakashi | 0:8fdf9a60065b | 289 | * @brief Gets the current power mode status. |
kadonotakashi | 0:8fdf9a60065b | 290 | * |
kadonotakashi | 0:8fdf9a60065b | 291 | * This function returns the current power mode status. After the application |
kadonotakashi | 0:8fdf9a60065b | 292 | * switches the power mode, it should always check the status to check whether it |
kadonotakashi | 0:8fdf9a60065b | 293 | * runs into the specified mode or not. The application should check |
kadonotakashi | 0:8fdf9a60065b | 294 | * this mode before switching to a different mode. The system requires that |
kadonotakashi | 0:8fdf9a60065b | 295 | * only certain modes can switch to other specific modes. See the |
kadonotakashi | 0:8fdf9a60065b | 296 | * reference manual for details and the smc_power_state_t for information about |
kadonotakashi | 0:8fdf9a60065b | 297 | * the power status. |
kadonotakashi | 0:8fdf9a60065b | 298 | * |
kadonotakashi | 0:8fdf9a60065b | 299 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 300 | * @return Current power mode status. |
kadonotakashi | 0:8fdf9a60065b | 301 | */ |
kadonotakashi | 0:8fdf9a60065b | 302 | static inline smc_power_state_t SMC_GetPowerModeState(SMC_Type *base) |
kadonotakashi | 0:8fdf9a60065b | 303 | { |
kadonotakashi | 0:8fdf9a60065b | 304 | return (smc_power_state_t)base->PMSTAT; |
kadonotakashi | 0:8fdf9a60065b | 305 | } |
kadonotakashi | 0:8fdf9a60065b | 306 | |
kadonotakashi | 0:8fdf9a60065b | 307 | /*! |
kadonotakashi | 0:8fdf9a60065b | 308 | * @brief Prepares to enter stop modes. |
kadonotakashi | 0:8fdf9a60065b | 309 | * |
kadonotakashi | 0:8fdf9a60065b | 310 | * This function should be called before entering STOP/VLPS/LLS/VLLS modes. |
kadonotakashi | 0:8fdf9a60065b | 311 | */ |
kadonotakashi | 0:8fdf9a60065b | 312 | void SMC_PreEnterStopModes(void); |
kadonotakashi | 0:8fdf9a60065b | 313 | |
kadonotakashi | 0:8fdf9a60065b | 314 | /*! |
kadonotakashi | 0:8fdf9a60065b | 315 | * @brief Recovers after wake up from stop modes. |
kadonotakashi | 0:8fdf9a60065b | 316 | * |
kadonotakashi | 0:8fdf9a60065b | 317 | * This function should be called after wake up from STOP/VLPS/LLS/VLLS modes. |
kadonotakashi | 0:8fdf9a60065b | 318 | * It is used with @ref SMC_PreEnterStopModes. |
kadonotakashi | 0:8fdf9a60065b | 319 | */ |
kadonotakashi | 0:8fdf9a60065b | 320 | void SMC_PostExitStopModes(void); |
kadonotakashi | 0:8fdf9a60065b | 321 | |
kadonotakashi | 0:8fdf9a60065b | 322 | /*! |
kadonotakashi | 0:8fdf9a60065b | 323 | * @brief Prepares to enter wait modes. |
kadonotakashi | 0:8fdf9a60065b | 324 | * |
kadonotakashi | 0:8fdf9a60065b | 325 | * This function should be called before entering WAIT/VLPW modes. |
kadonotakashi | 0:8fdf9a60065b | 326 | */ |
kadonotakashi | 0:8fdf9a60065b | 327 | static inline void SMC_PreEnterWaitModes(void) |
kadonotakashi | 0:8fdf9a60065b | 328 | { |
kadonotakashi | 0:8fdf9a60065b | 329 | __disable_irq(); |
kadonotakashi | 0:8fdf9a60065b | 330 | __ISB(); |
kadonotakashi | 0:8fdf9a60065b | 331 | } |
kadonotakashi | 0:8fdf9a60065b | 332 | |
kadonotakashi | 0:8fdf9a60065b | 333 | /*! |
kadonotakashi | 0:8fdf9a60065b | 334 | * @brief Recovers after wake up from stop modes. |
kadonotakashi | 0:8fdf9a60065b | 335 | * |
kadonotakashi | 0:8fdf9a60065b | 336 | * This function should be called after wake up from WAIT/VLPW modes. |
kadonotakashi | 0:8fdf9a60065b | 337 | * It is used with @ref SMC_PreEnterWaitModes. |
kadonotakashi | 0:8fdf9a60065b | 338 | */ |
kadonotakashi | 0:8fdf9a60065b | 339 | static inline void SMC_PostExitWaitModes(void) |
kadonotakashi | 0:8fdf9a60065b | 340 | { |
kadonotakashi | 0:8fdf9a60065b | 341 | __enable_irq(); |
kadonotakashi | 0:8fdf9a60065b | 342 | __ISB(); |
kadonotakashi | 0:8fdf9a60065b | 343 | } |
kadonotakashi | 0:8fdf9a60065b | 344 | |
kadonotakashi | 0:8fdf9a60065b | 345 | /*! |
kadonotakashi | 0:8fdf9a60065b | 346 | * @brief Configures the system to RUN power mode. |
kadonotakashi | 0:8fdf9a60065b | 347 | * |
kadonotakashi | 0:8fdf9a60065b | 348 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 349 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 350 | */ |
kadonotakashi | 0:8fdf9a60065b | 351 | status_t SMC_SetPowerModeRun(SMC_Type *base); |
kadonotakashi | 0:8fdf9a60065b | 352 | |
kadonotakashi | 0:8fdf9a60065b | 353 | #if (defined(FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) && FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE) |
kadonotakashi | 0:8fdf9a60065b | 354 | /*! |
kadonotakashi | 0:8fdf9a60065b | 355 | * @brief Configures the system to HSRUN power mode. |
kadonotakashi | 0:8fdf9a60065b | 356 | * |
kadonotakashi | 0:8fdf9a60065b | 357 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 358 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 359 | */ |
kadonotakashi | 0:8fdf9a60065b | 360 | status_t SMC_SetPowerModeHsrun(SMC_Type *base); |
kadonotakashi | 0:8fdf9a60065b | 361 | #endif /* FSL_FEATURE_SMC_HAS_HIGH_SPEED_RUN_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 362 | |
kadonotakashi | 0:8fdf9a60065b | 363 | /*! |
kadonotakashi | 0:8fdf9a60065b | 364 | * @brief Configures the system to WAIT power mode. |
kadonotakashi | 0:8fdf9a60065b | 365 | * |
kadonotakashi | 0:8fdf9a60065b | 366 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 367 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 368 | */ |
kadonotakashi | 0:8fdf9a60065b | 369 | status_t SMC_SetPowerModeWait(SMC_Type *base); |
kadonotakashi | 0:8fdf9a60065b | 370 | |
kadonotakashi | 0:8fdf9a60065b | 371 | /*! |
kadonotakashi | 0:8fdf9a60065b | 372 | * @brief Configures the system to Stop power mode. |
kadonotakashi | 0:8fdf9a60065b | 373 | * |
kadonotakashi | 0:8fdf9a60065b | 374 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 375 | * @param option Partial Stop mode option. |
kadonotakashi | 0:8fdf9a60065b | 376 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 377 | */ |
kadonotakashi | 0:8fdf9a60065b | 378 | status_t SMC_SetPowerModeStop(SMC_Type *base, smc_partial_stop_option_t option); |
kadonotakashi | 0:8fdf9a60065b | 379 | |
kadonotakashi | 0:8fdf9a60065b | 380 | #if (defined(FSL_FEATURE_SMC_HAS_LPWUI) && FSL_FEATURE_SMC_HAS_LPWUI) |
kadonotakashi | 0:8fdf9a60065b | 381 | /*! |
kadonotakashi | 0:8fdf9a60065b | 382 | * @brief Configures the system to VLPR power mode. |
kadonotakashi | 0:8fdf9a60065b | 383 | * |
kadonotakashi | 0:8fdf9a60065b | 384 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 385 | * @param wakeupMode Enter Normal Run mode if true, else stay in VLPR mode. |
kadonotakashi | 0:8fdf9a60065b | 386 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 387 | */ |
kadonotakashi | 0:8fdf9a60065b | 388 | status_t SMC_SetPowerModeVlpr(SMC_Type *base, bool wakeupMode); |
kadonotakashi | 0:8fdf9a60065b | 389 | #else |
kadonotakashi | 0:8fdf9a60065b | 390 | /*! |
kadonotakashi | 0:8fdf9a60065b | 391 | * @brief Configures the system to VLPR power mode. |
kadonotakashi | 0:8fdf9a60065b | 392 | * |
kadonotakashi | 0:8fdf9a60065b | 393 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 394 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 395 | */ |
kadonotakashi | 0:8fdf9a60065b | 396 | status_t SMC_SetPowerModeVlpr(SMC_Type *base); |
kadonotakashi | 0:8fdf9a60065b | 397 | #endif /* FSL_FEATURE_SMC_HAS_LPWUI */ |
kadonotakashi | 0:8fdf9a60065b | 398 | |
kadonotakashi | 0:8fdf9a60065b | 399 | /*! |
kadonotakashi | 0:8fdf9a60065b | 400 | * @brief Configures the system to VLPW power mode. |
kadonotakashi | 0:8fdf9a60065b | 401 | * |
kadonotakashi | 0:8fdf9a60065b | 402 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 403 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 404 | */ |
kadonotakashi | 0:8fdf9a60065b | 405 | status_t SMC_SetPowerModeVlpw(SMC_Type *base); |
kadonotakashi | 0:8fdf9a60065b | 406 | |
kadonotakashi | 0:8fdf9a60065b | 407 | /*! |
kadonotakashi | 0:8fdf9a60065b | 408 | * @brief Configures the system to VLPS power mode. |
kadonotakashi | 0:8fdf9a60065b | 409 | * |
kadonotakashi | 0:8fdf9a60065b | 410 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 411 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 412 | */ |
kadonotakashi | 0:8fdf9a60065b | 413 | status_t SMC_SetPowerModeVlps(SMC_Type *base); |
kadonotakashi | 0:8fdf9a60065b | 414 | |
kadonotakashi | 0:8fdf9a60065b | 415 | #if (defined(FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 416 | #if ((defined(FSL_FEATURE_SMC_HAS_LLS_SUBMODE) && FSL_FEATURE_SMC_HAS_LLS_SUBMODE) || \ |
kadonotakashi | 0:8fdf9a60065b | 417 | (defined(FSL_FEATURE_SMC_HAS_LPOPO) && FSL_FEATURE_SMC_HAS_LPOPO)) |
kadonotakashi | 0:8fdf9a60065b | 418 | /*! |
kadonotakashi | 0:8fdf9a60065b | 419 | * @brief Configures the system to LLS power mode. |
kadonotakashi | 0:8fdf9a60065b | 420 | * |
kadonotakashi | 0:8fdf9a60065b | 421 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 422 | * @param config The LLS power mode configuration structure |
kadonotakashi | 0:8fdf9a60065b | 423 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 424 | */ |
kadonotakashi | 0:8fdf9a60065b | 425 | status_t SMC_SetPowerModeLls(SMC_Type *base, const smc_power_mode_lls_config_t *config); |
kadonotakashi | 0:8fdf9a60065b | 426 | #else |
kadonotakashi | 0:8fdf9a60065b | 427 | /*! |
kadonotakashi | 0:8fdf9a60065b | 428 | * @brief Configures the system to LLS power mode. |
kadonotakashi | 0:8fdf9a60065b | 429 | * |
kadonotakashi | 0:8fdf9a60065b | 430 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 431 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 432 | */ |
kadonotakashi | 0:8fdf9a60065b | 433 | status_t SMC_SetPowerModeLls(SMC_Type *base); |
kadonotakashi | 0:8fdf9a60065b | 434 | #endif |
kadonotakashi | 0:8fdf9a60065b | 435 | #endif /* FSL_FEATURE_SMC_HAS_LOW_LEAKAGE_STOP_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 436 | |
kadonotakashi | 0:8fdf9a60065b | 437 | #if (defined(FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) && FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE) |
kadonotakashi | 0:8fdf9a60065b | 438 | /*! |
kadonotakashi | 0:8fdf9a60065b | 439 | * @brief Configures the system to VLLS power mode. |
kadonotakashi | 0:8fdf9a60065b | 440 | * |
kadonotakashi | 0:8fdf9a60065b | 441 | * @param base SMC peripheral base address. |
kadonotakashi | 0:8fdf9a60065b | 442 | * @param config The VLLS power mode configuration structure. |
kadonotakashi | 0:8fdf9a60065b | 443 | * @return SMC configuration error code. |
kadonotakashi | 0:8fdf9a60065b | 444 | */ |
kadonotakashi | 0:8fdf9a60065b | 445 | status_t SMC_SetPowerModeVlls(SMC_Type *base, const smc_power_mode_vlls_config_t *config); |
kadonotakashi | 0:8fdf9a60065b | 446 | #endif /* FSL_FEATURE_SMC_HAS_VERY_LOW_LEAKAGE_STOP_MODE */ |
kadonotakashi | 0:8fdf9a60065b | 447 | |
kadonotakashi | 0:8fdf9a60065b | 448 | /*@}*/ |
kadonotakashi | 0:8fdf9a60065b | 449 | |
kadonotakashi | 0:8fdf9a60065b | 450 | #if defined(__cplusplus) |
kadonotakashi | 0:8fdf9a60065b | 451 | } |
kadonotakashi | 0:8fdf9a60065b | 452 | #endif /* __cplusplus */ |
kadonotakashi | 0:8fdf9a60065b | 453 | |
kadonotakashi | 0:8fdf9a60065b | 454 | /*! @}*/ |
kadonotakashi | 0:8fdf9a60065b | 455 | |
kadonotakashi | 0:8fdf9a60065b | 456 | #endif /* _FSL_SMC_H_ */ |