fsl_smc.h 17 KB

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