1 /**
2   ******************************************************************************
3   * @file    stm32h5xx_hal_pwr_ex.h
4   * @author  MCD Application Team
5   * @brief   Header file of PWR HAL Extended module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2023 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software component is licensed by ST under BSD 3-Clause license,
13   * the "License"; You may not use this file except in compliance with the
14   * License. You may obtain a copy of the License at:
15   *                        opensource.org/licenses/BSD-3-Clause
16   *
17   ******************************************************************************
18   */
19 
20 /* Define to prevent recursive inclusion -------------------------------------*/
21 #ifndef STM32H5xx_HAL_PWR_EX_H
22 #define STM32H5xx_HAL_PWR_EX_H
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* __cplusplus */
27 
28 /* Includes ------------------------------------------------------------------*/
29 #include "stm32h5xx_hal_def.h"
30 
31 /** @addtogroup STM32H5xx_HAL_Driver
32   * @{
33   */
34 
35 /** @addtogroup PWREx
36   * @{
37   */
38 
39 /* Exported types ------------------------------------------------------------*/
40 
41 /** @defgroup PWREx_Exported_Types PWR Extended Exported Types
42   * @{
43   */
44 
45 /**
46   * @brief  PWREx AVD configuration structure definition
47   */
48 typedef struct
49 {
50   uint32_t AVDLevel; /*!< AVDLevel : Specifies the AVD detection level. This
51                                      parameter can be a value of @ref
52                                      PWREx_AVD_detection_level
53                      */
54 
55   uint32_t Mode;     /*!< Mode : Specifies the EXTI operating mode for the AVD
56                                  event. This parameter can be a value of @ref
57                                  PWREx_AVD_Mode.
58                      */
59 } PWREx_AVDTypeDef;
60 
61 /**
62   * @brief  PWREx Wakeup pin configuration structure definition
63   */
64 typedef struct
65 {
66   uint32_t WakeUpPin;   /*!< WakeUpPin: Specifies the Wake-Up pin to be enabled.
67                                         This parameter can be a value of @ref
68                                         PWREx_WakeUp_Pins
69                         */
70 
71   uint32_t PinPolarity; /*!< PinPolarity: Specifies the Wake-Up pin polarity.
72                                           This parameter can be a value of @ref
73                                           PWREx_PIN_Polarity
74                         */
75 
76   uint32_t PinPull;     /*!< PinPull: Specifies the Wake-Up pin pull. This
77                                       parameter can be a value of @ref
78                                       PWREx_PIN_Pull
79                         */
80 } PWREx_WakeupPinTypeDef;
81 /**
82   * @}
83   */
84 
85 /* Exported constants --------------------------------------------------------*/
86 
87 /** @defgroup PWREx_Exported_Constants PWR Extended Exported Constants
88   * @{
89   */
90 
91 /** @defgroup PWREx_Supply_configuration PWREx Supply configuration
92   * @{
93   */
94 #define PWR_EXTERNAL_SOURCE_SUPPLY          PWR_SCCR_BYPASS  /*!< The SMPS disabled and the LDO Bypass. The Core domains
95                                                               are supplied from an external source                 */
96 
97 #if defined (SMPS)
98 #define PWR_SUPPLY_CONFIG_MASK (PWR_SCCR_SMPSEN | PWR_SCCR_LDOEN | PWR_SCCR_BYPASS)
99 #else
100 #define PWR_SUPPLY_CONFIG_MASK (PWR_SCCR_LDOEN | PWR_SCCR_BYPASS)
101 #endif /* defined (SMPS) */
102 /**
103   * @}
104   */
105 
106 /** @defgroup PWREx_PIN_Polarity PWREx Pin Polarity configuration
107   * @{
108   */
109 #define PWR_PIN_POLARITY_HIGH (0x00000000U)
110 #define PWR_PIN_POLARITY_LOW  (0x00000001U)
111 /**
112   * @}
113   */
114 
115 /** @defgroup PWREx_PIN_Pull PWREx Pin Pull configuration
116   * @{
117   */
118 #define PWR_PIN_NO_PULL   (0x00000000U)
119 #define PWR_PIN_PULL_UP   (0x00000001U)
120 #define PWR_PIN_PULL_DOWN (0x00000002U)
121 /**
122   * @}
123   */
124 
125 /** @defgroup PWREx_AVD_detection_level PWREx AVD detection level
126   * @{
127   */
128 #define PWR_AVDLEVEL_0 (0x00000000U)  /*!< Analog voltage detector level 0
129                                              selection : 1V7                 */
130 #define PWR_AVDLEVEL_1 PWR_VMCR_ALS_0 /*!< Analog voltage detector level 1
131                                              selection : 2V1                 */
132 #define PWR_AVDLEVEL_2 PWR_VMCR_ALS_1 /*!< Analog voltage detector level 2
133                                              selection : 2V5                 */
134 #define PWR_AVDLEVEL_3 PWR_VMCR_ALS   /*!< Analog voltage detector level 3
135                                              selection : 2V8                 */
136 /**
137   * @}
138   */
139 
140 /** @defgroup PWREx_AVD_Mode PWREx AVD Mode
141   * @{
142   */
143 #define PWR_AVD_MODE_NORMAL               (0x00000000U)   /*!< Basic mode is used                                                 */
144 #define PWR_AVD_MODE_IT_RISING            (0x00010001U)   /*!< External Interrupt Mode with Rising edge trigger detection         */
145 #define PWR_AVD_MODE_IT_FALLING           (0x00010002U)   /*!< External Interrupt Mode with Falling edge trigger detection        */
146 #define PWR_AVD_MODE_IT_RISING_FALLING    (0x00010003U)   /*!< External Interrupt Mode with Rising/Falling edge trigger detection */
147 #define PWR_AVD_MODE_EVENT_RISING         (0x00020001U)   /*!< Event Mode with Rising edge trigger detection                      */
148 #define PWR_AVD_MODE_EVENT_FALLING        (0x00020002U)   /*!< Event Mode with Falling edge trigger detection                     */
149 #define PWR_AVD_MODE_EVENT_RISING_FALLING (0x00020003U)   /*!< Event Mode with Rising/Falling edge trigger detection              */
150 /**
151   * @}
152   */
153 
154 /** @defgroup PWREx_Regulator_Voltage_Scale PWR Extended Regulator Voltage Scale
155   * @{
156   */
157 #define PWR_REGULATOR_VOLTAGE_SCALE0 PWR_VOSCR_VOS   /*!< Voltage scaling range 0 */
158 #define PWR_REGULATOR_VOLTAGE_SCALE1 PWR_VOSCR_VOS_1 /*!< Voltage scaling range 1 */
159 #define PWR_REGULATOR_VOLTAGE_SCALE2 PWR_VOSCR_VOS_0 /*!< Voltage scaling range 2 */
160 #define PWR_REGULATOR_VOLTAGE_SCALE3 (0U)            /*!< Voltage scaling range 3 */
161 /**
162   * @}
163   */
164 
165 /** @defgroup PWREx_Regulator_Voltage_Scale PWREx Regulator Voltage Scale
166   * @{
167   */
168 #define PWR_REGULATOR_SVOS_SCALE5 (PWR_PMCR_SVOS_0)
169 #define PWR_REGULATOR_SVOS_SCALE4 (PWR_PMCR_SVOS_1)
170 #define PWR_REGULATOR_SVOS_SCALE3 (PWR_PMCR_SVOS_0 | PWR_PMCR_SVOS_1)
171 /**
172   * @}
173   */
174 
175 /** @defgroup PWREx_VBAT_Battery_Charging_Selection PWR Extended Battery Charging Resistor Selection
176   * @{
177   */
178 #define PWR_BATTERY_CHARGING_RESISTOR_5   (0U)           /*!< VBAT charging through a 5 kOhms resistor   */
179 #define PWR_BATTERY_CHARGING_RESISTOR_1_5 PWR_BDCR_VBRS /*!< VBAT charging through a 1.5 kOhms resistor */
180 /**
181   * @}
182   */
183 
184 /** @defgroup PWREx_VBAT_Battery_Charging_State PWR Extended Battery Charging State
185   * @{
186   */
187 #define PWR_BATTERY_CHARGING_DISABLE (0U)          /* Disable battery charging */
188 #define PWR_BATTERY_CHARGING_ENABLE  PWR_BDCR_VBE /* Enable battery charging  */
189 /**
190   * @}
191   */
192 
193 /** @defgroup PWREx_Memory_Shut_Off Memory shut-off block selection
194   * @{
195   */
196 #if defined (PWR_PMCR_SRAM2_16SO)
197 #define PWR_ETHERNET_MEMORY_BLOCK PWR_PMCR_ETHERNETSO    /*!< Ethernet shut-off control in Stop mode                   */
198 #define PWR_RAM3_MEMORY_BLOCK     PWR_PMCR_SRAM3SO       /*!< RAM3 shut-off control in Stop mode                       */
199 #define PWR_RAM2_16_MEMORY_BLOCK  PWR_PMCR_SRAM2_16SO    /*!< RAM2 16k byte shut-off control in Stop mode              */
200 #define PWR_RAM2_48_MEMORY_BLOCK  PWR_PMCR_SRAM2_48SO    /*!< RAM2 48k byte shut-off control in Stop mode              */
201 #else
202 #define PWR_RAM2_MEMORY_BLOCK     PWR_PMCR_SRAM2SO      /*!< RAM2 48k byte shut-off control in Stop mode              */
203 #endif /* PWR_PMCR_SRAM2_16SO */
204 #define PWR_RAM1_MEMORY_BLOCK     PWR_PMCR_SRAM1SO       /*!< RAM1 shut-off control in Stop mode                       */
205 
206 /**
207   * @}
208   */
209 
210 /** @defgroup PWREx_AVD_EXTI_Line PWREx AVD EXTI Line 16
211   * @{
212   */
213 #define PWR_EXTI_LINE_AVD EXTI_IMR1_IM16 /*!< External interrupt line 16
214                                               Connected to the AVD EXTI Line */
215 /**
216   * @}
217   */
218 
219 /**
220   * @}
221   */
222 
223 /* Exported macros -----------------------------------------------------------*/
224 
225 /** @defgroup PWREx_Exported_Macros PWR Extended Exported Macros
226   * @{
227   */
228 
229 /**
230   * @brief Enable the AVD EXTI Line 16.
231   * @retval None.
232   */
233 #define __HAL_PWR_AVD_EXTI_ENABLE_IT() SET_BIT(EXTI->IMR1, PWR_EXTI_LINE_AVD)
234 
235 /**
236   * @brief Disable the AVD EXTI Line 16
237   * @retval None.
238   */
239 #define __HAL_PWR_AVD_EXTI_DISABLE_IT() CLEAR_BIT(EXTI->IMR1, PWR_EXTI_LINE_AVD)
240 
241 /**
242   * @brief Enable event on AVD EXTI Line 16.
243   * @retval None.
244   */
245 #define __HAL_PWR_AVD_EXTI_ENABLE_EVENT() SET_BIT(EXTI->EMR1, PWR_EXTI_LINE_AVD)
246 
247 /**
248   * @brief Disable event on AVD EXTI Line 16.
249   * @retval None.
250   */
251 #define __HAL_PWR_AVD_EXTI_DISABLE_EVENT() CLEAR_BIT(EXTI->EMR1, PWR_EXTI_LINE_AVD)
252 
253 /**
254   * @brief Enable the AVD Extended Interrupt Rising Trigger.
255   * @retval None.
256   */
257 #define __HAL_PWR_AVD_EXTI_ENABLE_RISING_EDGE() SET_BIT(EXTI->RTSR1, PWR_EXTI_LINE_AVD)
258 
259 /**
260   * @brief Disable the AVD Extended Interrupt Rising Trigger.
261   * @retval None.
262   */
263 #define __HAL_PWR_AVD_EXTI_DISABLE_RISING_EDGE() CLEAR_BIT(EXTI->RTSR1, PWR_EXTI_LINE_AVD)
264 
265 /**
266   * @brief Enable the AVD Extended Interrupt Falling Trigger.
267   * @retval None.
268   */
269 #define __HAL_PWR_AVD_EXTI_ENABLE_FALLING_EDGE() SET_BIT(EXTI->FTSR1, PWR_EXTI_LINE_AVD)
270 
271 /**
272   * @brief Disable the AVD Extended Interrupt Falling Trigger.
273   * @retval None.
274   */
275 #define __HAL_PWR_AVD_EXTI_DISABLE_FALLING_EDGE() CLEAR_BIT(EXTI->FTSR1, PWR_EXTI_LINE_AVD)
276 
277 /**
278   * @brief Enable the AVD Extended Interrupt Rising and Falling Trigger.
279   * @retval None.
280   */
281 #define __HAL_PWR_AVD_EXTI_ENABLE_RISING_FALLING_EDGE() \
282   do {                                                    \
283     __HAL_PWR_AVD_EXTI_ENABLE_RISING_EDGE();           \
284     __HAL_PWR_AVD_EXTI_ENABLE_FALLING_EDGE();          \
285   } while(0);
286 
287 /**
288   * @brief Disable the AVD Extended Interrupt Rising & Falling Trigger.
289   * @retval None.
290   */
291 #define __HAL_PWR_AVD_EXTI_DISABLE_RISING_FALLING_EDGE() \
292   do {                                                     \
293     __HAL_PWR_AVD_EXTI_DISABLE_RISING_EDGE();           \
294     __HAL_PWR_AVD_EXTI_DISABLE_FALLING_EDGE();          \
295   } while(0);
296 
297 /**
298   * @brief Check whether the specified AVD EXTI Rising interrupt flag is set or not.
299   * @retval EXTI AVD Line Status.
300   */
301 
302 #define __HAL_PWR_AVD_EXTI_GET_RISING_FLAG() ((READ_BIT(EXTI->RPR1, PWR_EXTI_LINE_AVD)\
303                                                == PWR_EXTI_LINE_AVD) ? 1UL : 0UL)
304 
305 /**
306   * @brief Check whether the specified AVD EXTI Falling interrupt flag is set or not.
307   * @retval EXTI AVD Line Status.
308   */
309 
310 #define __HAL_PWR_AVD_EXTI_GET_FALLING_FLAG() ((READ_BIT(EXTI->FPR1, PWR_EXTI_LINE_AVD)\
311                                                 == PWR_EXTI_LINE_AVD) ? 1UL : 0UL)
312 
313 /**
314   * @brief  Clear the AVD EXTI flag.
315   * @retval None.
316   */
317 #define __HAL_PWR_AVD_EXTI_CLEAR_FLAG()     \
318   do                                          \
319   {                                           \
320     WRITE_REG(EXTI->RPR1, PWR_EXTI_LINE_AVD); \
321     WRITE_REG(EXTI->FPR1, PWR_EXTI_LINE_AVD); \
322   } while(0)
323 
324 /**
325   * @brief  Generates a Software interrupt on AVD EXTI line.
326   * @retval None.
327   */
328 #define __HAL_PWR_AVD_EXTI_GENERATE_SWIT() SET_BIT(EXTI->SWIER1, PWR_EXTI_LINE_AVD)
329 
330 /**
331   * @brief Configure the main internal regulator output voltage.
332   * @note  This macro is similar to HAL_PWREx_ControlVoltageScaling() API but
333   *        doesn't check whether or not VOSREADY flag is set. User may resort
334   *        to __HAL_PWR_GET_FLAG() macro to check VOSF bit state.
335   * @param  __REGULATOR__ : Specifies the regulator output voltage to achieve a
336   *                         tradeoff between performance and power consumption.
337   *                         This parameter can be one of the following values :
338   *                         @arg @ref PWR_REGULATOR_VOLTAGE_SCALE1 : Regulator voltage output scale 1.
339   *                                                                  Provides a typical output voltage at 1.2 V.
340   *                                                                  Used when system clock frequency is up to 160 MHz.
341   *                         @arg @ref PWR_REGULATOR_VOLTAGE_SCALE2 : Regulator voltage output scale 2.
342   *                                                                  Provides a typical output voltage at 1.1 V.
343   *                                                                  Used when system clock frequency is up to 100 MHz.
344   *                         @arg @ref PWR_REGULATOR_VOLTAGE_SCALE3 : Regulator voltage output scale 3.
345   *                                                                  Provides a typical output voltage at 1.0 V.
346   *                                                                  Used when system clock frequency is up to 50 MHz.
347   *                         @arg @ref PWR_REGULATOR_VOLTAGE_SCALE4 : Regulator voltage output scale 4.
348   *                                                                  Provides a typical output voltage at 0.9 V.
349   *                                                                  Used when system clock frequency is up to 24 MHz.
350   * @retval None.
351   */
352 #define __HAL_PWR_VOLTAGESCALING_CONFIG(__REGULATOR__)    \
353   do                                                        \
354   {                                                         \
355     __IO uint32_t tmpreg;                                   \
356     MODIFY_REG(PWR->VOSCR, PWR_VOSCR_VOS, (__REGULATOR__)); \
357     /* Delay after an RCC peripheral clock enabling */      \
358     tmpreg = READ_BIT(PWR->VOSCR, PWR_VOSCR_VOS);           \
359     UNUSED(tmpreg);                                         \
360   } while(0)
361 /**
362   * @}
363   */
364 
365 /* Private constants ---------------------------------------------------------*/
366 
367 /** @defgroup PWREx_Private_Constants PWR Extended Private Constants
368   * @{
369   */
370 
371 /** @defgroup PWREx_AVD_Mode_Mask PWR Extended AVD Mode Mask
372   * @{
373   */
374 #define AVD_MODE_IT              (0x00010000U)
375 #define AVD_MODE_EVT             (0x00020000U)
376 #define AVD_RISING_EDGE          (0x00000001U)
377 #define AVD_FALLING_EDGE         (0x00000002U)
378 #define AVD_RISING_FALLING_EDGE  (0x00000003U)
379 /**
380   * @}
381   */
382 
383 /**
384   * @}
385   */
386 
387 /* Private macros --------------------------------------------------------*/
388 
389 /** @defgroup PWREx_Private_Macros PWR Extended Private Macros
390   * @{
391   */
392 /* Check PWR regulator configuration parameter */
393 #define IS_PWR_SUPPLY(PWR_SOURCE)            ((PWR_SOURCE) == PWR_EXTERNAL_SOURCE_SUPPLY)
394 
395 /* Check wake up pin polarity parameter */
396 #define IS_PWR_WAKEUP_PIN_POLARITY(POLARITY) (((POLARITY) == PWR_PIN_POLARITY_HIGH) ||\
397                                               ((POLARITY) == PWR_PIN_POLARITY_LOW))
398 
399 /* Check wake up pin pull configuration parameter */
400 #define IS_PWR_WAKEUP_PIN_PULL(PULL) (((PULL) == PWR_PIN_NO_PULL) ||\
401                                       ((PULL) == PWR_PIN_PULL_UP) ||\
402                                       ((PULL) == PWR_PIN_PULL_DOWN))
403 
404 /* Check wake up flag parameter */
405 #define IS_PWR_WAKEUP_FLAG(FLAG) (((FLAG) == PWR_WAKEUP_FLAG1) ||\
406                                   ((FLAG) == PWR_WAKEUP_FLAG2) ||\
407                                   ((FLAG) == PWR_WAKEUP_FLAG3) ||\
408                                   ((FLAG) == PWR_WAKEUP_FLAG4) ||\
409                                   ((FLAG) == PWR_WAKEUP_FLAG5) ||\
410                                   ((FLAG) == PWR_WAKEUP_FLAG6) ||\
411                                   ((FLAG) == PWR_WAKEUP_FLAG_ALL))
412 
413 /* Voltage scaling range check macro */
414 #define IS_PWR_VOLTAGE_SCALING_RANGE(RANGE)      (((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE0) ||\
415                                                   ((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE1) ||\
416                                                   ((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE2) ||\
417                                                   ((RANGE) == PWR_REGULATOR_VOLTAGE_SCALE3))
418 
419 /* Check PWR regulator configuration in STOP mode parameter */
420 #define IS_PWR_STOP_MODE_REGULATOR_VOLTAGE(VOLTAGE) (((VOLTAGE) == PWR_REGULATOR_SVOS_SCALE3)  ||\
421                                                      ((VOLTAGE) == PWR_REGULATOR_SVOS_SCALE4)  ||\
422                                                      ((VOLTAGE) == PWR_REGULATOR_SVOS_SCALE5))
423 
424 /* Battery charging resistor selection check macro */
425 #define IS_PWR_BATTERY_RESISTOR_SELECT(RESISTOR) (((RESISTOR) == PWR_BATTERY_CHARGING_RESISTOR_5) ||\
426                                                   ((RESISTOR) == PWR_BATTERY_CHARGING_RESISTOR_1_5))
427 
428 /* Battery charging activation check macro */
429 #define IS_PWR_BATTERY_CHARGING(CHARGING)        (((CHARGING) == PWR_BATTERY_CHARGING_DISABLE) ||\
430                                                   ((CHARGING) == PWR_BATTERY_CHARGING_ENABLE))
431 
432 #if defined (PWR_PMCR_SRAM2_16SO)
433 /* Check memory block parameter */
434 #define IS_PWR_MEMORY_BLOCK(BLOCK) (((BLOCK) == PWR_ETHERNET_MEMORY_BLOCK) || \
435                                     ((BLOCK) == PWR_RAM3_MEMORY_BLOCK)     || \
436                                     ((BLOCK) == PWR_RAM2_16_MEMORY_BLOCK)  || \
437                                     ((BLOCK) == PWR_RAM2_48_MEMORY_BLOCK)  || \
438                                     ((BLOCK) == PWR_RAM1_MEMORY_BLOCK))
439 #else
440 #define IS_PWR_MEMORY_BLOCK(BLOCK) (((BLOCK) == PWR_RAM2_MEMORY_BLOCK)  || \
441                                     ((BLOCK) == PWR_RAM1_MEMORY_BLOCK))
442 #endif /* PWR_PMCR_SRAM2_16SO */
443 
444 /* Check wake up flag parameter */
445 #define IS_PWR_AVD_LEVEL(LEVEL) (((LEVEL) == PWR_AVDLEVEL_0) ||\
446                                  ((LEVEL) == PWR_AVDLEVEL_1) ||\
447                                  ((LEVEL) == PWR_AVDLEVEL_2) ||\
448                                  ((LEVEL) == PWR_AVDLEVEL_3))
449 
450 /* Check AVD mode parameter */
451 #define IS_PWR_AVD_MODE(MODE) (((MODE) == PWR_AVD_MODE_IT_RISING)         ||\
452                                ((MODE) == PWR_AVD_MODE_IT_FALLING)        ||\
453                                ((MODE) == PWR_AVD_MODE_IT_RISING_FALLING) ||\
454                                ((MODE) == PWR_AVD_MODE_EVENT_RISING)      ||\
455                                ((MODE) == PWR_AVD_MODE_EVENT_FALLING)     ||\
456                                ((MODE) == PWR_AVD_MODE_NORMAL)            ||\
457                                ((MODE) == PWR_AVD_MODE_EVENT_RISING_FALLING))
458 /**
459   * @}
460   */
461 
462 /** @addtogroup PWREx_Exported_Functions
463   * @{
464   */
465 
466 /** @addtogroup PWREx_Exported_Functions_Group1
467   * @{
468   */
469 uint32_t          HAL_PWREx_GetVoltageRange(void);
470 HAL_StatusTypeDef HAL_PWREx_ControlVoltageScaling(uint32_t VoltageScaling);
471 HAL_StatusTypeDef HAL_PWREx_ConfigSupply(uint32_t SupplySource);
472 uint32_t          HAL_PWREx_GetSupplyConfig(void);
473 HAL_StatusTypeDef HAL_PWREx_ControlStopModeVoltageScaling(uint32_t VoltageScaling);
474 uint32_t HAL_PWREx_GetStopModeVoltageRange(void);
475 
476 /**
477   * @}
478   */
479 
480 /** @addtogroup PWREx_Exported_Functions_Group2
481   * @{
482   */
483 void HAL_PWREx_ConfigAVD(PWREx_AVDTypeDef *sConfigAVD);
484 void HAL_PWREx_EnableAVD(void);
485 void HAL_PWREx_DisableAVD(void);
486 #if defined (PWR_USBSCR_USB33DEN)
487 void HAL_PWREx_EnableUSBVoltageDetector(void);
488 void HAL_PWREx_DisableUSBVoltageDetector(void);
489 #endif /* PWR_USBSCR_USB33DEN */
490 #if defined (PWR_USBSCR_USB33SV)
491 void HAL_PWREx_EnableVddUSB(void);
492 void HAL_PWREx_DisableVddUSB(void);
493 #endif /* PWR_USBSCR_USB33SV */
494 void HAL_PWREx_EnableMonitoring(void);
495 void HAL_PWREx_DisableMonitoring(void);
496 void HAL_PWREx_EnableUCPDStandbyMode(void);
497 void HAL_PWREx_DisableUCPDStandbyMode(void);
498 void HAL_PWREx_EnableUCPDDeadBattery(void);
499 void HAL_PWREx_DisableUCPDDeadBattery(void);
500 void HAL_PWREx_EnableBatteryCharging(uint32_t ResistorValue);
501 void HAL_PWREx_DisableBatteryCharging(void);
502 void HAL_PWREx_EnableAnalogBooster(void);
503 void HAL_PWREx_DisableAnalogBooster(void);
504 void HAL_PWREx_PVD_AVD_IRQHandler(void);
505 void HAL_PWREx_AVDCallback(void);
506 
507 /**
508   * @}
509   */
510 
511 
512 /** @addtogroup PWREx_Exported_Functions_Group3
513   * @{
514   */
515 
516 void HAL_PWREx_EnableWakeUpPin(PWREx_WakeupPinTypeDef *sPinParams);
517 void HAL_PWREx_DisableWakeUpPin(uint32_t WakeUpPinx);
518 
519 
520 /**
521   * @}
522   */
523 
524 /** @addtogroup PWREx_Exported_Functions_Group4
525   * @{
526   */
527 void HAL_PWREx_EnableFlashPowerDown(void);
528 void HAL_PWREx_DisableFlashPowerDown(void);
529 void HAL_PWREx_EnableMemoryShutOff(uint32_t MemoryBlock);
530 void HAL_PWREx_DisableMemoryShutOff(uint32_t MemoryBlock);
531 HAL_StatusTypeDef HAL_PWREx_EnableBkupRAMRetention(void);
532 void HAL_PWREx_DisableBkupRAMRetention(void);
533 
534 /**
535   * @}
536   */
537 
538 /** @addtogroup PWREx_Exported_Functions_Group5
539   * @{
540   */
541 void HAL_PWREx_EnableStandbyIORetention(void);
542 void HAL_PWREx_DisableStandbyIORetention(void);
543 void HAL_PWREx_EnableStandbyJTAGIORetention(void);
544 void HAL_PWREx_DisableStandbyJTAGIORetention(void);
545 
546 /**
547   * @}
548   */
549 
550 /**
551   * @}
552   */
553 
554 /**
555   * @}
556   */
557 
558 /**
559   * @}
560   */
561 
562 #ifdef __cplusplus
563 }
564 #endif /* __cplusplus */
565 
566 
567 #endif /* STM32H5xx_HAL_PWR_EX_H */
568