]> git.leonardobizzoni.com Git - pioneer-stm32/blob
6ff3321a65e53ff89f074e2684c650f7b6357234
[pioneer-stm32] /
1 /**\r
2   ******************************************************************************\r
3   * @file    stm32f7xx_hal_pwr_ex.c\r
4   * @author  MCD Application Team\r
5   * @brief   Extended PWR HAL module driver.\r
6   *          This file provides firmware functions to manage the following \r
7   *          functionalities of PWR extension peripheral:           \r
8   *           + Peripheral Extended features functions\r
9   *         \r
10   ******************************************************************************\r
11   * @attention\r
12   *\r
13   * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.\r
14   * All rights reserved.</center></h2>\r
15   *\r
16   * This software component is licensed by ST under BSD 3-Clause license,\r
17   * the "License"; You may not use this file except in compliance with the\r
18   * License. You may obtain a copy of the License at:\r
19   *                        opensource.org/licenses/BSD-3-Clause\r
20   *\r
21   ******************************************************************************\r
22   */ \r
23 \r
24 /* Includes ------------------------------------------------------------------*/\r
25 #include "stm32f7xx_hal.h"\r
26 \r
27 /** @addtogroup STM32F7xx_HAL_Driver\r
28   * @{\r
29   */\r
30 \r
31 /** @defgroup PWREx PWREx\r
32   * @brief PWR HAL module driver\r
33   * @{\r
34   */\r
35 \r
36 #ifdef HAL_PWR_MODULE_ENABLED\r
37 \r
38 /* Private typedef -----------------------------------------------------------*/\r
39 /* Private define ------------------------------------------------------------*/\r
40 /** @addtogroup PWREx_Private_Constants\r
41   * @{\r
42   */    \r
43 #define PWR_OVERDRIVE_TIMEOUT_VALUE  1000\r
44 #define PWR_UDERDRIVE_TIMEOUT_VALUE  1000\r
45 #define PWR_BKPREG_TIMEOUT_VALUE     1000\r
46 #define PWR_VOSRDY_TIMEOUT_VALUE     1000\r
47 /**\r
48   * @}\r
49   */\r
50     \r
51 /* Private macro -------------------------------------------------------------*/\r
52 /* Private variables ---------------------------------------------------------*/\r
53 /* Private function prototypes -----------------------------------------------*/\r
54 /* Private functions ---------------------------------------------------------*/\r
55 /** @defgroup PWREx_Exported_Functions PWREx Exported Functions\r
56   *  @{\r
57   */\r
58 \r
59 /** @defgroup PWREx_Exported_Functions_Group1 Peripheral Extended features functions \r
60   *  @brief Peripheral Extended features functions \r
61   *\r
62 @verbatim   \r
63 \r
64  ===============================================================================\r
65                  ##### Peripheral extended features functions #####\r
66  ===============================================================================\r
67 \r
68     *** Main and Backup Regulators configuration ***\r
69     ================================================\r
70     [..] \r
71       (+) The backup domain includes 4 Kbytes of backup SRAM accessible only from \r
72           the CPU, and address in 32-bit, 16-bit or 8-bit mode. Its content is \r
73           retained even in Standby or VBAT mode when the low power backup regulator\r
74           is enabled. It can be considered as an internal EEPROM when VBAT is \r
75           always present. You can use the HAL_PWREx_EnableBkUpReg() function to \r
76           enable the low power backup regulator. \r
77 \r
78       (+) When the backup domain is supplied by VDD (analog switch connected to VDD) \r
79           the backup SRAM is powered from VDD which replaces the VBAT power supply to \r
80           save battery life.\r
81 \r
82       (+) The backup SRAM is not mass erased by a tamper event. It is read \r
83           protected to prevent confidential data, such as cryptographic private \r
84           key, from being accessed. The backup SRAM can be erased only through \r
85           the Flash interface when a protection level change from level 1 to \r
86           level 0 is requested. \r
87       -@- Refer to the description of Read protection (RDP) in the Flash \r
88           programming manual.\r
89 \r
90       (+) The main internal regulator can be configured to have a tradeoff between \r
91           performance and power consumption when the device does not operate at \r
92           the maximum frequency. This is done through __HAL_PWR_MAINREGULATORMODE_CONFIG() \r
93           macro which configure VOS bit in PWR_CR register\r
94           \r
95         Refer to the product datasheets for more details.\r
96 \r
97     *** FLASH Power Down configuration ****\r
98     =======================================\r
99     [..] \r
100       (+) By setting the FPDS bit in the PWR_CR register by using the \r
101           HAL_PWREx_EnableFlashPowerDown() function, the Flash memory also enters power \r
102           down mode when the device enters Stop mode. When the Flash memory \r
103           is in power down mode, an additional startup delay is incurred when \r
104           waking up from Stop mode.\r
105 \r
106     *** Over-Drive and Under-Drive configuration ****\r
107     =================================================\r
108     [..]         \r
109        (+) In Run mode: the main regulator has 2 operating modes available:\r
110         (++) Normal mode: The CPU and core logic operate at maximum frequency at a given \r
111              voltage scaling (scale 1, scale 2 or scale 3)\r
112         (++) Over-drive mode: This mode allows the CPU and the core logic to operate at a \r
113             higher frequency than the normal mode for a given voltage scaling (scale 1,  \r
114             scale 2 or scale 3). This mode is enabled through HAL_PWREx_EnableOverDrive() function and\r
115             disabled by HAL_PWREx_DisableOverDrive() function, to enter or exit from Over-drive mode please follow \r
116             the sequence described in Reference manual.\r
117              \r
118        (+) In Stop mode: the main regulator or low power regulator supplies a low power \r
119            voltage to the 1.2V domain, thus preserving the content of registers \r
120            and internal SRAM. 2 operating modes are available:\r
121          (++) Normal mode: the 1.2V domain is preserved in nominal leakage mode. This mode is only \r
122               available when the main regulator or the low power regulator is used in Scale 3 or \r
123               low voltage mode.\r
124          (++) Under-drive mode: the 1.2V domain is preserved in reduced leakage mode. This mode is only\r
125               available when the main regulator or the low power regulator is in low voltage mode.\r
126 \r
127 @endverbatim\r
128   * @{\r
129   */\r
130 \r
131 /**\r
132   * @brief Enables the Backup Regulator.\r
133   * @retval HAL status\r
134   */\r
135 HAL_StatusTypeDef HAL_PWREx_EnableBkUpReg(void)\r
136 {\r
137   uint32_t tickstart = 0;\r
138 \r
139   /* Enable Backup regulator */\r
140   PWR->CSR1 |= PWR_CSR1_BRE;\r
141     \r
142   /* Workaround for the following hardware bug: */\r
143   /* Id 19: PWR : No STANDBY wake-up when Back-up RAM enabled (ref. Errata Sheet p23) */\r
144   PWR->CSR1 |= PWR_CSR1_EIWUP;\r
145 \r
146   /* Get tick */\r
147   tickstart = HAL_GetTick();\r
148 \r
149   /* Wait till Backup regulator ready flag is set */  \r
150   while(__HAL_PWR_GET_FLAG(PWR_FLAG_BRR) == RESET)\r
151   {\r
152     if((HAL_GetTick() - tickstart ) > PWR_BKPREG_TIMEOUT_VALUE)\r
153     {\r
154       return HAL_TIMEOUT;\r
155     } \r
156   }\r
157   return HAL_OK;\r
158 }\r
159 \r
160 /**\r
161   * @brief Disables the Backup Regulator.\r
162   * @retval HAL status\r
163   */\r
164 HAL_StatusTypeDef HAL_PWREx_DisableBkUpReg(void)\r
165 {\r
166   uint32_t tickstart = 0;\r
167   \r
168   /* Disable Backup regulator */\r
169   PWR->CSR1 &= (uint32_t)~((uint32_t)PWR_CSR1_BRE);\r
170   \r
171   /* Workaround for the following hardware bug: */\r
172   /* Id 19: PWR : No STANDBY wake-up when Back-up RAM enabled (ref. Errata Sheet p23) */\r
173   PWR->CSR1 |= PWR_CSR1_EIWUP;\r
174 \r
175   /* Get tick */\r
176   tickstart = HAL_GetTick();\r
177 \r
178   /* Wait till Backup regulator ready flag is set */  \r
179   while(__HAL_PWR_GET_FLAG(PWR_FLAG_BRR) != RESET)\r
180   {\r
181     if((HAL_GetTick() - tickstart ) > PWR_BKPREG_TIMEOUT_VALUE)\r
182     {\r
183       return HAL_TIMEOUT;\r
184     } \r
185   }\r
186   return HAL_OK;\r
187 }\r
188 \r
189 /**\r
190   * @brief Enables the Flash Power Down in Stop mode.\r
191   * @retval None\r
192   */\r
193 void HAL_PWREx_EnableFlashPowerDown(void)\r
194 {\r
195   /* Enable the Flash Power Down */\r
196   PWR->CR1 |= PWR_CR1_FPDS;\r
197 }\r
198 \r
199 /**\r
200   * @brief Disables the Flash Power Down in Stop mode.\r
201   * @retval None\r
202   */\r
203 void HAL_PWREx_DisableFlashPowerDown(void)\r
204 {\r
205   /* Disable the Flash Power Down */\r
206   PWR->CR1 &= (uint32_t)~((uint32_t)PWR_CR1_FPDS);\r
207 }\r
208 \r
209 /**\r
210   * @brief Enables Main Regulator low voltage mode.\r
211   * @retval None\r
212   */\r
213 void HAL_PWREx_EnableMainRegulatorLowVoltage(void)\r
214 {\r
215   /* Enable Main regulator low voltage */\r
216   PWR->CR1 |= PWR_CR1_MRUDS;\r
217 }\r
218 \r
219 /**\r
220   * @brief Disables Main Regulator low voltage mode.\r
221   * @retval None\r
222   */\r
223 void HAL_PWREx_DisableMainRegulatorLowVoltage(void)\r
224 {  \r
225   /* Disable Main regulator low voltage */\r
226   PWR->CR1 &= (uint32_t)~((uint32_t)PWR_CR1_MRUDS);\r
227 }\r
228 \r
229 /**\r
230   * @brief Enables Low Power Regulator low voltage mode.\r
231   * @retval None\r
232   */\r
233 void HAL_PWREx_EnableLowRegulatorLowVoltage(void)\r
234 {\r
235   /* Enable low power regulator */\r
236   PWR->CR1 |= PWR_CR1_LPUDS;\r
237 }\r
238 \r
239 /**\r
240   * @brief Disables Low Power Regulator low voltage mode.\r
241   * @retval None\r
242   */\r
243 void HAL_PWREx_DisableLowRegulatorLowVoltage(void)\r
244 {\r
245   /* Disable low power regulator */\r
246   PWR->CR1 &= (uint32_t)~((uint32_t)PWR_CR1_LPUDS);\r
247 }\r
248 \r
249 /**\r
250   * @brief  Activates the Over-Drive mode.\r
251   * @note   This mode allows the CPU and the core logic to operate at a higher frequency\r
252   *         than the normal mode for a given voltage scaling (scale 1, scale 2 or scale 3).   \r
253   * @note   It is recommended to enter or exit Over-drive mode when the application is not running \r
254   *         critical tasks and when the system clock source is either HSI or HSE. \r
255   *         During the Over-drive switch activation, no peripheral clocks should be enabled.   \r
256   *         The peripheral clocks must be enabled once the Over-drive mode is activated.   \r
257   * @retval HAL status\r
258   */\r
259 HAL_StatusTypeDef HAL_PWREx_EnableOverDrive(void)\r
260 {\r
261   uint32_t tickstart = 0;\r
262 \r
263   __HAL_RCC_PWR_CLK_ENABLE();\r
264   \r
265   /* Enable the Over-drive to extend the clock frequency to 216 MHz */\r
266   __HAL_PWR_OVERDRIVE_ENABLE();\r
267 \r
268   /* Get tick */\r
269   tickstart = HAL_GetTick();\r
270 \r
271   while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODRDY))\r
272   {\r
273     if((HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)\r
274     {\r
275       return HAL_TIMEOUT;\r
276     }\r
277   }\r
278   \r
279   /* Enable the Over-drive switch */\r
280   __HAL_PWR_OVERDRIVESWITCHING_ENABLE();\r
281 \r
282   /* Get tick */\r
283   tickstart = HAL_GetTick();\r
284 \r
285   while(!__HAL_PWR_GET_FLAG(PWR_FLAG_ODSWRDY))\r
286   {\r
287     if((HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)\r
288     {\r
289       return HAL_TIMEOUT;\r
290     }\r
291   } \r
292   return HAL_OK;\r
293 }\r
294 \r
295 /**\r
296   * @brief  Deactivates the Over-Drive mode.\r
297   * @note   This mode allows the CPU and the core logic to operate at a higher frequency\r
298   *         than the normal mode for a given voltage scaling (scale 1, scale 2 or scale 3).    \r
299   * @note   It is recommended to enter or exit Over-drive mode when the application is not running \r
300   *         critical tasks and when the system clock source is either HSI or HSE. \r
301   *         During the Over-drive switch activation, no peripheral clocks should be enabled.   \r
302   *         The peripheral clocks must be enabled once the Over-drive mode is activated.\r
303   * @retval HAL status\r
304   */\r
305 HAL_StatusTypeDef HAL_PWREx_DisableOverDrive(void)\r
306 {\r
307   uint32_t tickstart = 0;\r
308   \r
309   __HAL_RCC_PWR_CLK_ENABLE();\r
310     \r
311   /* Disable the Over-drive switch */\r
312   __HAL_PWR_OVERDRIVESWITCHING_DISABLE();\r
313   \r
314   /* Get tick */\r
315   tickstart = HAL_GetTick();\r
316  \r
317   while(__HAL_PWR_GET_FLAG(PWR_FLAG_ODSWRDY))\r
318   {\r
319     if((HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)\r
320     {\r
321       return HAL_TIMEOUT;\r
322     }\r
323   } \r
324   \r
325   /* Disable the Over-drive */\r
326   __HAL_PWR_OVERDRIVE_DISABLE();\r
327 \r
328   /* Get tick */\r
329   tickstart = HAL_GetTick();\r
330 \r
331   while(__HAL_PWR_GET_FLAG(PWR_FLAG_ODRDY))\r
332   {\r
333     if((HAL_GetTick() - tickstart ) > PWR_OVERDRIVE_TIMEOUT_VALUE)\r
334     {\r
335       return HAL_TIMEOUT;\r
336     }\r
337   }\r
338   \r
339   return HAL_OK;\r
340 }\r
341 \r
342 /**\r
343   * @brief  Enters in Under-Drive STOP mode.\r
344   * \r
345   * @note    This mode can be selected only when the Under-Drive is already active \r
346   *   \r
347   * @note    This mode is enabled only with STOP low power mode.\r
348   *          In this mode, the 1.2V domain is preserved in reduced leakage mode. This \r
349   *          mode is only available when the main regulator or the low power regulator \r
350   *          is in low voltage mode\r
351   *        \r
352   * @note   If the Under-drive mode was enabled, it is automatically disabled after \r
353   *         exiting Stop mode. \r
354   *         When the voltage regulator operates in Under-drive mode, an additional  \r
355   *         startup delay is induced when waking up from Stop mode.\r
356   *                    \r
357   * @note   In Stop mode, all I/O pins keep the same state as in Run mode.\r
358   *   \r
359   * @note   When exiting Stop mode by issuing an interrupt or a wakeup event, \r
360   *         the HSI RC oscillator is selected as system clock.\r
361   *           \r
362   * @note   When the voltage regulator operates in low power mode, an additional \r
363   *         startup delay is incurred when waking up from Stop mode. \r
364   *         By keeping the internal regulator ON during Stop mode, the consumption \r
365   *         is higher although the startup time is reduced.\r
366   *     \r
367   * @param  Regulator specifies the regulator state in STOP mode.\r
368   *          This parameter can be one of the following values:\r
369   *            @arg PWR_MAINREGULATOR_UNDERDRIVE_ON:  Main Regulator in under-drive mode \r
370   *                 and Flash memory in power-down when the device is in Stop under-drive mode\r
371   *            @arg PWR_LOWPOWERREGULATOR_UNDERDRIVE_ON:  Low Power Regulator in under-drive mode \r
372   *                and Flash memory in power-down when the device is in Stop under-drive mode\r
373   * @param  STOPEntry specifies if STOP mode in entered with WFI or WFE instruction.\r
374   *          This parameter can be one of the following values:\r
375   *            @arg PWR_SLEEPENTRY_WFI: enter STOP mode with WFI instruction\r
376   *            @arg PWR_SLEEPENTRY_WFE: enter STOP mode with WFE instruction\r
377   * @retval None\r
378   */\r
379 HAL_StatusTypeDef HAL_PWREx_EnterUnderDriveSTOPMode(uint32_t Regulator, uint8_t STOPEntry)\r
380 {\r
381   uint32_t tempreg = 0;\r
382   uint32_t tickstart = 0;\r
383   \r
384   /* Check the parameters */\r
385   assert_param(IS_PWR_REGULATOR_UNDERDRIVE(Regulator));\r
386   assert_param(IS_PWR_STOP_ENTRY(STOPEntry));\r
387   \r
388   /* Enable Power ctrl clock */\r
389   __HAL_RCC_PWR_CLK_ENABLE();\r
390   /* Enable the Under-drive Mode ---------------------------------------------*/\r
391   /* Clear Under-drive flag */\r
392   __HAL_PWR_CLEAR_ODRUDR_FLAG();\r
393   \r
394   /* Enable the Under-drive */ \r
395   __HAL_PWR_UNDERDRIVE_ENABLE();\r
396 \r
397   /* Get tick */\r
398   tickstart = HAL_GetTick();\r
399 \r
400   /* Wait for UnderDrive mode is ready */\r
401   while(__HAL_PWR_GET_FLAG(PWR_FLAG_UDRDY))\r
402   {\r
403     if((HAL_GetTick() - tickstart ) > PWR_UDERDRIVE_TIMEOUT_VALUE)\r
404     {\r
405       return HAL_TIMEOUT;\r
406     }\r
407   }\r
408   \r
409   /* Select the regulator state in STOP mode ---------------------------------*/\r
410   tempreg = PWR->CR1;\r
411   /* Clear PDDS, LPDS, MRLUDS and LPLUDS bits */\r
412   tempreg &= (uint32_t)~(PWR_CR1_PDDS | PWR_CR1_LPDS | PWR_CR1_LPUDS | PWR_CR1_MRUDS);\r
413   \r
414   /* Set LPDS, MRLUDS and LPLUDS bits according to PWR_Regulator value */\r
415   tempreg |= Regulator;\r
416   \r
417   /* Store the new value */\r
418   PWR->CR1 = tempreg;\r
419   \r
420   /* Set SLEEPDEEP bit of Cortex System Control Register */\r
421   SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;\r
422   \r
423   /* Select STOP mode entry --------------------------------------------------*/\r
424   if(STOPEntry == PWR_SLEEPENTRY_WFI)\r
425   {   \r
426     /* Request Wait For Interrupt */\r
427     __WFI();\r
428   }\r
429   else\r
430   {\r
431     /* Request Wait For Event */\r
432     __WFE();\r
433   }\r
434   /* Reset SLEEPDEEP bit of Cortex System Control Register */\r
435   SCB->SCR &= (uint32_t)~((uint32_t)SCB_SCR_SLEEPDEEP_Msk);\r
436 \r
437   return HAL_OK;  \r
438 }\r
439 \r
440 /**\r
441   * @brief Returns Voltage Scaling Range.\r
442   * @retval VOS bit field (PWR_REGULATOR_VOLTAGE_SCALE1, PWR_REGULATOR_VOLTAGE_SCALE2 or \r
443   *            PWR_REGULATOR_VOLTAGE_SCALE3)PWR_REGULATOR_VOLTAGE_SCALE1\r
444   */  \r
445 uint32_t HAL_PWREx_GetVoltageRange(void)\r
446 {\r
447   return  (PWR->CR1 & PWR_CR1_VOS);\r
448 }\r
449 \r
450 /**\r
451   * @brief Configures the main internal regulator output voltage.\r
452   * @param  VoltageScaling specifies the regulator output voltage to achieve\r
453   *         a tradeoff between performance and power consumption.\r
454   *          This parameter can be one of the following values:\r
455   *            @arg PWR_REGULATOR_VOLTAGE_SCALE1: Regulator voltage output range 1 mode,\r
456   *                                                typical output voltage at 1.4 V,  \r
457   *                                                system frequency up to 216 MHz.\r
458   *            @arg PWR_REGULATOR_VOLTAGE_SCALE2: Regulator voltage output range 2 mode,\r
459   *                                                typical output voltage at 1.2 V,                \r
460   *                                                system frequency up to 180 MHz.\r
461   *            @arg PWR_REGULATOR_VOLTAGE_SCALE3: Regulator voltage output range 2 mode,\r
462   *                                                typical output voltage at 1.00 V,                \r
463   *                                                system frequency up to 151 MHz.\r
464   * @note To update the system clock frequency(SYSCLK):\r
465   *        - Set the HSI or HSE as system clock frequency using the HAL_RCC_ClockConfig().\r
466   *        - Call the HAL_RCC_OscConfig() to configure the PLL.\r
467   *        - Call HAL_PWREx_ConfigVoltageScaling() API to adjust the voltage scale.\r
468   *        - Set the new system clock frequency using the HAL_RCC_ClockConfig().\r
469   * @note The scale can be modified only when the HSI or HSE clock source is selected \r
470   *        as system clock source, otherwise the API returns HAL_ERROR.  \r
471   * @note When the PLL is OFF, the voltage scale 3 is automatically selected and the VOS bits\r
472   *       value in the PWR_CR1 register are not taken in account.\r
473   * @note This API forces the PLL state ON to allow the possibility to configure the voltage scale 1 or 2.\r
474   * @note The new voltage scale is active only when the PLL is ON.  \r
475   * @retval HAL Status\r
476   */\r
477 HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling)\r
478 {\r
479   uint32_t tickstart = 0;\r
480 \r
481   assert_param(IS_PWR_REGULATOR_VOLTAGE(VoltageScaling));\r
482 \r
483   /* Enable Power ctrl clock */\r
484   __HAL_RCC_PWR_CLK_ENABLE();\r
485 \r
486   /* Check if the PLL is used as system clock or not */\r
487   if(__HAL_RCC_GET_SYSCLK_SOURCE() != RCC_CFGR_SWS_PLL)\r
488   {\r
489     /* Disable the main PLL */\r
490     __HAL_RCC_PLL_DISABLE();\r
491     \r
492     /* Get Start Tick */\r
493     tickstart = HAL_GetTick();    \r
494     /* Wait till PLL is disabled */  \r
495     while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) != RESET)\r
496     {\r
497       if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)\r
498       {\r
499         return HAL_TIMEOUT;\r
500       }\r
501     }\r
502     \r
503     /* Set Range */\r
504     __HAL_PWR_VOLTAGESCALING_CONFIG(VoltageScaling);\r
505     \r
506     /* Enable the main PLL */\r
507     __HAL_RCC_PLL_ENABLE();\r
508     \r
509     /* Get Start Tick */\r
510     tickstart = HAL_GetTick();\r
511     /* Wait till PLL is ready */  \r
512     while(__HAL_RCC_GET_FLAG(RCC_FLAG_PLLRDY) == RESET)\r
513     {\r
514       if((HAL_GetTick() - tickstart ) > PLL_TIMEOUT_VALUE)\r
515       {\r
516         return HAL_TIMEOUT;\r
517       } \r
518     }\r
519     \r
520     /* Get Start Tick */\r
521     tickstart = HAL_GetTick();\r
522     while((__HAL_PWR_GET_FLAG(PWR_FLAG_VOSRDY) == RESET))\r
523     {\r
524       if((HAL_GetTick() - tickstart ) > PWR_VOSRDY_TIMEOUT_VALUE)\r
525       {\r
526         return HAL_TIMEOUT;\r
527       } \r
528     }\r
529   }\r
530   else\r
531   {\r
532     return HAL_ERROR;\r
533   }\r
534   return HAL_OK;\r
535 }\r
536 \r
537 /**\r
538   * @}\r
539   */\r
540 \r
541 /**\r
542   * @}\r
543   */\r
544 \r
545 #endif /* HAL_PWR_MODULE_ENABLED */\r
546 /**\r
547   * @}\r
548   */\r
549 \r
550 /**\r
551   * @}\r
552   */\r
553 \r
554 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/\r