Index: /trunk/fw_g473rct/USBPD/App/usbpd.c
===================================================================
--- /trunk/fw_g473rct/USBPD/App/usbpd.c	(revision 59)
+++ /trunk/fw_g473rct/USBPD/App/usbpd.c	(revision 59)
@@ -0,0 +1,79 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    app/usbpd.c
+  * @author  MCD Application Team
+  * @brief   This file contains the device define.
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd.h"
+
+/* USER CODE BEGIN 0 */
+/* USER CODE END 0 */
+
+/* USER CODE BEGIN 1 */
+/* USER CODE END 1 */
+
+/* Private variables ---------------------------------------------------------*/
+
+/* Private functions ---------------------------------------------------------*/
+
+/* USER CODE BEGIN 2 */
+/* USER CODE END 2 */
+/* USBPD init function */
+void MX_USBPD_Init(void)
+{
+
+  /* Global Init of USBPD HW */
+  USBPD_HW_IF_GlobalHwInit();
+
+  /* Initialize the Device Policy Manager */
+  if (USBPD_OK != USBPD_DPM_InitCore())
+  {
+    while(1);
+  }
+
+  /* Initialise the DPM application */
+  if (USBPD_OK != USBPD_DPM_UserInit())
+  {
+    while(1);
+  }
+
+  /* USER CODE BEGIN 3 */
+  /* USER CODE END 3 */
+
+  if (USBPD_OK != USBPD_DPM_InitOS())
+  {
+    while(1);
+  }
+
+  /* USER CODE BEGIN EnableIRQ */
+  /* Enable IRQ which has been disabled by FreeRTOS services */
+  __enable_irq();
+  /* USER CODE END EnableIRQ */
+
+}
+
+/* USER CODE BEGIN 4 */
+/* USER CODE END 4 */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
Index: /trunk/fw_g473rct/USBPD/App/usbpd.h
===================================================================
--- /trunk/fw_g473rct/USBPD/App/usbpd.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/App/usbpd.h	(revision 59)
@@ -0,0 +1,59 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    app/usbpd.h
+  * @author  MCD Application Team
+  * @brief   This file contains the device define.
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef __usbpd_H
+#define __usbpd_H
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd_core.h"
+#include "usbpd_dpm_core.h"
+#include "usbpd_dpm_conf.h"
+#include "usbpd_hw_if.h"
+
+/* USER CODE BEGIN 0 */
+/* USER CODE END 0 */
+
+/* Global variables ---------------------------------------------------------*/
+
+/* USER CODE BEGIN 1 */
+/* USER CODE END 1 */
+
+/* USBPD init function */
+void            MX_USBPD_Init(void);
+
+/* USER CODE BEGIN 2 */
+/* USER CODE END 2 */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /*__usbpd_H */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
Index: /trunk/fw_g473rct/USBPD/App/usbpd_dpm_core.c
===================================================================
--- /trunk/fw_g473rct/USBPD/App/usbpd_dpm_core.c	(revision 59)
+++ /trunk/fw_g473rct/USBPD/App/usbpd_dpm_core.c	(revision 59)
@@ -0,0 +1,463 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_dpm_core.c
+  * @author  MCD Application Team
+  * @brief   USBPD dpm core file
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#define __USBPD_DPM_CORE_C
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd_core.h"
+#include "usbpd_trace.h"
+#include "usbpd_dpm_core.h"
+#include "usbpd_dpm_conf.h"
+#include "usbpd_dpm_user.h"
+
+#if defined(USE_STM32_UTILITY_OS)
+#include "utilities_conf.h"
+#endif /* USE_STM32_UTILITY_OS */
+
+/* Generic STM32 prototypes */
+extern uint32_t HAL_GetTick(void);
+
+/* Private function prototypes -----------------------------------------------*/
+ /* !FREERTOS */
+void USBPD_CAD_Task(void);
+#if defined(USE_STM32_UTILITY_OS)
+void TimerCADfunction(void *);
+#endif /* USE_STM32_UTILITY_OS */
+void USBPD_PE_Task_P0(void);
+void USBPD_PE_Task_P1(void);
+#if defined(USE_STM32_UTILITY_OS)
+void TimerPE0function(void *pArg);
+void TimerPE1function(void *pArg);
+#endif /* USE_STM32_UTILITY_OS */
+void USBPD_TaskUser(void);
+
+/* Private typedef -----------------------------------------------------------*/
+ /* !_RTOS */
+#if defined(USE_STM32_UTILITY_OS)
+UTIL_TIMER_Object_t TimerCAD;
+UTIL_TIMER_Object_t TimerPE0, TimerPE1;
+#endif /* USE_STM32_UTILITY_OS */
+
+/* Private define ------------------------------------------------------------*/
+
+/* Private macro -------------------------------------------------------------*/
+#define CHECK_PE_FUNCTION_CALL(_function_)  _retr = _function_;                  \
+                                            if(USBPD_OK != _retr) {return _retr;}
+#define CHECK_CAD_FUNCTION_CALL(_function_) if(USBPD_CAD_OK != _function_) {return USBPD_ERROR;}
+
+#if defined(_DEBUG_TRACE)
+#define DPM_CORE_DEBUG_TRACE(_PORTNUM_, __MESSAGE__)  USBPD_TRACE_Add(USBPD_TRACE_DEBUG, _PORTNUM_, 0u, (uint8_t *)(__MESSAGE__), sizeof(__MESSAGE__) - 1u);
+#else
+#define DPM_CORE_DEBUG_TRACE(_PORTNUM_, __MESSAGE__)
+#endif /* _DEBUG_TRACE */
+
+/* Private variables ---------------------------------------------------------*/
+#if !defined(USE_STM32_UTILITY_OS)
+#define OFFSET_CAD 1U
+static uint32_t DPM_Sleep_time[USBPD_PORT_COUNT + OFFSET_CAD];
+static uint32_t DPM_Sleep_start[USBPD_PORT_COUNT + OFFSET_CAD];
+#endif /* !USE_STM32_UTILITY_OS */
+
+USBPD_ParamsTypeDef   DPM_Params[USBPD_PORT_COUNT];
+
+/* Private function prototypes -----------------------------------------------*/
+static void USBPD_PE_TaskWakeUp(uint8_t PortNum);
+static void DPM_ManageAttachedState(uint8_t PortNum, USBPD_CAD_EVENT State, CCxPin_TypeDef Cc);
+void USBPD_DPM_CADCallback(uint8_t PortNum, USBPD_CAD_EVENT State, CCxPin_TypeDef Cc);
+static void USBPD_DPM_CADTaskWakeUp(void);
+
+/**
+  * @brief  Initialize the core stack (port power role, PWR_IF, CAD and PE Init procedures)
+  * @retval USBPD status
+  */
+USBPD_StatusTypeDef USBPD_DPM_InitCore(void)
+{
+  /* variable to get dynamique memory allocated by usbpd stack */
+  uint32_t stack_dynamemsize;
+  USBPD_StatusTypeDef _retr = USBPD_OK;
+
+  static const USBPD_PE_Callbacks dpmCallbacks =
+  {
+    NULL,
+    USBPD_DPM_HardReset,
+    NULL,
+    USBPD_DPM_Notification,
+    USBPD_DPM_ExtendedMessageReceived,
+    USBPD_DPM_GetDataInfo,
+    USBPD_DPM_SetDataInfo,
+    NULL,
+    USBPD_DPM_SNK_EvaluateCapabilities,
+    NULL,
+    USBPD_PE_TaskWakeUp,
+#if defined(_VCONN_SUPPORT)
+    USBPD_DPM_EvaluateVconnSwap,
+    USBPD_DPM_PE_VconnPwr,
+#else
+    NULL,
+    NULL,
+#endif /* _VCONN_SUPPORT */
+    USBPD_DPM_EnterErrorRecovery,
+    USBPD_DPM_EvaluateDataRoleSwap,
+    USBPD_DPM_IsPowerReady
+  };
+
+  static const USBPD_CAD_Callbacks CAD_cbs =
+  {
+    USBPD_DPM_CADCallback,
+    USBPD_DPM_CADTaskWakeUp
+  };
+
+  /* Check the lib selected */
+  if (USBPD_TRUE != USBPD_PE_CheckLIB(_LIB_ID))
+  {
+    return USBPD_ERROR;
+  }
+
+  /* to get how much memory are dynamically allocated by the stack
+     the memory return is corresponding to 2 ports so if the application
+     managed only one port divide the value return by 2                   */
+  stack_dynamemsize = USBPD_PE_GetMemoryConsumption();
+
+  /* done to avoid warning */
+  (void)stack_dynamemsize;
+
+  for (uint8_t _port_index = 0; _port_index < USBPD_PORT_COUNT; ++_port_index)
+  {
+    /* Variable to be sure that DPM is correctly initialized */
+    DPM_Params[_port_index].DPM_Initialized = USBPD_FALSE;
+
+    /* check the stack settings */
+    DPM_Params[_port_index].PE_SpecRevision  = DPM_Settings[_port_index].PE_SpecRevision;
+    DPM_Params[_port_index].PE_PowerRole     = DPM_Settings[_port_index].PE_DefaultRole;
+    DPM_Params[_port_index].PE_SwapOngoing   = USBPD_FALSE;
+    DPM_Params[_port_index].ActiveCCIs       = CCNONE;
+    DPM_Params[_port_index].VconnCCIs        = CCNONE;
+    DPM_Params[_port_index].VconnStatus      = USBPD_FALSE;
+
+    /* CAD SET UP : Port 0 */
+    CHECK_CAD_FUNCTION_CALL(USBPD_CAD_Init(_port_index, (USBPD_CAD_Callbacks *)&CAD_cbs,
+                                           (USBPD_SettingsTypeDef *)&DPM_Settings[_port_index], &DPM_Params[_port_index]));
+
+    /* PE SET UP : Port 0 */
+    CHECK_PE_FUNCTION_CALL(USBPD_PE_Init(_port_index, (USBPD_SettingsTypeDef *)&DPM_Settings[_port_index],
+                                         &DPM_Params[_port_index], &dpmCallbacks));
+
+  /* DPM is correctly initialized */
+    DPM_Params[_port_index].DPM_Initialized = USBPD_TRUE;
+
+    /* Enable CAD on Port 0 */
+  USBPD_CAD_PortEnable(_port_index, USBPD_CAD_ENABLE);
+  }
+
+#if defined(USE_STM32_UTILITY_OS)
+  /* initialise timer server */
+  UTIL_TIMER_Init();
+
+  /* initialize the sequencer */
+  UTIL_SEQ_Init();
+#endif /* USE_STM32_UTILITY_OS */
+
+  return _retr;
+}
+
+/**
+  * @brief  Initialize the OS parts (task, queue,... )
+  * @retval USBPD status
+  */
+USBPD_StatusTypeDef USBPD_DPM_InitOS(void)
+{
+
+  return USBPD_OK;
+}
+
+/**
+  * @brief  Initialize the OS parts (port power role, PWR_IF, CAD and PE Init procedures)
+  * @retval None
+  */
+#if defined(USE_STM32_UTILITY_OS)
+/**
+  * @brief  Task for CAD processing
+  * @retval None
+  */
+void USBPD_CAD_Task(void)
+{
+  UTIL_TIMER_Stop(&TimerCAD);
+  uint32_t _timing = USBPD_CAD_Process();
+  UTIL_TIMER_SetPeriod(&TimerCAD, _timing);
+  UTIL_TIMER_Start(&TimerCAD);
+}
+
+/**
+  * @brief  timer function to wakeup CAD Task
+  * @param pArg Pointer on an argument
+  * @retval None
+  */
+void TimerCADfunction(void *pArg)
+{
+  UTIL_SEQ_SetTask(TASK_CAD, 0);
+}
+
+#if !defined(USBPDCORE_LIB_NO_PD)
+/**
+  * @brief  timer function to wakeup PE_0 Task
+  * @param pArg Pointer on an argument
+  * @retval None
+  */
+void TimerPE0function(void *pArg)
+{
+  UTIL_SEQ_SetTask(TASK_PE_0, 0);
+}
+
+/**
+  * @brief  timer function to wakeup PE_1 Task
+  * @param pArg Pointer on an argument
+  * @retval None
+  */
+void TimerPE1function(void *pArg)
+{
+  UTIL_SEQ_SetTask(TASK_PE_1, 0);
+}
+
+/**
+  * @brief  Task for PE_0 processing
+  * @retval None
+  */
+void USBPD_PE_Task_P0(void)
+{
+  UTIL_TIMER_Stop(&TimerPE0);
+  uint32_t _timing =
+    USBPD_PE_StateMachine_SNK(USBPD_PORT_0);
+  if (_timing != 0xFFFFFFFF)
+  {
+    UTIL_TIMER_SetPeriod(&TimerPE0, _timing);
+    UTIL_TIMER_Start(&TimerPE0);
+  }
+}
+
+/**
+  * @brief  Task for PE_1 processing
+  * @retval None
+  */
+void USBPD_PE_Task_P1(void)
+{
+  UTIL_TIMER_Stop(&TimerPE1);
+  uint32_t _timing =
+    USBPD_PE_StateMachine_SNK(USBPD_PORT_1);
+  if (_timing != 0xFFFFFFFF)
+  {
+    UTIL_TIMER_SetPeriod(&TimerPE1, _timing);
+    UTIL_TIMER_Start(&TimerPE1);
+  }
+}
+#endif /* !USBPDCORE_LIB_NO_PD */
+
+/**
+  * @brief  Task for DPM_USER processing
+  * @retval None
+  */
+void USBPD_TaskUser(void)
+{
+  USBPD_DPM_UserExecute(NULL);
+}
+#endif /* USE_STM32_UTILITY_OS */
+
+void USBPD_DPM_Run(void)
+{
+#if defined(USE_STM32_UTILITY_OS)
+  UTIL_SEQ_RegTask(TASK_CAD,  0, USBPD_CAD_Task);
+  UTIL_SEQ_SetTask(TASK_CAD,  0);
+  UTIL_TIMER_Create(&TimerCAD, 10, UTIL_TIMER_ONESHOT, TimerCADfunction, NULL);
+
+  UTIL_SEQ_RegTask(TASK_PE_0, 0,  USBPD_PE_Task_P0);
+  UTIL_SEQ_PauseTask(TASK_PE_0);
+  UTIL_TIMER_Create(&TimerPE0, 10, UTIL_TIMER_ONESHOT, TimerPE0function, NULL);
+#if USBPD_PORT_COUNT == 2
+  UTIL_SEQ_RegTask(TASK_PE_1, 0,  USBPD_PE_Task_P1);
+  UTIL_SEQ_PauseTask(TASK_PE_1);
+  UTIL_TIMER_Create(&TimerPE1, 10, UTIL_TIMER_ONESHOT, TimerPE1function, NULL);
+#endif /* USBPD_PORT_COUNT == 2 */
+ /* !USBPDCORE_LIB_NO_PD */
+
+  UTIL_SEQ_RegTask(TASK_USER, 0, USBPD_TaskUser);
+  UTIL_SEQ_SetTask(TASK_USER,  0);
+
+  do
+  {
+    UTIL_SEQ_Run(~0);
+  } while (1u == 1u);
+#else /* !USE_STM32_UTILITY_OS */
+  do
+  {
+
+    if ((HAL_GetTick() - DPM_Sleep_start[USBPD_PORT_COUNT]) >= DPM_Sleep_time[USBPD_PORT_COUNT])
+    {
+      DPM_Sleep_time[USBPD_PORT_COUNT] = USBPD_CAD_Process();
+      DPM_Sleep_start[USBPD_PORT_COUNT] = HAL_GetTick();
+    }
+
+    uint32_t port = 0;
+
+    for (port = 0; port < USBPD_PORT_COUNT; port++)
+    {
+      if ((HAL_GetTick() - DPM_Sleep_start[port]) >= DPM_Sleep_time[port])
+      {
+        DPM_Sleep_time[port] =
+          USBPD_PE_StateMachine_SNK(port);
+        DPM_Sleep_start[port] = HAL_GetTick();
+      }
+    }
+
+    USBPD_DPM_UserExecute(NULL);
+
+  } while (1u == 1u);
+#endif /* USE_STM32_UTILITY_OS */
+}
+
+/**
+  * @brief  Initialize DPM (port power role, PWR_IF, CAD and PE Init procedures)
+  * @retval USBPD status
+  */
+void USBPD_DPM_TimerCounter(void)
+{
+  /* Call PE/PRL timers functions only if DPM is initialized */
+  if (USBPD_TRUE == DPM_Params[USBPD_PORT_0].DPM_Initialized)
+  {
+    USBPD_DPM_UserTimerCounter(USBPD_PORT_0);
+    USBPD_PE_TimerCounter(USBPD_PORT_0);
+    USBPD_PRL_TimerCounter(USBPD_PORT_0);
+  }
+#if USBPD_PORT_COUNT==2
+  if (USBPD_TRUE == DPM_Params[USBPD_PORT_1].DPM_Initialized)
+  {
+    USBPD_DPM_UserTimerCounter(USBPD_PORT_1);
+    USBPD_PE_TimerCounter(USBPD_PORT_1);
+    USBPD_PRL_TimerCounter(USBPD_PORT_1);
+  }
+#endif /* USBPD_PORT_COUNT == 2 */
+
+}
+
+/**
+  * @brief  WakeUp PE task
+  * @param  PortNum port number
+  * @retval None
+  */
+static void USBPD_PE_TaskWakeUp(uint8_t PortNum)
+{
+#if defined(USE_STM32_UTILITY_OS)
+  UTIL_SEQ_SetTask(PortNum == 0 ? TASK_PE_0 : TASK_PE_1, 0);
+#else
+  DPM_Sleep_time[PortNum] = 0;
+#endif /* USE_STM32_UTILITY_OS */
+}
+
+/**
+  * @brief  WakeUp CAD task
+  * @retval None
+  */
+static void USBPD_DPM_CADTaskWakeUp(void)
+{
+#if defined(USE_STM32_UTILITY_OS)
+  UTIL_SEQ_SetTask(TASK_CAD, 0);
+#else
+  DPM_Sleep_time[USBPD_PORT_COUNT] = 0;
+#endif /* USE_STM32_UTILITY_OS */
+}
+
+/**
+  * @brief  CallBack reporting events on a specified port from CAD layer.
+  * @param  PortNum   The handle of the port
+  * @param  State     CAD state
+  * @param  Cc        The Communication Channel for the USBPD communication
+  * @retval None
+  */
+void USBPD_DPM_CADCallback(uint8_t PortNum, USBPD_CAD_EVENT State, CCxPin_TypeDef Cc)
+{
+
+  switch (State)
+  {
+    case USBPD_CAD_EVENT_ATTEMC :
+    {
+#ifdef _VCONN_SUPPORT
+      DPM_Params[PortNum].VconnStatus = USBPD_TRUE;
+#endif /* _VCONN_SUPPORT */
+      DPM_ManageAttachedState(PortNum, State, Cc);
+#ifdef _VCONN_SUPPORT
+      DPM_CORE_DEBUG_TRACE(PortNum, "Note: VconnStatus=TRUE");
+#endif /* _VCONN_SUPPORT */
+      break;
+    }
+    case USBPD_CAD_EVENT_ATTACHED :
+      DPM_ManageAttachedState(PortNum, State, Cc);
+      break;
+    case USBPD_CAD_EVENT_DETACHED :
+    case USBPD_CAD_EVENT_EMC :
+    {
+      /* The ufp is detached */
+      (void)USBPD_PE_IsCableConnected(PortNum, 0);
+      /* Terminate PE task */
+#if defined(USE_STM32_UTILITY_OS)
+      UTIL_SEQ_PauseTask(PortNum == 0 ? TASK_PE_0 : TASK_PE_1);
+#else
+      DPM_Sleep_time[PortNum] = 0xFFFFFFFFU;
+#endif /* USE_STM32_UTILITY_OS */
+      DPM_Params[PortNum].PE_SwapOngoing = USBPD_FALSE;
+      DPM_Params[PortNum].ActiveCCIs = CCNONE;
+      DPM_Params[PortNum].PE_Power   = USBPD_POWER_NO;
+      USBPD_DPM_UserCableDetection(PortNum, State);
+#ifdef _VCONN_SUPPORT
+      DPM_Params[PortNum].VconnCCIs = CCNONE;
+      DPM_Params[PortNum].VconnStatus = USBPD_FALSE;
+      DPM_CORE_DEBUG_TRACE(PortNum, "Note: VconnStatus=FALSE");
+#endif /* _VCONN_SUPPORT */
+      break;
+    }
+    default :
+      /* nothing to do */
+      break;
+  }
+}
+
+static void DPM_ManageAttachedState(uint8_t PortNum, USBPD_CAD_EVENT State, CCxPin_TypeDef Cc)
+{
+#ifdef _VCONN_SUPPORT
+  if (CC1 == Cc)
+  {
+    DPM_Params[PortNum].VconnCCIs = CC2;
+  }
+  if (CC2 == Cc)
+  {
+    DPM_Params[PortNum].VconnCCIs = CC1;
+  }
+#endif /* _VCONN_SUPPORT */
+  DPM_Params[PortNum].ActiveCCIs = Cc;
+  (void)USBPD_PE_IsCableConnected(PortNum, 1);
+
+  USBPD_DPM_UserCableDetection(PortNum, State);
+
+#if defined(USE_STM32_UTILITY_OS)
+  /* Resume the task */
+  UTIL_SEQ_ResumeTask(PortNum == 0 ? TASK_PE_0 : TASK_PE_1);
+  /* Enable task execution */
+  UTIL_SEQ_SetTask(PortNum == 0 ? TASK_PE_0 : TASK_PE_1, 0);
+#else
+  DPM_Sleep_time[PortNum] = 0U;
+#endif /* USE_STM32_UTILITY_OS */
+}
Index: /trunk/fw_g473rct/USBPD/App/usbpd_dpm_core.h
===================================================================
--- /trunk/fw_g473rct/USBPD/App/usbpd_dpm_core.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/App/usbpd_dpm_core.h	(revision 59)
@@ -0,0 +1,74 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_dpm_core.h
+  * @author  MCD Application Team
+  * @brief   Header file for usbpd_dpm_core.c file
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#ifndef __USBPD_DPM_CORE_H_
+#define __USBPD_DPM_CORE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Exported typedef ----------------------------------------------------------*/
+/* USER CODE BEGIN typedef */
+
+/* USER CODE END typedef */
+
+/* Exported define -----------------------------------------------------------*/
+
+/* USER CODE BEGIN define */
+
+/* USER CODE END define */
+
+/* Exported constants --------------------------------------------------------*/
+/* USER CODE BEGIN constants */
+
+/* USER CODE END constants */
+
+/* Exported macro ------------------------------------------------------------*/
+/* USER CODE BEGIN macro */
+
+/* USER CODE END macro */
+
+/* Exported variables --------------------------------------------------------*/
+extern USBPD_ParamsTypeDef DPM_Params[USBPD_PORT_COUNT];
+/* USER CODE BEGIN variables */
+
+/* USER CODE END variables */
+
+/* Exported functions --------------------------------------------------------*/
+USBPD_StatusTypeDef USBPD_DPM_InitCore(void);
+USBPD_StatusTypeDef USBPD_DPM_InitOS(void);
+void                USBPD_DPM_Run(void);
+void                USBPD_DPM_TimerCounter(void);
+__WEAK void         USBPD_DPM_ErrorHandler(void);
+/* USER CODE BEGIN functions */
+
+/* USER CODE END functions */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBPD_DPM_CORE_H_ */
Index: /trunk/fw_g473rct/USBPD/App/usbpd_pdo_defs.h
===================================================================
--- /trunk/fw_g473rct/USBPD/App/usbpd_pdo_defs.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/App/usbpd_pdo_defs.h	(revision 59)
@@ -0,0 +1,148 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_pdo_defs.h
+  * @author  MCD Application Team
+  * @brief   Header file for definition of PDO/APDO values for 2 ports(DRP/SNK) configuration
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#ifndef __USBPD_PDO_DEF_H_
+#define __USBPD_PDO_DEF_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd_def.h"
+
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Define   ------------------------------------------------------------------*/
+#define PORT0_NB_SOURCEPDO         0U   /* Number of Source PDOs (applicable for port 0)   */
+#define PORT0_NB_SINKPDO           1U   /* Number of Sink PDOs (applicable for port 0)     */
+#define PORT1_NB_SOURCEPDO         0U   /* Number of Source PDOs (applicable for port 1)   */
+#define PORT1_NB_SINKPDO           0U   /* Number of Sink PDOs (applicable for port 1)     */
+
+/* USER CODE BEGIN Define */
+
+/* USER CODE END Define */
+
+/* Exported typedef ----------------------------------------------------------*/
+
+/* USER CODE BEGIN typedef */
+/**
+  * @brief  USBPD Port PDO Structure definition
+  *
+  */
+/* USER CODE END typedef */
+
+/* Exported define -----------------------------------------------------------*/
+
+/* USER CODE BEGIN Exported_Define */
+
+#define USBPD_CORE_PDO_SRC_FIXED_MAX_CURRENT 3
+#define USBPD_CORE_PDO_SNK_FIXED_MAX_CURRENT 1500
+
+/* USER CODE END Exported_Define */
+
+/* Exported constants --------------------------------------------------------*/
+
+/* USER CODE BEGIN constants */
+
+/* USER CODE END constants */
+
+/* Exported macro ------------------------------------------------------------*/
+
+/* USER CODE BEGIN macro */
+
+/* USER CODE END macro */
+
+/* Exported variables --------------------------------------------------------*/
+
+/* USER CODE BEGIN variables */
+/* USER CODE END variables */
+
+#ifndef __USBPD_PWR_IF_C
+extern uint32_t PORT0_PDO_ListSRC[USBPD_MAX_NB_PDO];
+extern uint32_t PORT0_PDO_ListSNK[USBPD_MAX_NB_PDO];
+#else
+/* Definition of Source PDO for Port 0 */
+uint32_t PORT0_PDO_ListSRC[USBPD_MAX_NB_PDO] =
+{
+  /* PDO 1 */ (0x00000000U),
+
+  /* PDO 2 */ (0x00000000U),
+
+  /* PDO 3 */ (0x00000000U),
+
+  /* PDO 4 */ (0x00000000U),
+
+  /* PDO 5 */ (0x00000000U),
+
+  /* PDO 6 */ (0x00000000U),
+
+  /* PDO 7 */ (0x00000000U),
+
+};
+
+/* Definition of Sink PDO for Port 0 */
+uint32_t PORT0_PDO_ListSNK[USBPD_MAX_NB_PDO] =
+{
+
+  /* PDO 1 */
+  (
+    USBPD_PDO_TYPE_FIXED                 | /* Fixed supply PDO            */
+
+    USBPD_PDO_SNK_FIXED_SET_VOLTAGE(5000U)         | /* Voltage in mV               */
+    USBPD_PDO_SNK_FIXED_SET_OP_CURRENT(500U)     | /* Operating current in  mA            */
+
+    /* Common definitions applicable to all PDOs, defined only in PDO 1 */
+    USBPD_PDO_SNK_FIXED_FRS_NOT_SUPPORTED          | /* Fast Role Swap				 */
+    USBPD_PDO_SNK_FIXED_DRD_NOT_SUPPORTED          | /* Dual-Role Data              */
+    USBPD_PDO_SNK_FIXED_USBCOMM_NOT_SUPPORTED      | /* USB Communications          */
+    USBPD_PDO_SNK_FIXED_EXT_POWER_NOT_AVAILABLE    | /* External Power              */
+    USBPD_PDO_SNK_FIXED_HIGHERCAPAB_NOT_SUPPORTED   | /* Higher Capability           */
+    USBPD_PDO_SNK_FIXED_DRP_NOT_SUPPORTED            /* Dual-Role Power             */
+  ),
+
+  /* PDO 2 */ (0x00000000U),
+
+  /* PDO 3 */ (0x00000000U),
+
+  /* PDO 4 */ (0x00000000U),
+
+  /* PDO 5 */ (0x00000000U),
+
+  /* PDO 6 */ (0x00000000U),
+
+  /* PDO 7 */ (0x00000000U),
+};
+
+#endif
+
+/* Exported functions --------------------------------------------------------*/
+
+/* USER CODE BEGIN functions */
+
+/* USER CODE END functions */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBPD_PDO_DEF_H_ */
Index: /trunk/fw_g473rct/USBPD/App/usbpd_pwr_if.c
===================================================================
--- /trunk/fw_g473rct/USBPD/App/usbpd_pwr_if.c	(revision 59)
+++ /trunk/fw_g473rct/USBPD/App/usbpd_pwr_if.c	(revision 59)
@@ -0,0 +1,332 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_pwr_if.c
+  * @author  MCD Application Team
+  * @brief   This file contains power interface control functions.
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#define __USBPD_PWR_IF_C
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd_pwr_if.h"
+#include "usbpd_hw_if.h"
+#include "usbpd_dpm_core.h"
+#include "usbpd_dpm_conf.h"
+#include "usbpd_pdo_defs.h"
+#include "usbpd_core.h"
+#if defined(_TRACE)
+#include "usbpd_trace.h"
+#endif /* _TRACE */
+#include "string.h"
+/* USER CODE BEGIN Include */
+
+/* USER CODE END Include */
+
+/** @addtogroup STM32_USBPD_APPLICATION
+  * @{
+  */
+
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF
+  * @{
+  */
+
+/* Private typedef -----------------------------------------------------------*/
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF_Private_TypeDef
+  * @{
+  */
+/* USER CODE BEGIN Private_Typedef */
+
+/* USER CODE END Private_Typedef */
+/**
+  * @}
+  */
+
+/* Private define ------------------------------------------------------------*/
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF_Private_Defines
+  * @{
+  */
+/* USER CODE BEGIN Private_Define */
+
+/* USER CODE END Private_Define */
+/**
+  * @}
+  */
+
+/* Private macros ------------------------------------------------------------*/
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF_Private_Macros
+  * @{
+  */
+#if defined(_TRACE)
+#define PWR_IF_DEBUG_TRACE(_PORT_, __MESSAGE__)  USBPD_TRACE_Add(USBPD_TRACE_DEBUG, (_PORT_), 0u, (uint8_t*)(__MESSAGE__), sizeof(__MESSAGE__) - 1u)
+#else
+#define PWR_IF_DEBUG_TRACE(_PORT_, __MESSAGE__)
+#endif /* _TRACE */
+/* USER CODE BEGIN Private_Macro */
+
+/* USER CODE END Private_Macro */
+/**
+  * @}
+  */
+
+/* Private variables ---------------------------------------------------------*/
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF_Private_Variables
+  * @{
+  */
+/* USER CODE BEGIN Private_Variables */
+
+/* USER CODE END Private_Variables */
+/**
+  * @}
+  */
+
+/* Private function prototypes -----------------------------------------------*/
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF_Private_Functions
+  * @{
+  */
+/* USER CODE BEGIN USBPD_USER_PRIVATE_FUNCTIONS_Prototypes */
+
+/* USER CODE END USBPD_USER_PRIVATE_FUNCTIONS_Prototypes */
+/**
+  * @}
+  */
+
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF_Exported_Functions
+  * @{
+  */
+
+/**
+  * @brief  Initialize structures and variables related to power board profiles
+  *         used by Sink and Source, for all available ports.
+  * @retval USBPD status
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_Init(void)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_Init */
+  return USBPD_ERROR;
+/* USER CODE END USBPD_PWR_IF_Init */
+}
+
+/**
+  * @brief  Checks if the power on a specified port is ready
+  * @param  PortNum Port number
+  * @param  Vsafe   Vsafe status based on @ref USBPD_VSAFE_StatusTypeDef
+  * @retval USBPD status
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_SupplyReady(uint8_t PortNum, USBPD_VSAFE_StatusTypeDef Vsafe)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_SupplyReady */
+  USBPD_StatusTypeDef status = USBPD_ERROR;
+  uint32_t _voltage;
+
+  /* check for valid port */
+  if (!USBPD_PORT_IsValid(PortNum))
+  {
+    return USBPD_ERROR;
+  }
+
+  BSP_USBPD_PWR_VBUSGetVoltage(PortNum, &_voltage);
+  if (USBPD_VSAFE_0V == Vsafe)
+  {
+    /* Vsafe0V */
+    status = ((_voltage < USBPD_PWR_LOW_VBUS_THRESHOLD) ? USBPD_OK : USBPD_ERROR);
+  }
+  else
+  {
+    /* Vsafe5V */
+    status = ((_voltage > USBPD_PWR_HIGH_VBUS_THRESHOLD) ? USBPD_OK : USBPD_ERROR);
+  }
+
+  return status;
+/* USER CODE END USBPD_PWR_IF_SupplyReady */
+}
+
+/**
+  * @brief  Reads the voltage and the current on a specified port
+  * @param  PortNum Port number
+  * @param  pVoltage: The Voltage in mV
+  * @param  pCurrent: The Current in mA
+  * @retval USBPD_ERROR or USBPD_OK
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_ReadVA(uint8_t PortNum, uint16_t *pVoltage, uint16_t *pCurrent)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_ReadVA */
+  return USBPD_ERROR;
+/* USER CODE END USBPD_PWR_IF_ReadVA */
+}
+
+/**
+  * @brief  Enables the VConn on the port.
+  * @param  PortNum Port number
+  * @param  CC      Specifies the CCx to be selected based on @ref CCxPin_TypeDef structure
+  * @retval USBPD status
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_Enable_VConn(uint8_t PortNum, CCxPin_TypeDef CC)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_Enable_VConn */
+  return USBPD_ERROR;
+/* USER CODE END USBPD_PWR_IF_Enable_VConn */
+}
+
+/**
+  * @brief  Disable the VConn on the port.
+  * @param  PortNum Port number
+  * @param  CC      Specifies the CCx to be selected based on @ref CCxPin_TypeDef structure
+  * @retval USBPD status
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_Disable_VConn(uint8_t PortNum, CCxPin_TypeDef CC)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_Disable_VConn */
+  return USBPD_ERROR;
+/* USER CODE END USBPD_PWR_IF_Disable_VConn */
+}
+
+/**
+  * @brief  Allow PDO data reading from PWR_IF storage.
+  * @param  PortNum Port number
+  * @param  DataId Type of data to be read from PWR_IF
+  *         This parameter can be one of the following values:
+  *           @arg @ref USBPD_CORE_DATATYPE_SRC_PDO Source PDO reading requested
+  *           @arg @ref USBPD_CORE_DATATYPE_SNK_PDO Sink PDO reading requested
+  * @param  Ptr Pointer on address where PDO values should be written (u8 pointer)
+  * @param  Size Pointer on nb of u32 written by PWR_IF (nb of PDOs)
+  * @retval None
+  */
+void USBPD_PWR_IF_GetPortPDOs(uint8_t PortNum, USBPD_CORE_DataInfoType_TypeDef DataId, uint8_t *Ptr, uint32_t *Size)
+{
+    {
+      *Size = PORT0_NB_SINKPDO;
+      memcpy(Ptr,PORT0_PDO_ListSNK, sizeof(uint32_t) * PORT0_NB_SINKPDO);
+    }
+/* USER CODE BEGIN USBPD_PWR_IF_GetPortPDOs */
+
+/* USER CODE END USBPD_PWR_IF_GetPortPDOs */
+}
+
+/**
+  * @brief  Find out SRC PDO pointed out by a position provided in a Request DO (from Sink).
+  * @param  PortNum Port number
+  * @param  RdoPosition RDO Position in list of provided PDO
+  * @param  Pdo Pointer on PDO value pointed out by RDO position (u32 pointer)
+  * @retval Status of search
+  *         USBPD_OK : Src PDO found for requested DO position (output Pdo parameter is set)
+  *         USBPD_FAIL : Position is not compliant with current Src PDO for this port (no corresponding PDO value)
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_SearchRequestedPDO(uint8_t PortNum, uint32_t RdoPosition, uint32_t *Pdo)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_SearchRequestedPDO */
+  return USBPD_FAIL;
+/* USER CODE END USBPD_PWR_IF_SearchRequestedPDO */
+}
+
+/**
+  * @brief  Function called in case of critical issue is detected to switch in safety mode.
+  * @param  ErrorType Type of error detected by monitoring (based on @ref USBPD_PWR_IF_ERROR)
+  * @retval None
+  */
+void USBPD_PWR_IF_AlarmType(USBPD_PWR_IF_ERROR ErrorType)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_AlarmType */
+
+/* USER CODE END USBPD_PWR_IF_AlarmType */
+}
+
+/**
+  * @brief  the function is called in case of critical issue is detected to switch in safety mode.
+  * @retval None
+  */
+void USBPD_PWR_IF_Alarm()
+{
+/* USER CODE BEGIN USBPD_PWR_IF_Alarm */
+
+/* USER CODE END USBPD_PWR_IF_Alarm */
+}
+
+/**
+  * @brief Function is called to get VBUS power status.
+  * @param PortNum Port number
+  * @param PowerTypeStatus  Power type status based on @ref USBPD_VBUSPOWER_STATUS
+  * @retval UBBPD_TRUE or USBPD_FALSE
+  */
+uint8_t USBPD_PWR_IF_GetVBUSStatus(uint8_t PortNum, USBPD_VBUSPOWER_STATUS PowerTypeStatus)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_GetVBUSStatus */
+  uint8_t _status = USBPD_FALSE;
+  uint32_t _vbus = HW_IF_PWR_GetVoltage(PortNum);
+
+  switch(PowerTypeStatus)
+  {
+  case USBPD_PWR_BELOWVSAFE0V :
+    if (_vbus < USBPD_PWR_LOW_VBUS_THRESHOLD) _status = USBPD_TRUE;
+    break;
+  case USBPD_PWR_VSAFE5V :
+    if (_vbus >= USBPD_PWR_HIGH_VBUS_THRESHOLD) _status = USBPD_TRUE;
+    break;
+  case USBPD_PWR_SNKDETACH:
+    if (_vbus < USBPD_PWR_HIGH_VBUS_THRESHOLD) _status = USBPD_TRUE;
+    break;
+  default :
+    break;
+  }
+  return _status;
+/* USER CODE END USBPD_PWR_IF_GetVBUSStatus */
+}
+
+/**
+  * @brief Function is called to set the VBUS threshold when a request has been accepted.
+  * @param PortNum Port number
+  * @retval None
+  */
+void USBPD_PWR_IF_UpdateVbusThreshold(uint8_t PortNum)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_UpdateVbusThreshold */
+/* USER CODE END USBPD_PWR_IF_UpdateVbusThreshold */
+}
+
+/**
+  * @brief Function is called to reset the VBUS threshold when there is a power reset.
+  * @param PortNum Port number
+  * @retval None
+  */
+void USBPD_PWR_IF_ResetVbusThreshold(uint8_t PortNum)
+{
+/* USER CODE BEGIN USBPD_PWR_IF_ResetVbusThreshold */
+/* USER CODE END USBPD_PWR_IF_ResetVbusThreshold */
+}
+
+/* USER CODE BEGIN USBPD_USER_EXPORTED_FUNCTIONS_Definition */
+
+/* USER CODE END USBPD_USER_EXPORTED_FUNCTIONS_Definition */
+/**
+  * @}
+  */
+
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF_Private_Functions
+  * @{
+  */
+/* USER CODE BEGIN USBPD_USER_PRIVATE_FUNCTIONS_Definition */
+
+/* USER CODE END USBPD_USER_PRIVATE_FUNCTIONS_Definition */
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
Index: /trunk/fw_g473rct/USBPD/App/usbpd_pwr_if.h
===================================================================
--- /trunk/fw_g473rct/USBPD/App/usbpd_pwr_if.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/App/usbpd_pwr_if.h	(revision 59)
@@ -0,0 +1,334 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_pwr_if.h
+  * @author  MCD Application Team
+  * @brief   This file contains the headers of usbpd_pw_if.h.
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#ifndef __USBPD_PW_IF_H_
+#define __USBPD_PW_IF_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd_def.h"
+
+/** @addtogroup STM32_USBPD_APPLICATION
+  * @{
+  */
+
+/** @addtogroup STM32_USBPD_APPLICATION_POWER_IF
+  * @{
+  */
+
+/* Exported typedef ----------------------------------------------------------*/
+/* Exported define -----------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/** @defgroup USBPD_USER_PWR_IF_Exported_Macros USBPD PWR IF Exported Macros
+  * @{
+  */
+
+/* enumeration of the different power status available for VBUS */
+typedef enum
+{
+  USBPD_PWR_BELOWVSAFE0V,
+  USBPD_PWR_VSAFE5V,
+  USBPD_PWR_SNKDETACH
+} USBPD_VBUSPOWER_STATUS;
+
+/* Enumeration of the different errors detected by power IF */
+typedef enum{
+  USBPD_PWR_IF_OTHER        = 0U,
+  USBPD_PWR_IF_NMI          = 2U,
+  USBPD_PWR_IF_HARD_FAULT   = 3U,
+  USBPD_PWR_IF_OVER_CURRENT = 4U,
+} USBPD_PWR_IF_ERROR;
+
+/* Macros used to convert values into PDO representation */
+#define PWR_V_20MV(_V_)        ((uint16_t)(( (_V_) * 1000) / 20))   /* From Volt to 20mV multiples      */
+#define PWR_V_50MV(_V_)        ((uint16_t)(( (_V_) * 1000) / 50))   /* From Volt to 50mV multiples      */
+#define PWR_V_100MV(_V_)       ((uint16_t)(( (_V_) * 1000) / 100))  /* From Volt to 100mV multiples     */
+#define PWR_A_10MA(_A_)        ((uint16_t)(( (_A_) * 1000) / 10))   /* From Ampere to 10mA multiples    */
+#define PWR_A_50MA(_A_)        ((uint16_t)(( (_A_) * 1000) / 50))   /* From Ampere to 50mA multiples    */
+#define PWR_W(_W_)             ((uint16_t)(( (_W_) * 1000) / 250))  /* From Watt to 250mW multiples     */
+
+/* Macros used to get values from PDO representation */
+#define PWR_DECODE_50MV(_Value_)           ((uint16_t)(((_Value_) * 50)))     /* From 50mV multiples to mV        */
+#define PWR_DECODE_100MV(_Value_)          ((uint16_t)(((_Value_) * 100)))    /* From 100mV multiples to mV       */
+#define PWR_DECODE_10MA(_Value_)           ((uint16_t)(((_Value_) * 10)))     /* From 10mA multiples to mA        */
+#define PWR_DECODE_50MA(_Value_)           ((uint16_t)(((_Value_) * 50)))     /* From 50mA multiples to mA        */
+#define PWR_DECODE_MW(_Value_)             ((uint16_t)(((_Value_) * 250)))    /* From 250mW multiples to mW       */
+
+/* Macros used to describe the parameters in a PDO list */
+/* ---------------------------- FIXED --------------------------- */
+
+/* Set voltage in mV in SRC Fixed PDO */
+#define USBPD_PDO_SRC_FIXED_SET_VOLTAGE(_MV_)        (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SRC_FIXED_VOLTAGE_Pos)        \
+                                                      & (USBPD_PDO_SRC_FIXED_VOLTAGE_Msk))
+
+/* Set max current in mA in SRC Fixed PDO */
+#define USBPD_PDO_SRC_FIXED_SET_MAX_CURRENT(_MA_)    (((PWR_A_10MA((_MA_)  / 1000.0))             \
+                                                       << USBPD_PDO_SRC_FIXED_MAX_CURRENT_Pos)    \
+                                                      & (USBPD_PDO_SRC_FIXED_MAX_CURRENT_Msk))
+
+/* Set voltage in mV in SNK Fixed PDO */
+#define USBPD_PDO_SNK_FIXED_SET_VOLTAGE(_MV_)        (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SNK_FIXED_VOLTAGE_Pos)        \
+                                                      & (USBPD_PDO_SNK_FIXED_VOLTAGE_Msk))
+
+/* Set operating current in mA in SNK Fixed PDO */
+#define USBPD_PDO_SNK_FIXED_SET_OP_CURRENT(_MA_)     (((PWR_A_10MA((_MA_)  / 1000.0))             \
+                                                       << USBPD_PDO_SNK_FIXED_OP_CURRENT_Pos)     \
+                                                      & (USBPD_PDO_SNK_FIXED_OP_CURRENT_Msk))
+
+/* ---------------------------- VARIABLE ------------------------ */
+
+/* Set max voltage in mV in SRC VARIABLE PDO */
+#define USBPD_PDO_SRC_VARIABLE_SET_MAX_VOLTAGE(_MV_) (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SRC_VARIABLE_MAX_VOLTAGE_Pos) \
+                                                      & (USBPD_PDO_SRC_VARIABLE_MAX_VOLTAGE_Msk))
+
+/* Set min voltage in mV in SRC VARIABLE PDO */
+#define USBPD_PDO_SRC_VARIABLE_SET_MIN_VOLTAGE(_MV_) (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SRC_VARIABLE_MIN_VOLTAGE_Pos) \
+                                                      & (USBPD_PDO_SRC_VARIABLE_MIN_VOLTAGE_Msk))
+
+/* Set max current in mA in SRC VARIABLE PDO */
+#define USBPD_PDO_SRC_VARIABLE_SET_MAX_CURRENT(_MA_) (((PWR_A_10MA((_MA_)  / 1000.0))             \
+                                                       << USBPD_PDO_SRC_VARIABLE_MAX_CURRENT_Pos) \
+                                                      & (USBPD_PDO_SRC_VARIABLE_MAX_CURRENT_Msk))
+
+/* Set max voltage in mV in SNK VARIABLE PDO */
+#define USBPD_PDO_SNK_VARIABLE_SET_MAX_VOLTAGE(_MV_) (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SNK_VARIABLE_MAX_VOLTAGE_Pos) \
+                                                      & (USBPD_PDO_SNK_VARIABLE_MAX_VOLTAGE_Msk))
+
+/* Set min voltage in mV in SNK VARIABLE PDO */
+#define USBPD_PDO_SNK_VARIABLE_SET_MIN_VOLTAGE(_MV_) (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SNK_VARIABLE_MIN_VOLTAGE_Pos) \
+                                                      & (USBPD_PDO_SNK_VARIABLE_MIN_VOLTAGE_Msk))
+
+/* Set operating current in mA in SNK VARIABLE */
+#define USBPD_PDO_SNK_VARIABLE_SET_OP_CURRENT(_MA_)  (((PWR_A_10MA((_MA_)  / 1000.0))             \
+                                                       << USBPD_PDO_SNK_VARIABLE_OP_CURRENT_Pos)  \
+                                                      & (USBPD_PDO_SNK_VARIABLE_OP_CURRENT_Msk))
+
+/* ---------------------------- BATTERY ------------------------ */
+
+/* Set max voltage in mV in SRC BATTERY PDO */
+#define USBPD_PDO_SRC_BATTERY_SET_MAX_VOLTAGE(_MV_)  (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SRC_BATTERY_MAX_VOLTAGE_Pos)  \
+                                                      & (USBPD_PDO_SRC_BATTERY_MAX_VOLTAGE_Msk))
+
+/* Set min voltage in mV in SRC BATTERY PDO */
+#define USBPD_PDO_SRC_BATTERY_SET_MIN_VOLTAGE(_MV_)  (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SRC_BATTERY_MIN_VOLTAGE_Pos)  \
+                                                      & (USBPD_PDO_SRC_BATTERY_MIN_VOLTAGE_Msk))
+
+/* Set max power in mW in SRC BATTERY PDO */
+#define USBPD_PDO_SRC_BATTERY_SET_MAX_POWER(_MA_)    (((PWR_W((_MA_)       / 1000.0))             \
+                                                       << USBPD_PDO_SRC_BATTERY_MAX_POWER_Pos)    \
+                                                      & (USBPD_PDO_SRC_BATTERY_MAX_POWER_Msk))
+
+/* Set max voltage in mV in SNK BATTERY PDO */
+#define USBPD_PDO_SNK_BATTERY_SET_MAX_VOLTAGE(_MV_)  (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SNK_BATTERY_MAX_VOLTAGE_Pos)  \
+                                                      & (USBPD_PDO_SNK_BATTERY_MAX_VOLTAGE_Msk))
+
+/* Set min voltage in mV in SNK BATTERY PDO */
+#define USBPD_PDO_SNK_BATTERY_SET_MIN_VOLTAGE(_MV_)  (((PWR_V_50MV((_MV_)  / 1000.0))             \
+                                                       << USBPD_PDO_SNK_BATTERY_MIN_VOLTAGE_Pos)  \
+                                                      & (USBPD_PDO_SNK_BATTERY_MIN_VOLTAGE_Msk))
+
+/* Set operating power in mW in SNK BATTERY PDO */
+#define USBPD_PDO_SNK_BATTERY_SET_OP_POWER(_MA_)     (((PWR_W((_MA_)       / 1000.0))             \
+                                                       << USBPD_PDO_SNK_BATTERY_OP_POWER_Pos)     \
+                                                      & (USBPD_PDO_SNK_BATTERY_OP_POWER_Msk))
+
+/* ---------------------------- APDO ---------------------------- */
+
+/* Set min voltage in mV in SRC APDO */
+#define USBPD_PDO_SRC_APDO_SET_MIN_VOLTAGE(_MV_)     (((PWR_V_100MV((_MV_) / 1000.0))             \
+                                                       << USBPD_PDO_SRC_APDO_MIN_VOLTAGE_Pos)     \
+                                                      & (USBPD_PDO_SRC_APDO_MIN_VOLTAGE_Msk))
+
+/* Set max voltage in mV in SRC APDO */
+#define USBPD_PDO_SRC_APDO_SET_MAX_VOLTAGE(_MV_)     (((PWR_V_100MV((_MV_) / 1000.0))             \
+                                                       << USBPD_PDO_SRC_APDO_MAX_VOLTAGE_Pos)     \
+                                                      & (USBPD_PDO_SRC_APDO_MAX_VOLTAGE_Msk))
+
+/* Set max current in mA in SRC APDO */
+#define USBPD_PDO_SRC_APDO_SET_MAX_CURRENT(_MA_)     (((PWR_A_50MA((_MA_)  / 1000.0))             \
+                                                       << USBPD_PDO_SRC_APDO_MAX_CURRENT_Pos)     \
+                                                      & (USBPD_PDO_SRC_APDO_MAX_CURRENT_Msk))
+
+/* Set min voltage in mV in SNK APDO */
+#define USBPD_PDO_SNK_APDO_SET_MIN_VOLTAGE(_MV_)     (((PWR_V_100MV((_MV_) / 1000.0))             \
+                                                       << USBPD_PDO_SNK_APDO_MIN_VOLTAGE_Pos)     \
+                                                      & (USBPD_PDO_SNK_APDO_MIN_VOLTAGE_Msk))
+
+/* Set max voltage in mV in SNK APDO */
+#define USBPD_PDO_SNK_APDO_SET_MAX_VOLTAGE(_MV_)     (((PWR_V_100MV((_MV_) / 1000.0))             \
+                                                       << USBPD_PDO_SNK_APDO_MAX_VOLTAGE_Pos)     \
+                                                      & (USBPD_PDO_SNK_APDO_MAX_VOLTAGE_Msk))
+
+/* Set max current in mA in SNK APDO */
+#define USBPD_PDO_SNK_APDO_SET_MAX_CURRENT(_MA_)     (((PWR_A_50MA((_MA_)  / 1000.0))             \
+                                                       << USBPD_PDO_SNK_APDO_MAX_CURRENT_Pos)     \
+                                                      & (USBPD_PDO_SNK_APDO_MAX_CURRENT_Msk))
+
+#define USBPD_PORT_IsValid(__Port__) ((__Port__) < (USBPD_PORT_COUNT))
+
+/**
+  * @}
+  */
+
+/* Exported variables --------------------------------------------------------*/
+/* USER CODE BEGIN variables */
+
+/* USER CODE END variables */
+/* Exported functions --------------------------------------------------------*/
+/** @defgroup STM32_USBPD_APPLICATION_POWER_IF_Exported_Functions USBPD PWR IF Exported Functions
+  * @{
+  */
+/**
+  * @brief  Initialize structures and variables related to power board profiles
+  *         used by Sink and Source, for all available ports.
+  * @retval USBPD status
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_Init(void);
+
+/**
+  * @brief  Checks if the power on a specified port is ready
+  * @param  PortNum Port number
+  * @param  Vsafe   Vsafe status based on @ref USBPD_VSAFE_StatusTypeDef
+  * @retval USBPD status
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_SupplyReady(uint8_t PortNum, USBPD_VSAFE_StatusTypeDef Vsafe);
+
+/**
+  * @brief  Reads the voltage and the current on a specified port
+  * @param  PortNum Port number
+  * @param  pVoltage The Voltage in mV
+  * @param  pCurrent The Current in mA
+  * @retval ENABLE or DISABLE
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_ReadVA(uint8_t PortNum, uint16_t *pVoltage, uint16_t *pCurrent);
+
+/**
+  * @brief  Enables the VConn on the port.
+  * @param  PortNum Port number
+  * @param  CC      Specifies the CCx to be selected based on @ref CCxPin_TypeDef structure
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_Enable_VConn(uint8_t PortNum, CCxPin_TypeDef CC);
+
+/**
+  * @brief  Disable the VConn on the port.
+  * @param  PortNum Port number
+  * @param  CC      Specifies the CCx to be selected based on @ref CCxPin_TypeDef structure
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_Disable_VConn(uint8_t PortNum, CCxPin_TypeDef CC);
+
+/**
+  * @brief  Allow PDO data reading from PWR_IF storage.
+  * @param  PortNum Port number
+  * @param  DataId Type of data to be read from PWR_IF
+  *         This parameter can be one of the following values:
+  *           @arg @ref USBPD_CORE_DATATYPE_SRC_PDO Source PDO reading requested
+  *           @arg @ref USBPD_CORE_DATATYPE_SNK_PDO Sink PDO reading requested
+  * @param  Ptr Pointer on address where PDO values should be written (u8 pointer)
+  * @param  Size Pointer on nb of u32 written by PWR_IF (nb of PDOs)
+  * @retval None
+  */
+void USBPD_PWR_IF_GetPortPDOs(uint8_t PortNum, USBPD_CORE_DataInfoType_TypeDef DataId, uint8_t *Ptr, uint32_t *Size);
+
+/**
+  * @brief  Find out SRC PDO pointed out by a position provided in a Request DO (from Sink).
+  * @param  PortNum Port number
+  * @param  RdoPosition RDO Position in list of provided PDO
+  * @param  Pdo Pointer on PDO value pointed out by RDO position (u32 pointer)
+  * @retval Status of search
+  *         USBPD_OK : Src PDO found for requested DO position (output Pdo parameter is set)
+  *         USBPD_FAIL : Position is not compliant with current Src PDO for this port (no corresponding PDO value)
+  */
+USBPD_StatusTypeDef USBPD_PWR_IF_SearchRequestedPDO(uint8_t PortNum, uint32_t RdoPosition, uint32_t *Pdo);
+
+/**
+  * @brief  Function called in case of critical issue is detected to switch in safety mode.
+  * @param  ErrorType Type of error detected by monitoring (based on @ref USBPD_PWR_IF_ERROR)
+  * @retval None
+  */
+void USBPD_PWR_IF_AlarmType(USBPD_PWR_IF_ERROR ErrorType);
+
+/**
+  * @brief  Function called in case of critical issue is detected to switch in safety mode.
+  * @retval None
+  */
+void USBPD_PWR_IF_Alarm(void);
+
+/**
+  * @brief Function is called to get VBUS power status.
+  * @param PortNum Port number
+  * @param PowerTypeStatus  Power type status based on @ref USBPD_VBUSPOWER_STATUS
+  * @retval UBBPD_TRUE or USBPD_FALSE
+  */
+uint8_t USBPD_PWR_IF_GetVBUSStatus(uint8_t PortNum, USBPD_VBUSPOWER_STATUS PowerTypeStatus);
+
+/**
+  * @brief Function is called to set the VBUS threshold when a request has been accepted.
+  * @param PortNum Port number
+  * @retval None
+  */
+void USBPD_PWR_IF_UpdateVbusThreshold(uint8_t PortNum);
+
+/**
+  * @brief Function is called to reset the VBUS threshold when there is a power reset.
+  * @param PortNum Port number
+  * @retval None
+  */
+void USBPD_PWR_IF_ResetVbusThreshold(uint8_t PortNum);
+
+/* USER CODE BEGIN Exported Functions */
+
+/* USER CODE END Exported Functions */
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBPD_PW_IF_H_ */
+
Index: /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_conf.h
===================================================================
--- /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_conf.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_conf.h	(revision 59)
@@ -0,0 +1,179 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_dpm_conf.h
+  * @author  MCD Application Team
+  * @brief   Header file for stack/application settings file
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#ifndef __USBPD_DPM_CONF_H_
+#define __USBPD_DPM_CONF_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd_pdo_defs.h"
+#include "usbpd_dpm_user.h"
+#include "usbpd_vdm_user.h"
+
+/* USER CODE BEGIN Includes */
+/* Section where include file can be added */
+
+/* USER CODE END Includes */
+
+/* Define   ------------------------------------------------------------------*/
+/* Define VID, PID,... manufacturer parameters */
+#define USBPD_VID (0x0483u)     /*!< Vendor ID (assigned by the USB-IF)                     */
+#define USBPD_PID (0x0002u)     /*!< Product ID (assigned by the manufacturer)              */
+#define USBPD_XID (0xF0000003u) /*!< Value provided by the USB-IF assigned to the product   */
+
+/* USER CODE BEGIN Define */
+/* Section where Define can be added */
+
+/* USER CODE END Define */
+
+/* Exported typedef ----------------------------------------------------------*/
+/* USER CODE BEGIN Typedef */
+/* Section where Typedef can be added */
+
+/* USER CODE END Typedef */
+
+/* Private variables ---------------------------------------------------------*/
+#ifndef __USBPD_DPM_CORE_C
+extern USBPD_SettingsTypeDef            DPM_Settings[USBPD_PORT_COUNT];
+extern USBPD_IdSettingsTypeDef          DPM_ID_Settings[USBPD_PORT_COUNT];
+extern USBPD_USER_SettingsTypeDef       DPM_USER_Settings[USBPD_PORT_COUNT];
+#else /* __USBPD_DPM_CORE_C */
+USBPD_SettingsTypeDef       DPM_Settings[USBPD_PORT_COUNT] =
+{
+  {
+    .PE_SupportedSOP = USBPD_SUPPORTED_SOP_SOP    , /* Supported SOP : SOP, SOP' SOP" SOP'Debug SOP"Debug */
+    .PE_SpecRevision = USBPD_SPECIFICATION_REV3,/* spec revision value                                     */
+    .PE_DefaultRole = USBPD_PORTPOWERROLE_SNK,  /* Default port role                                       */
+    .PE_RoleSwap = USBPD_FALSE,                  /* support port role swap                                  */
+    .PE_VDMSupport = USBPD_FALSE,
+    .PE_RespondsToDiscovSOP = USBPD_FALSE,      /*!< Can respond successfully to a Discover Identity */
+    .PE_AttemptsDiscovSOP = USBPD_FALSE,        /*!< Can send a Discover Identity */
+    .PE_PingSupport = USBPD_FALSE,              /* support Ping (only for PD3.0)                                            */
+    .PE_CapscounterSupport = USBPD_FALSE,       /* support caps counter                                    */
+    .CAD_RoleToggle = USBPD_FALSE,               /* CAD role toggle                                         */
+    .CAD_TryFeature = 0,              /* CAD try feature                                         */
+    .CAD_AccesorySupport = USBPD_FALSE,         /* CAD accessory support                                   */
+    .PE_PD3_Support.d =                           /*!< PD3 SUPPORT FEATURE                                              */
+    {
+      .PE_UnchunkSupport                = USBPD_FALSE,  /* support Unchunked mode (valid only spec revision 3.0)   */
+      .PE_FastRoleSwapSupport           = USBPD_FALSE,   /* support fast role swap only spec revision 3.0            */
+      .Is_GetPPSStatus_Supported        = USBPD_FALSE,  /*!< PPS message NOT supported by PE stack */
+      .Is_SrcCapaExt_Supported          = USBPD_FALSE,  /*!< Source_Capabilities_Extended message supported or not by DPM */
+      .Is_Alert_Supported               = USBPD_FALSE,   /*!< Alert message supported or not by DPM */
+      .Is_GetStatus_Supported           = USBPD_FALSE,   /*!< Status message supported or not by DPM (Is_Alert_Supported should be enabled) */
+      .Is_GetManufacturerInfo_Supported = USBPD_FALSE,  /*!< Manufacturer_Info message supported or not by DPM */
+      .Is_GetCountryCodes_Supported     = USBPD_FALSE,  /*!< Country_Codes message supported or not by DPM */
+      .Is_GetCountryInfo_Supported      = USBPD_FALSE,  /*!< Country_Info message supported or not by DPM */
+      .Is_SecurityRequest_Supported     = USBPD_FALSE,  /*!< Security_Response message supported or not by DPM */
+      .Is_FirmUpdateRequest_Supported   = USBPD_FALSE,  /*!< Firmware update response message supported by PE */
+      .Is_GetBattery_Supported          = USBPD_FALSE,  /*!< Get Battery Capabitity and Status messages supported by PE */
+    },
+
+    .CAD_SRCToggleTime = 0,                    /* uint8_t CAD_SRCToggleTime; */
+    .CAD_SNKToggleTime = 0,                    /* uint8_t CAD_SNKToggleTime; */
+  }
+};
+
+USBPD_IdSettingsTypeDef          DPM_ID_Settings[USBPD_PORT_COUNT] =
+{
+  {
+    .XID = USBPD_XID,     /*!< Value provided by the USB-IF assigned to the product   */
+    .VID = USBPD_VID,     /*!< Vendor ID (assigned by the USB-IF)                     */
+    .PID = USBPD_PID,     /*!< Product ID (assigned by the manufacturer)              */
+  },
+};
+
+USBPD_USER_SettingsTypeDef       DPM_USER_Settings[USBPD_PORT_COUNT] =
+{
+  {
+    .PE_DataSwap = USBPD_FALSE,                  /* support data swap                                       */
+    .PE_VconnSwap = USBPD_FALSE,                 /* support VCONN swap                                  */
+    .PE_DR_Swap_To_DFP = USBPD_FALSE,                  /*  Support of DR Swap to DFP                                  */
+    .PE_DR_Swap_To_UFP = USBPD_FALSE,                  /*  Support of DR Swap to UFP                                  */
+     .DPM_SNKExtendedCapa =                        /*!< SNK Extended Capability        */
+	 {
+	   .VID                    = USBPD_VID,  /*!< Vendor ID (assigned by the USB-IF)                      */
+	   .PID                    = USBPD_PID,  /*!< Product ID (assigned by the manufacturer)               */
+	   .XID                    = USBPD_XID,  /*!< Value provided by the USB-IF assigned to the product    */
+	   .FW_revision            = 1,          /*!< Firmware version number                                 */
+	   .HW_revision            = 2,          /*!< Hardware version number                                 */
+       .SKEDB_Version          = USBPD_SKEDB_VERSION_1P0,  /*!<SKEDV Version (not the specification Version)
+                                                               based on @ref USBPD_SKEDB_VERSION          */
+       .LoadStep               = USBPD_SKEDB_LOADSTEP_150MA,/*!< Load Step based on @ref USBPD_SKEDB_LOADSTEP */
+       .SinkLoadCharac.b       =             /*!< Sink Load Characteristics                               */
+        {
+           .PercentOverload    = 0,          /*!< Percent overload in 10% increments Values higher than 25
+                                                  (11001b) are clipped to 250%. 00000b is the default.    */
+           .OverloadPeriod     = 0,          /*!< Overload period in 20ms when bits 0-4 non-zero          */
+           .DutyCycle          = 0,          /*!< Duty Cycle in 5% increments when bits 0-4 are non-zero  */
+           .VBusVoltageDrop    = 0,          /*!< Can tolerate VBUS Voltage drop                          */
+        },
+       .Compliance             = 0,          /*!< Compliance based on combination of @ref USBPD_SKEDB_COMPLIANCE */
+       .Touchtemp              = USBPD_SKEDB_TOUCHTEMP_NA,  /*< Touch Temp based on @ref USBPD_SKEDB_TOUCHTEMP   */
+       .BatteryInfo            = 0,          /*!< Battery info                                                   */
+       .SinkModes              = 0,          /*!< Sink Modes based on combination of @ref USBPD_SKEDB_SINKMODES  */
+       .SinkMinimumPDP        = 0,          /*!< The Minimum PDP required by the Sink to operate without
+                                                  consuming any power from its Battery(s) should it have one     */
+       .SinkOperationalPDP     = 0,          /*!< The PDP the Sink requires to operate normally. For Sinks with
+                                                  a Battery, it is the PDP rating of the charger supplied with
+                                                  it or recommended for it.                                      */
+       .SinkMaximumPDP         = 0,          /*!< The Maximum PDP the Sink can consume to operate and
+                                                  charge its Battery(s) should it have one                       */
+      },
+#if defined(USBPD_REV30_SUPPORT)
+#if _MANU_INFO
+    .DPM_ManuInfoPort =                      /*!< Manufacturer information used for the port            */
+    {
+      .VID = USBPD_VID,                      /*!< Vendor ID (assigned by the USB-IF)        */
+      .PID = USBPD_PID,                      /*!< Product ID (assigned by the manufacturer) */
+      .ManuString = "STMicroelectronics",    /*!< Vendor defined byte array                 */
+    },
+#endif /* _MANU_INFO */
+#endif /* USBPD_REV30_SUPPORT */
+  },
+};
+
+#endif /* !__USBPD_DPM_CORE_C */
+
+/* USER CODE BEGIN Variable */
+/* Section where Variable can be added */
+
+/* USER CODE END Variable */
+
+/* Exported constants --------------------------------------------------------*/
+/* USER CODE BEGIN Constant */
+/* Section where Constant can be added */
+
+/* USER CODE END Constant */
+
+/* Exported macro ------------------------------------------------------------*/
+/* USER CODE BEGIN Macro */
+/* Section where Macro can be added */
+
+/* USER CODE END Macro */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBPD_DPM_CONF_H_ */
Index: /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_user.c
===================================================================
--- /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_user.c	(revision 59)
+++ /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_user.c	(revision 59)
@@ -0,0 +1,977 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_dpm_user.c
+  * @author  MCD Application Team
+  * @brief   USBPD DPM user code
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#define USBPD_DPM_USER_C
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+#include "usbpd_core.h"
+#include "usbpd_dpm_user.h"
+#include "usbpd_pdo_defs.h"
+#include "usbpd_dpm_core.h"
+#include "usbpd_dpm_conf.h"
+#include "usbpd_vdm_user.h"
+#include "usbpd_pwr_if.h"
+#include "usbpd_pwr_user.h"
+#if defined(_TRACE)
+#include "usbpd_trace.h"
+#include "string.h"
+#include "stdio.h"
+#endif /* _TRACE */
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/** @addtogroup STM32_USBPD_APPLICATION
+  * @{
+  */
+
+/** @addtogroup STM32_USBPD_APPLICATION_DPM_USER
+  * @{
+  */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN Private_Typedef */
+
+/* USER CODE END Private_Typedef */
+
+/* Private define ------------------------------------------------------------*/
+/** @defgroup USBPD_USER_PRIVATE_DEFINES USBPD USER Private Defines
+  * @{
+  */
+/* USER CODE BEGIN Private_Define */
+
+/* USER CODE END Private_Define */
+
+/**
+  * @}
+  */
+
+/* Private macro -------------------------------------------------------------*/
+/** @defgroup USBPD_USER_PRIVATE_MACROS USBPD USER Private Macros
+  * @{
+  */
+#if defined(_TRACE)
+#define DPM_USER_DEBUG_TRACE_SIZE       50u
+#define DPM_USER_DEBUG_TRACE(_PORT_, ...)  do {                                                                \
+      char _str[DPM_USER_DEBUG_TRACE_SIZE];                                                                    \
+      uint8_t _size = snprintf(_str, DPM_USER_DEBUG_TRACE_SIZE, __VA_ARGS__);                                  \
+      if (_size < DPM_USER_DEBUG_TRACE_SIZE)                                                                   \
+        USBPD_TRACE_Add(USBPD_TRACE_DEBUG, (uint8_t)(_PORT_), 0, (uint8_t*)_str, strlen(_str));                \
+      else                                                                                                     \
+        USBPD_TRACE_Add(USBPD_TRACE_DEBUG, (uint8_t)(_PORT_), 0, (uint8_t*)_str, DPM_USER_DEBUG_TRACE_SIZE);   \
+  } while(0)
+
+#define DPM_USER_ERROR_TRACE(_PORT_, _STATUS_, ...)  do {                                                      \
+    if (USBPD_OK != _STATUS_) {                                                                                \
+        char _str[DPM_USER_DEBUG_TRACE_SIZE];                                                                  \
+        uint8_t _size = snprintf(_str, DPM_USER_DEBUG_TRACE_SIZE, __VA_ARGS__);                                \
+        if (_size < DPM_USER_DEBUG_TRACE_SIZE)                                                                 \
+          USBPD_TRACE_Add(USBPD_TRACE_DEBUG, (uint8_t)(_PORT_), 0, (uint8_t*)_str, strlen(_str));              \
+        else                                                                                                   \
+          USBPD_TRACE_Add(USBPD_TRACE_DEBUG, (uint8_t)(_PORT_), 0, (uint8_t*)_str, DPM_USER_DEBUG_TRACE_SIZE); \
+    }                                                                                                          \
+  } while(0)
+#else
+#define DPM_USER_DEBUG_TRACE(_PORT_, ...)
+#define DPM_USER_ERROR_TRACE(_PORT_, _STATUS_, ...)
+#endif /* _TRACE */
+/* USER CODE BEGIN Private_Macro */
+
+/* USER CODE END Private_Macro */
+/**
+  * @}
+  */
+
+/* Private variables ---------------------------------------------------------*/
+/** @defgroup USBPD_USER_PRIVATE_VARIABLES USBPD USER Private Variables
+  * @{
+  */
+
+/* USER CODE BEGIN Private_Variables */
+
+/* USER CODE END Private_Variables */
+/**
+  * @}
+  */
+
+/* Private function prototypes -----------------------------------------------*/
+/** @defgroup USBPD_USER_PRIVATE_FUNCTIONS USBPD USER Private Functions
+  * @{
+  */
+/* USER CODE BEGIN USBPD_USER_PRIVATE_FUNCTIONS_Prototypes */
+
+/* USER CODE END USBPD_USER_PRIVATE_FUNCTIONS_Prototypes */
+/**
+  * @}
+  */
+
+/* Exported functions ------- ------------------------------------------------*/
+/** @defgroup USBPD_USER_EXPORTED_FUNCTIONS USBPD USER Exported Functions
+  * @{
+  */
+/* USER CODE BEGIN USBPD_USER_EXPORTED_FUNCTIONS */
+
+void USBPD_PE_SNK_EvaluateCapabilities(uint8_t PortNum, uint32_t* RequestData, USBPD_CORE_PDO_Type_TypeDef* PtrPowerObject){ }
+void USBPD_PE_PowerRoleSwap(uint8_t PortNum, USBPD_PortPowerRole_TypeDef CurrentRole, USBPD_PRS_Status_TypeDef Status) {}
+
+/* USER CODE END USBPD_USER_EXPORTED_FUNCTIONS */
+
+/** @defgroup USBPD_USER_EXPORTED_FUNCTIONS_GROUP1 USBPD USER Exported Functions called by DPM CORE
+  * @{
+  */
+/* USER CODE BEGIN USBPD_USER_EXPORTED_FUNCTIONS_GROUP1 */
+
+/* USER CODE END USBPD_USER_EXPORTED_FUNCTIONS_GROUP1 */
+
+/**
+  * @brief  Initialize DPM (port power role, PWR_IF, CAD and PE Init procedures)
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_UserInit(void)
+{
+/* USER CODE BEGIN USBPD_DPM_UserInit */
+  return USBPD_OK;
+/* USER CODE END USBPD_DPM_UserInit */
+}
+
+/**
+  * @brief  User delay implementation which is OS dependent
+  * @param  Time time in ms
+  * @retval None
+  */
+void USBPD_DPM_WaitForTime(uint32_t Time)
+{
+  HAL_Delay(Time);
+}
+
+/**
+  * @brief  User processing time, it is recommended to avoid blocking task for long time
+  * @param  argument  DPM User event
+  * @retval None
+  */
+void USBPD_DPM_UserExecute(void const *argument)
+{
+/* USER CODE BEGIN USBPD_DPM_UserExecute */
+
+/* USER CODE END USBPD_DPM_UserExecute */
+}
+
+/**
+  * @brief  UserCableDetection reporting events on a specified port from CAD layer.
+  * @param  PortNum The handle of the port
+  * @param  State CAD state
+  * @retval None
+  */
+void USBPD_DPM_UserCableDetection(uint8_t PortNum, USBPD_CAD_EVENT State)
+{
+/* USER CODE BEGIN USBPD_DPM_UserCableDetection */
+DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: update USBPD_DPM_UserCableDetection");
+  // switch(State)
+  // {
+  // case USBPD_CAD_EVENT_ATTACHED:
+  // case USBPD_CAD_EVENT_ATTEMC:
+    // {
+      // if (USBPD_OK != USBPD_PWR_IF_VBUSEnable(PortNum))
+      // {
+        // /* Should not occur */
+        // HAL_Delay(6000);
+        // NVIC_SystemReset();
+      // }
+      // break;
+    // }
+  // case USBPD_CAD_EVENT_DETACHED :
+  // case USBPD_CAD_EVENT_EMC :
+  // default :
+    // {
+      // if (USBPD_OK != USBPD_PWR_IF_VBUSDisable(PortNum))
+      // {
+        // /* Should not occur */
+        // while(1);
+      // }
+      // break;
+    // }
+  // }
+/* USER CODE END USBPD_DPM_UserCableDetection */
+}
+
+/**
+  * @brief  function used to manage user timer.
+  * @param  PortNum Port number
+  * @retval None
+  */
+void USBPD_DPM_UserTimerCounter(uint8_t PortNum)
+{
+/* USER CODE BEGIN USBPD_DPM_UserTimerCounter */
+
+/* USER CODE END USBPD_DPM_UserTimerCounter */
+}
+
+/**
+  * @}
+  */
+
+/** @defgroup USBPD_USER_EXPORTED_FUNCTIONS_GROUP2 USBPD USER Exported Callbacks functions called by PE
+  * @{
+  */
+
+/**
+  * @brief  Callback function called by PE to inform DPM about PE event.
+  * @param  PortNum The current port number
+  * @param  EventVal @ref USBPD_NotifyEventValue_TypeDef
+  * @retval None
+  */
+void USBPD_DPM_Notification(uint8_t PortNum, USBPD_NotifyEventValue_TypeDef EventVal)
+{
+/* USER CODE BEGIN USBPD_DPM_Notification */
+  /* Manage event notified by the stack? */
+  switch(EventVal)
+  {
+//    case USBPD_NOTIFY_POWER_EXPLICIT_CONTRACT :
+//      break;
+//    case USBPD_NOTIFY_REQUEST_ACCEPTED:
+//      break;
+//    case USBPD_NOTIFY_REQUEST_REJECTED:
+//    case USBPD_NOTIFY_REQUEST_WAIT:
+//      break;
+//    case USBPD_NOTIFY_POWER_SWAP_TO_SNK_DONE:
+//      break;
+//    case USBPD_NOTIFY_STATE_SNK_READY:
+//      break;
+//    case USBPD_NOTIFY_HARDRESET_RX:
+//    case USBPD_NOTIFY_HARDRESET_TX:
+//      break;
+//    case USBPD_NOTIFY_STATE_SRC_DISABLED:
+//      break;
+//    case USBPD_NOTIFY_ALERT_RECEIVED :
+//      break;
+//    case USBPD_NOTIFY_CABLERESET_REQUESTED :
+//      break;
+//    case USBPD_NOTIFY_MSG_NOT_SUPPORTED :
+//      break;
+//    case USBPD_NOTIFY_PE_DISABLED :
+//      break;
+//    case USBPD_NOTIFY_USBSTACK_START:
+//      break;
+//    case USBPD_NOTIFY_USBSTACK_STOP:
+//      break;
+//    case USBPD_NOTIFY_DATAROLESWAP_DFP :
+//      break;
+//    case USBPD_NOTIFY_DATAROLESWAP_UFP :
+//      break;
+    default:
+      DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: USBPD_DPM_Notification:%d", EventVal);
+      break;
+  }
+/* USER CODE END USBPD_DPM_Notification */
+}
+
+/**
+  * @brief  Callback function called by PE layer when HardReset message received from PRL
+  * @param  PortNum The current port number
+  * @param  CurrentRole the current role
+  * @param  Status status on hard reset event
+  * @retval None
+  */
+void USBPD_DPM_HardReset(uint8_t PortNum, USBPD_PortPowerRole_TypeDef CurrentRole, USBPD_HR_Status_TypeDef Status)
+{
+/* USER CODE BEGIN USBPD_DPM_HardReset */
+  DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: update USBPD_DPM_HardReset");
+/* USER CODE END USBPD_DPM_HardReset */
+}
+
+/**
+  * @brief  DPM callback to allow PE to retrieve information from DPM/PWR_IF.
+  * @param  PortNum Port number
+  * @param  DataId  Type of data to be updated in DPM based on @ref USBPD_CORE_DataInfoType_TypeDef
+  * @param  Ptr     Pointer on address where DPM data should be written (u8 pointer)
+  * @param  Size    Pointer on nb of u8 written by DPM
+  * @retval None
+  */
+void USBPD_DPM_GetDataInfo(uint8_t PortNum, USBPD_CORE_DataInfoType_TypeDef DataId, uint8_t *Ptr, uint32_t *Size)
+{
+/* USER CODE BEGIN USBPD_DPM_GetDataInfo */
+  /* Check type of information targeted by request */
+  switch(DataId)
+  {
+//  case USBPD_CORE_DATATYPE_REQ_VOLTAGE:       /*!< Get voltage value requested for BIST tests, expect 5V*/
+//    *Size = 4;
+//    (void)memcpy((uint8_t *)Ptr, (uint8_t *)&DPM_Ports[PortNum].DPM_RequestedVoltage, *Size);
+    // break;
+//  case USBPD_CORE_DATATYPE_SRC_PDO:           /*!< Handling of port Source PDO                         */
+    // break;
+//  case USBPD_CORE_PPS_STATUS:                 /*!< PPS Status message content                          */
+    // break;
+//  case USBPD_CORE_SNK_EXTENDED_CAPA:          /*!< Retrieve of Sink Extended capability message content*/
+    // break;
+//  case USBPD_CORE_INFO_STATUS:                /*!< Information status message content                  */
+    // break;
+//  case USBPD_CORE_MANUFACTURER_INFO:          /*!< Retrieve of Manufacturer info message content       */
+    // break;
+//  case USBPD_CORE_BATTERY_STATUS:             /*!< Retrieve of Battery status message content          */
+    // break;
+//  case USBPD_CORE_BATTERY_CAPABILITY:         /*!< Retrieve of Battery capability message content      */
+    // break;
+  default:
+    DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: update USBPD_DPM_GetDataInfo:%d", DataId);
+    break;
+  }
+/* USER CODE END USBPD_DPM_GetDataInfo */
+}
+
+/**
+  * @brief  DPM callback to allow PE to update information in DPM/PWR_IF.
+  * @param  PortNum Port number
+  * @param  DataId  Type of data to be updated in DPM based on @ref USBPD_CORE_DataInfoType_TypeDef
+  * @param  Ptr     Pointer on the data
+  * @param  Size    Nb of bytes to be updated in DPM
+  * @retval None
+  */
+void USBPD_DPM_SetDataInfo(uint8_t PortNum, USBPD_CORE_DataInfoType_TypeDef DataId, uint8_t *Ptr, uint32_t Size)
+{
+/* USER CODE BEGIN USBPD_DPM_SetDataInfo */
+  /* Check type of information targeted by request */
+  switch(DataId)
+  {
+//  case USBPD_CORE_DATATYPE_RDO_POSITION:      /*!< Reset the PDO position selected by the sink only */
+    // break;
+//  case USBPD_CORE_DATATYPE_RCV_SRC_PDO:       /*!< Storage of Received Source PDO values        */
+    // break;
+//  case USBPD_CORE_DATATYPE_RCV_SNK_PDO:       /*!< Storage of Received Sink PDO values          */
+    // break;
+  // case USBPD_CORE_DATATYPE_RCV_REQ_PDO :     /*!< Storage of Received Sink Request PDO value   */
+    // if (Size == 4)
+    // {
+      // memcpy((uint8_t *)&DPM_Ports[PortNum].DPM_RcvRequestDOMsg,  Ptr, 4);
+    // }
+    // break;
+//  case USBPD_CORE_INFO_STATUS:                /*!< Information status message content           */
+    // break;
+//  case USBPD_CORE_ALERT:                      /*!< Storing of received Alert message content    */
+    // break;
+//  case USBPD_CORE_GET_MANUFACTURER_INFO:      /*!< Storing of received Get Manufacturer info message content */
+    // break;
+//  case USBPD_CORE_GET_BATTERY_STATUS:         /*!< Storing of received Get Battery status message content    */
+    // break;
+//  case USBPD_CORE_GET_BATTERY_CAPABILITY:     /*!< Storing of received Get Battery capability message content*/
+    // break;
+//  case USBPD_CORE_SNK_EXTENDED_CAPA:          /*!< Storing of Sink Extended capability message content       */
+    // break;
+  default:
+    DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: update USBPD_DPM_SetDataInfo:%d", DataId);
+    break;
+  }
+/* USER CODE END USBPD_DPM_SetDataInfo */
+
+}
+
+/**
+  * @brief  Evaluate received Capabilities Message from Source port and prepare the request message
+  * @param  PortNum         Port number
+  * @param  PtrRequestData  Pointer on selected request data object
+  * @param  PtrPowerObjectType  Pointer on the power data object
+  * @retval None
+  */
+void USBPD_DPM_SNK_EvaluateCapabilities(uint8_t PortNum, uint32_t *PtrRequestData, USBPD_CORE_PDO_Type_TypeDef *PtrPowerObjectType)
+{
+/* USER CODE BEGIN USBPD_DPM_SNK_EvaluateCapabilities */
+  DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: update USBPD_DPM_SNK_EvaluateCapabilities");
+/* USER CODE END USBPD_DPM_SNK_EvaluateCapabilities */
+}
+
+/**
+  * @brief  Callback to be used by PE to evaluate a Vconn swap
+  * @param  PortNum Port number
+  * @retval USBPD_ACCEPT, USBPD_REJECT, USBPD_WAIT
+  */
+USBPD_StatusTypeDef USBPD_DPM_EvaluateVconnSwap(uint8_t PortNum)
+{
+/* USER CODE BEGIN USBPD_DPM_EvaluateVconnSwap */
+  USBPD_StatusTypeDef status = USBPD_REJECT;
+  if (USBPD_TRUE == DPM_USER_Settings[PortNum].PE_VconnSwap)
+  {
+    status = USBPD_ACCEPT;
+  }
+
+  return status;
+/* USER CODE END USBPD_DPM_EvaluateVconnSwap */
+}
+
+/**
+  * @brief  Callback to be used by PE to manage VConn
+  * @param  PortNum Port number
+  * @param  State Enable or Disable VConn on CC lines
+  * @retval USBPD_ACCEPT, USBPD_REJECT
+  */
+USBPD_StatusTypeDef USBPD_DPM_PE_VconnPwr(uint8_t PortNum, USBPD_FunctionalState State)
+{
+/* USER CODE BEGIN USBPD_DPM_PE_VconnPwr */
+  return USBPD_ERROR;
+/* USER CODE END USBPD_DPM_PE_VconnPwr */
+}
+
+/**
+  * @brief  DPM callback to allow PE to forward extended message information.
+  * @param  PortNum Port number
+  * @param  MsgType Type of message to be handled in DPM
+  *         This parameter can be one of the following values:
+  *           @arg @ref USBPD_EXT_SECURITY_REQUEST Security Request extended message
+  *           @arg @ref USBPD_EXT_SECURITY_RESPONSE Security Response extended message
+  * @param  ptrData   Pointer on address Extended Message data could be read (u8 pointer)
+  * @param  DataSize  Nb of u8 that compose Extended message
+  * @retval None
+  */
+void USBPD_DPM_ExtendedMessageReceived(uint8_t PortNum, USBPD_ExtendedMsg_TypeDef MsgType, uint8_t *ptrData, uint16_t DataSize)
+{
+/* USER CODE BEGIN USBPD_DPM_ExtendedMessageReceived */
+
+/* USER CODE END USBPD_DPM_ExtendedMessageReceived */
+}
+
+/**
+  * @brief  DPM callback to allow PE to enter ERROR_RECOVERY state.
+  * @param  PortNum Port number
+  * @retval None
+  */
+void USBPD_DPM_EnterErrorRecovery(uint8_t PortNum)
+{
+/* USER CODE BEGIN USBPD_DPM_EnterErrorRecovery */
+  /* Inform CAD to enter recovery mode */
+  USBPD_CAD_EnterErrorRecovery(PortNum);
+/* USER CODE END USBPD_DPM_EnterErrorRecovery */
+}
+
+/**
+  * @brief  Callback used to ask application the reply status for a DataRoleSwap request
+  * @note   if the callback is not set (ie NULL) the stack will automatically reject the request
+  * @param  PortNum Port number
+  * @retval Returned values are:
+            @ref USBPD_ACCEPT if DRS can be accepted
+            @ref USBPD_REJECT if DRS is not accepted in one data role (DFP or UFP) or in PD2.0 config
+            @ref USBPD_NOTSUPPORTED if DRS is not supported at all by the application (in both data roles) - P3.0 only
+  */
+USBPD_StatusTypeDef USBPD_DPM_EvaluateDataRoleSwap(uint8_t PortNum)
+{
+/* USER CODE BEGIN USBPD_DPM_EvaluateDataRoleSwap */
+  USBPD_StatusTypeDef status = USBPD_REJECT;
+  /* Sent NOT_SUPPORTED if DRS is not supported at all by the application (in both data roles) - P3.0 only */
+  if ((USBPD_FALSE == DPM_USER_Settings[PortNum].PE_DataSwap)
+    || ((USBPD_FALSE == DPM_USER_Settings[PortNum].PE_DR_Swap_To_DFP)
+    && (USBPD_FALSE == DPM_USER_Settings[PortNum].PE_DR_Swap_To_UFP)))
+  {
+    status = USBPD_NOTSUPPORTED;
+  }
+  else
+  {
+    /* ACCEPT DRS if at least supported by 1 data role */
+    if (((USBPD_TRUE == DPM_USER_Settings[PortNum].PE_DR_Swap_To_DFP) && (USBPD_PORTDATAROLE_UFP == DPM_Params[PortNum].PE_DataRole))
+       || ((USBPD_TRUE == DPM_USER_Settings[PortNum].PE_DR_Swap_To_UFP) && (USBPD_PORTDATAROLE_DFP == DPM_Params[PortNum].PE_DataRole)))
+    {
+      status = USBPD_ACCEPT;
+    }
+  }
+  return status;
+/* USER CODE END USBPD_DPM_EvaluateDataRoleSwap */
+}
+
+/**
+  * @brief  Callback to be used by PE to check is VBUS is ready or present
+  * @param  PortNum Port number
+  * @param  Vsafe   Vsafe status based on @ref USBPD_VSAFE_StatusTypeDef
+  * @retval USBPD_DISABLE or USBPD_ENABLE
+  */
+USBPD_FunctionalState USBPD_DPM_IsPowerReady(uint8_t PortNum, USBPD_VSAFE_StatusTypeDef Vsafe)
+{
+/* USER CODE BEGIN USBPD_DPM_IsPowerReady */
+  return ((USBPD_OK == USBPD_PWR_IF_SupplyReady(PortNum, Vsafe)) ? USBPD_ENABLE : USBPD_DISABLE);
+/* USER CODE END USBPD_DPM_IsPowerReady */
+}
+
+/**
+  * @}
+  */
+
+/** @defgroup USBPD_USER_EXPORTED_FUNCTIONS_GROUP3 USBPD USER Functions PD messages requests
+  * @{
+  */
+
+/**
+  * @brief  Request the PE to send a hard reset
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestHardReset(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_HardReset(PortNum);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "HARD RESET not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a cable reset.
+  * @note   Only a DFP Shall generate Cable Reset Signaling. A DFP Shall only generate Cable Reset Signaling within an Explicit Contract.
+            The DFP has to be supplying VCONN prior to a Cable Reset
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestCableReset(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CableReset(PortNum);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "CABLE RESET not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a GOTOMIN message
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGotoMin(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_GOTOMIN, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GOTOMIN not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a PING message
+  * @note   In USB-PD stack, only ping management for P3.0 is implemented.
+  *         If PD2.0 is used, PING timer needs to be implemented on user side.
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestPing(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_PING, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "PING not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a request message.
+  * @param  PortNum     The current port number
+  * @param  IndexSrcPDO Index on the selected SRC PDO (value between 1 to 7)
+  * @param  RequestedVoltage Requested voltage (in MV and use mainly for APDO)
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestMessageRequest(uint8_t PortNum, uint8_t IndexSrcPDO, uint16_t RequestedVoltage)
+{
+  USBPD_StatusTypeDef _status = USBPD_ERROR;
+/* USER CODE BEGIN USBPD_DPM_RequestMessageRequest */
+  /* To be adapted to call the PE function */
+  /*       _status = USBPD_PE_Send_Request(PortNum, rdo.d32, pdo_object);*/
+  DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: update USBPD_DPM_RequestMessageRequest");
+/* USER CODE END USBPD_DPM_RequestMessageRequest */
+  DPM_USER_ERROR_TRACE(PortNum, _status, "REQUEST not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a GET_SRC_CAPA message
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetSourceCapability(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_GET_SRC_CAP, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_SRC_CAPA not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a GET_SNK_CAPA message
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetSinkCapability(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_GET_SNK_CAP, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_SINK_CAPA not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to perform a Data Role Swap.
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestDataRoleSwap(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_DR_SWAP, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "DRS not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to perform a Power Role Swap.
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestPowerRoleSwap(uint8_t PortNum)
+{
+  DPM_USER_ERROR_TRACE(PortNum, USBPD_ERROR, "PRS not accepted by the stack");
+  return USBPD_ERROR;
+}
+
+/**
+  * @brief  Request the PE to perform a VCONN Swap.
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestVconnSwap(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_VCONN_SWAP, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "VCS not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a soft reset
+  * @param  PortNum The current port number
+  * @param  SOPType SOP Type based on @ref USBPD_SOPType_TypeDef
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestSoftReset(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_SOFT_RESET, SOPType);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "SOFT_RESET not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a Source Capability message.
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestSourceCapability(uint8_t PortNum)
+{
+  /* PE will directly get the PDO saved in structure @ref PWR_Port_PDO_Storage */
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_DataMessage(PortNum, USBPD_DATAMSG_SRC_CAPABILITIES, NULL);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "SRC_CAPA not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a VDM discovery identity
+  * @param  PortNum The current port number
+  * @param  SOPType SOP Type
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_DiscoveryIdentify(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType)
+{
+  USBPD_StatusTypeDef _status = USBPD_ERROR;
+/* USER CODE BEGIN USBPD_DPM_RequestVDM_DiscoveryIdentify */
+  if (USBPD_SOPTYPE_SOP == SOPType)
+  {
+    _status = USBPD_PE_SVDM_RequestIdentity(PortNum, SOPType);
+  }
+/* USER CODE END USBPD_DPM_RequestVDM_DiscoveryIdentify */
+  DPM_USER_ERROR_TRACE(PortNum, _status, "VDM Discovery Ident not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a VDM discovery SVID
+  * @param  PortNum The current port number
+  * @param  SOPType SOP Type
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_DiscoverySVID(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_SVDM_RequestSVID(PortNum, SOPType);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "VDM discovery SVID not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to perform a VDM Discovery mode message on one SVID.
+  * @param  PortNum The current port number
+  * @param  SOPType SOP Type
+  * @param  SVID    SVID used for discovery mode message
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_DiscoveryMode(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_SVDM_RequestMode(PortNum, SOPType, SVID);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "VDM Discovery mode not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to perform a VDM mode enter.
+  * @param  PortNum   The current port number
+  * @param  SOPType   SOP Type
+  * @param  SVID      SVID used for discovery mode message
+  * @param  ModeIndex Index of the mode to be entered
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_EnterMode(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID, uint8_t ModeIndex)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_SVDM_RequestModeEnter(PortNum, SOPType, SVID, ModeIndex);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "VDM mode enter not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to perform a VDM mode exit.
+  * @param  PortNum   The current port number
+  * @param  SOPType   SOP Type
+  * @param  SVID      SVID used for discovery mode message
+  * @param  ModeIndex Index of the mode to be exit
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_ExitMode(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID, uint8_t ModeIndex)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_SVDM_RequestModeExit(PortNum, SOPType, SVID, ModeIndex);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "VDM mode exit not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a Display Port status
+  * @param  PortNum   The current port number
+  * @param  SOPType   SOP Type
+  * @param  SVID      Used SVID
+  * @param  pDPStatus Pointer on DP Status data (32 bit)
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestDisplayPortStatus(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID, uint32_t *pDPStatus)
+{
+  USBPD_StatusTypeDef _status;
+/* USER CODE BEGIN USBPD_DPM_RequestDisplayPortStatus */
+  /*USBPD_VDM_FillDPStatus(PortNum, (USBPD_DPStatus_TypeDef*)pDPStatus);*/
+/* USER CODE END USBPD_DPM_RequestDisplayPortStatus */
+  _status = USBPD_PE_SVDM_RequestSpecific(PortNum, SOPType, SVDM_SPECIFIC_1, SVID);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "Display Port status not accepted by the stack");
+  return _status;
+}
+/**
+  * @brief  Request the PE to send a Display Port Config
+  * @param  PortNum   The current port number
+  * @param  SOPType   SOP Type
+  * @param  SVID      Used SVID
+  * @param  pDPConfig Pointer on DP Config data (32 bit)
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestDisplayPortConfig(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID, uint32_t *pDPConfig)
+{
+  USBPD_StatusTypeDef _status;
+/* USER CODE BEGIN USBPD_DPM_RequestDisplayPortConfig */
+  /*USBPD_VDM_FillDPConfig(PortNum, (USBPD_DPConfig_TypeDef*)pDPConfig);*/
+/* USER CODE END USBPD_DPM_RequestDisplayPortConfig */
+  _status = USBPD_PE_SVDM_RequestSpecific(PortNum, SOPType, SVDM_SPECIFIC_2, SVID);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "Display Port Config not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to perform a VDM Attention.
+  * @param  PortNum The current port number
+  * @param  SOPType SOP Type
+  * @param  SVID    Used SVID
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestAttention(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_SVDM_RequestAttention(PortNum, SOPType, SVID);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "VDM ATTENTION not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send an ALERT to port partner
+  * @param  PortNum The current port number
+  * @param  Alert   Alert based on @ref USBPD_ADO_TypeDef
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestAlert(uint8_t PortNum, USBPD_ADO_TypeDef Alert)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_DataMessage(PortNum, USBPD_DATAMSG_ALERT, (uint32_t*)&Alert.d32);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "ALERT not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to get a source capability extended
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetSourceCapabilityExt(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_GET_SRC_CAPEXT, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_SRC_CAPA_EXT not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to get a sink capability extended
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetSinkCapabilityExt(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_GET_SNK_CAPEXT, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_SINK_CAPA_EXT not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to get a manufacturer info
+  * @param  PortNum The current port number
+  * @param  SOPType SOP Type
+  * @param  pManuInfoData Pointer on manufacturer info based on @ref USBPD_GMIDB_TypeDef
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetManufacturerInfo(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint8_t* pManuInfoData)
+{
+  USBPD_StatusTypeDef _status = USBPD_ERROR;
+  if (USBPD_SOPTYPE_SOP == SOPType)
+  {
+    _status = USBPD_PE_SendExtendedMessage(PortNum, SOPType, USBPD_EXT_GET_MANUFACTURER_INFO, (uint8_t*)pManuInfoData, sizeof(USBPD_GMIDB_TypeDef));
+  }
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_MANU_INFO not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to request a GET_PPS_STATUS
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetPPS_Status(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_GET_PPS_STATUS, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_PPS_STATUS not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to request a GET_STATUS
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetStatus(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_GET_STATUS, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_STATUS not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to perform a Fast Role Swap.
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestFastRoleSwap(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_FR_SWAP, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "FRS not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a GET_COUNTRY_CODES message
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetCountryCodes(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_CtrlMessage(PortNum, USBPD_CONTROLMSG_GET_COUNTRY_CODES, USBPD_SOPTYPE_SOP);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_COUNTRY_CODES not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a GET_COUNTRY_INFO message
+  * @param  PortNum     The current port number
+  * @param  CountryCode Country code (1st character and 2nd of the Alpha-2 Country)
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetCountryInfo(uint8_t PortNum, uint16_t CountryCode)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_Request_DataMessage(PortNum, USBPD_DATAMSG_GET_COUNTRY_INFO, (uint32_t*)&CountryCode);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_COUNTRY_INFO not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a GET_BATTERY_CAPA
+  * @param  PortNum         The current port number
+  * @param  pBatteryCapRef  Pointer on the Battery Capability reference
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetBatteryCapability(uint8_t PortNum, uint8_t *pBatteryCapRef)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_SendExtendedMessage(PortNum, USBPD_SOPTYPE_SOP, USBPD_EXT_GET_BATTERY_CAP, (uint8_t*)pBatteryCapRef, 1);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_BATTERY_CAPA not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a GET_BATTERY_STATUS
+  * @param  PortNum           The current port number
+  * @param  pBatteryStatusRef Pointer on the Battery Status reference
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestGetBatteryStatus(uint8_t PortNum, uint8_t *pBatteryStatusRef)
+{
+  USBPD_StatusTypeDef _status = USBPD_PE_SendExtendedMessage(PortNum, USBPD_SOPTYPE_SOP, USBPD_EXT_GET_BATTERY_STATUS, (uint8_t*)pBatteryStatusRef, 1);
+  DPM_USER_ERROR_TRACE(PortNum, _status, "GET_BATTERY_STATUS not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @brief  Request the PE to send a SECURITY_REQUEST
+  * @param  PortNum The current port number
+  * @retval USBPD Status
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestSecurityRequest(uint8_t PortNum)
+{
+  USBPD_StatusTypeDef _status = USBPD_ERROR;
+  DPM_USER_ERROR_TRACE(PortNum, _status, "SECURITY_REQUEST not accepted by the stack");
+  return _status;
+}
+
+/**
+  * @}
+  */
+
+/** @addtogroup USBPD_USER_PRIVATE_FUNCTIONS
+  * @{
+  */
+
+/* USER CODE BEGIN USBPD_USER_PRIVATE_FUNCTIONS */
+
+/* USER CODE END USBPD_USER_PRIVATE_FUNCTIONS */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
Index: /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_user.h
===================================================================
--- /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_user.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/Target/usbpd_dpm_user.h	(revision 59)
@@ -0,0 +1,181 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_dpm_user.h
+  * @author  MCD Application Team
+  * @brief   Header file for usbpd_dpm_user.c file
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#ifndef __USBPD_DPM_USER_H_
+#define __USBPD_DPM_USER_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+/* USER CODE BEGIN Include */
+
+/* USER CODE END Include */
+
+/** @addtogroup STM32_USBPD_APPLICATION
+  * @{
+  */
+
+/** @addtogroup STM32_USBPD_APPLICATION_DPM_USER
+  * @{
+  */
+
+/* Exported typedef ----------------------------------------------------------*/
+typedef struct
+{
+  uint32_t PE_DataSwap                                    : 1U;  /*!< support data swap                                     */
+  uint32_t PE_VconnSwap                                   : 1U;  /*!< support VCONN swap                                    */
+  uint32_t PE_DR_Swap_To_DFP                              : 1U;  /*!< If supported, DR Swap to DFP can be accepted or not by the user else directly rejected */
+  uint32_t PE_DR_Swap_To_UFP                              : 1U;  /*!< If supported, DR Swap to UFP can be accepted or not by the user else directly rejected */
+  uint32_t Reserved1                                      :28U;  /*!< Reserved bits */
+  USBPD_SNKPowerRequest_TypeDef DPM_SNKRequestedPower;          /*!< Requested Power by the sink board                     */
+  USBPD_MIDB_TypeDef  DPM_ManuInfoPort;                         /*!< Manufacturer information used for the port            */
+USBPD_SKEDB_TypeDef DPM_SNKExtendedCapa;                        /*!< SNK Extended Capability           */
+uint8_t             ReservedSnkCapa[3];                       /*!< Reserved bits to match with SnkCapaExt information     */
+  uint16_t            ReservedManu;                             /*!< Reserved bits to match with Manufacturer information            */
+} USBPD_USER_SettingsTypeDef;
+
+typedef struct
+{
+  uint32_t XID;               /*!< Value provided by the USB-IF assigned to the product   */
+  uint16_t VID;               /*!< Vendor ID (assigned by the USB-IF)                     */
+  uint16_t PID;               /*!< Product ID (assigned by the manufacturer)              */
+} USBPD_IdSettingsTypeDef;
+/* USER CODE BEGIN Typedef */
+
+/* USER CODE END Typedef */
+
+/* Exported define -----------------------------------------------------------*/
+/* USER CODE BEGIN Define */
+
+/* USER CODE END Define */
+
+/* Exported constants --------------------------------------------------------*/
+/* USER CODE BEGIN Constant */
+
+/* USER CODE END Constant */
+
+/* Exported macro ------------------------------------------------------------*/
+/* USER CODE BEGIN Macro */
+
+/* USER CODE END Macro */
+
+/* Exported variables --------------------------------------------------------*/
+/* USER CODE BEGIN Private_Variables */
+
+/* USER CODE END Private_Variables */
+
+/* Exported functions --------------------------------------------------------*/
+/** @addtogroup USBPD_USER_EXPORTED_FUNCTIONS
+  * @{
+  */
+/** @addtogroup USBPD_USER_EXPORTED_FUNCTIONS_GROUP1
+  * @{
+  */
+USBPD_StatusTypeDef USBPD_DPM_UserInit(void);
+void                USBPD_DPM_WaitForTime(uint32_t Time);
+void                USBPD_DPM_UserExecute(void const *argument);
+void                USBPD_DPM_UserCableDetection(uint8_t PortNum, USBPD_CAD_EVENT State);
+void                USBPD_DPM_UserTimerCounter(uint8_t PortNum);
+
+/**
+  * @}
+  */
+
+/** @addtogroup USBPD_USER_EXPORTED_FUNCTIONS_GROUP2
+  * @{
+  */
+void                USBPD_DPM_Notification(uint8_t PortNum, USBPD_NotifyEventValue_TypeDef EventVal);
+void                USBPD_DPM_HardReset(uint8_t PortNum, USBPD_PortPowerRole_TypeDef CurrentRole, USBPD_HR_Status_TypeDef Status);
+void                USBPD_DPM_ExtendedMessageReceived(uint8_t PortNum, USBPD_ExtendedMsg_TypeDef MsgType, uint8_t *ptrData, uint16_t DataSize);
+void                USBPD_DPM_GetDataInfo(uint8_t PortNum, USBPD_CORE_DataInfoType_TypeDef DataId , uint8_t *Ptr, uint32_t *Size);
+void                USBPD_DPM_SetDataInfo(uint8_t PortNum, USBPD_CORE_DataInfoType_TypeDef DataId , uint8_t *Ptr, uint32_t Size);
+void                USBPD_DPM_SNK_EvaluateCapabilities(uint8_t PortNum, uint32_t *PtrRequestData, USBPD_CORE_PDO_Type_TypeDef *PtrPowerObjectType);
+uint32_t            USBPD_DPM_SNK_EvaluateMatchWithSRCPDO(uint8_t PortNum, uint32_t SrcPDO, uint32_t* PtrRequestedVoltage, uint32_t* PtrRequestedPower);
+USBPD_StatusTypeDef USBPD_DPM_EvaluateVconnSwap(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_PE_VconnPwr(uint8_t PortNum, USBPD_FunctionalState State);
+void                USBPD_DPM_EnterErrorRecovery(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_EvaluateDataRoleSwap(uint8_t PortNum);
+USBPD_FunctionalState USBPD_DPM_IsPowerReady(uint8_t PortNum, USBPD_VSAFE_StatusTypeDef Vsafe);
+
+/**
+  * @}
+  */
+
+/** @addtogroup USBPD_USER_EXPORTED_FUNCTIONS_GROUP3
+  * @{
+  */
+USBPD_StatusTypeDef USBPD_DPM_RequestHardReset(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestCableReset(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestGotoMin(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestPing(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestMessageRequest(uint8_t PortNum, uint8_t IndexSrcPDO, uint16_t RequestedVoltage);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetSourceCapability(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetSinkCapability(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestDataRoleSwap(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestPowerRoleSwap(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestVconnSwap(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestSoftReset(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType);
+USBPD_StatusTypeDef USBPD_DPM_RequestSourceCapability(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_DiscoveryIdentify(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType);
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_DiscoverySVID(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType);
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_DiscoveryMode(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID);
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_EnterMode(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID, uint8_t ModeIndex);
+USBPD_StatusTypeDef USBPD_DPM_RequestVDM_ExitMode(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID, uint8_t ModeIndex);
+USBPD_StatusTypeDef USBPD_DPM_RequestDisplayPortStatus(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID, uint32_t *pDPStatus);
+USBPD_StatusTypeDef USBPD_DPM_RequestDisplayPortConfig(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID, uint32_t *pDPConfig);
+USBPD_StatusTypeDef USBPD_DPM_RequestAttention(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint16_t SVID);
+USBPD_StatusTypeDef USBPD_DPM_RequestAlert(uint8_t PortNum, USBPD_ADO_TypeDef Alert);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetSourceCapabilityExt(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetSinkCapabilityExt(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetManufacturerInfo(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, uint8_t* pManuInfoData);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetStatus(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestFastRoleSwap(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetPPS_Status(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetCountryCodes(uint8_t PortNum);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetCountryInfo(uint8_t PortNum, uint16_t CountryCode);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetBatteryCapability(uint8_t PortNum, uint8_t *pBatteryCapRef);
+USBPD_StatusTypeDef USBPD_DPM_RequestGetBatteryStatus(uint8_t PortNum, uint8_t *pBatteryStatusRef);
+USBPD_StatusTypeDef USBPD_DPM_RequestSecurityRequest(uint8_t PortNum);
+/* USER CODE BEGIN Function */
+
+/* USER CODE END Function */
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBPD_DPM_USER_H_ */
Index: /trunk/fw_g473rct/USBPD/Target/usbpd_pwr_user.c
===================================================================
--- /trunk/fw_g473rct/USBPD/Target/usbpd_pwr_user.c	(revision 59)
+++ /trunk/fw_g473rct/USBPD/Target/usbpd_pwr_user.c	(revision 59)
@@ -0,0 +1,801 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_pwr_user.c
+  * @author  MCD Application Team
+  * @brief   USBPD PWR user code
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd_pwr_user.h"
+#include "stm32g4xx_hal.h"
+#if defined(_TRACE)
+#include "usbpd_core.h"
+#include "usbpd_trace.h"
+#endif /* _TRACE */
+
+/* USER CODE BEGIN include */
+
+/* USER CODE END include */
+
+/** @addtogroup BSP
+  * @{
+  */
+
+/** @addtogroup POWER
+  * @{
+  */
+/** @defgroup POWER_Private_Typedef Private Typedef
+  * @{
+  */
+/* USER CODE BEGIN POWER_Private_Typedef */
+
+/* USER CODE END POWER_Private_Typedef */
+/**
+  * @}
+  */
+
+/** @defgroup POWER_Private_Constants Private Constants
+* @{
+*/
+/* USER CODE BEGIN POWER_Private_Constants */
+
+/* USER CODE END POWER_Private_Constants */
+/**
+  * @}
+  */
+
+/** @defgroup POWER_Private_Macros Private Macros
+  * @{
+  */
+#if defined(_TRACE)
+#define PWR_DEBUG_TRACE(_PORT_, __MESSAGE__)  USBPD_TRACE_Add(USBPD_TRACE_DEBUG,    (_PORT_), 0u, (uint8_t*)(__MESSAGE__), sizeof(__MESSAGE__) - 1u)
+#else
+#define PWR_DEBUG_TRACE(_PORT_, __MESSAGE__)
+#endif /* _TRACE */
+/* USER CODE BEGIN POWER_Private_Macros */
+
+/* USER CODE END POWER_Private_Macros */
+/**
+  * @}
+  */
+
+/** @defgroup POWER_Private_Variables Private Variables
+  * @{
+  */
+/* USER CODE BEGIN POWER_Private_Variables */
+
+/* USER CODE END POWER_Private_Variables */
+/**
+  * @}
+  */
+
+/** @defgroup POWER_Private_Functions Private Functions
+  * @{
+  */
+/* USER CODE BEGIN POWER_Private_Prototypes */
+
+/* USER CODE END POWER_Private_Prototypes */
+/**
+  * @}
+  */
+
+/** @defgroup POWER_Exported_Variables Exported Variables
+  * @{
+  */
+/* USER CODE BEGIN POWER_Exported_Variables */
+
+/* USER CODE END POWER_Exported_Variables */
+/**
+  * @}
+  */
+
+/** @addtogroup POWER_Exported_Functions
+  * @{
+  */
+/**
+  * @brief  Global initialization of PWR resource used by USB-PD
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_Init(uint32_t Instance)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_Init */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_NONE;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_Init */
+}
+
+/**
+  * @brief  Global de-initialization of PWR resource used by USB-PD
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_Deinit(uint32_t Instance)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_Deinit */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_NONE;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_Deinit");
+  }
+
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_Deinit */
+}
+
+/**
+  * @brief  Assign Power role for current Port (Source or Sink)
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  Role Type-C port role
+  *         This parameter can be take one of the following values:
+  *         @arg @ref POWER_ROLE_SOURCE
+  *         @arg @ref POWER_ROLE_SINK
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_SetRole(uint32_t Instance, USBPD_PWR_PowerRoleTypeDef Role)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_SetRole */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_NONE;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_SetRole");
+  }
+
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_SetRole */
+}
+
+/**
+  * @brief  Set operating mode of Port regarding power saving constraints
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  PwrMode Type-C port power saving mode
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_MODE_OFF
+  *         @arg @ref USBPD_PWR_MODE_HIBERNATE
+  *         @arg @ref USBPD_PWR_MODE_LOWPOWER
+  *         @arg @ref USBPD_PWR_MODE_NORMAL
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_SetPowerMode(uint32_t Instance, USBPD_PWR_PowerModeTypeDef PwrMode)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_SetPowerMode */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_NONE;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_SetPowerMode");
+  }
+
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_SetPowerMode */
+}
+
+/**
+  * @brief  Get operating mode of Port regarding power saving constraints
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  PwrMode Pointer on current Type-C port power saving mode value
+  *         Following values are available :
+  *         @arg @ref USBPD_PWR_MODE_OFF
+  *         @arg @ref USBPD_PWR_MODE_HIBERNATE
+  *         @arg @ref USBPD_PWR_MODE_LOWPOWER
+  *         @arg @ref USBPD_PWR_MODE_NORMAL
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_GetPowerMode(uint32_t Instance, USBPD_PWR_PowerModeTypeDef *PwrMode)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_GetPowerMode */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_NONE;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_GetPowerMode");
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_GetPowerMode */
+}
+
+/**
+  * @brief  Initialize the hardware resources used by the Type-C power delivery (PD)
+  *         controller.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSInit(uint32_t Instance)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSInit */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_NONE;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_VBUSInit");
+  }
+
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSInit */
+}
+
+/**
+  * @brief  Release the hardware resources used by the Type-C power delivery (PD)
+  *         controller.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSDeInit(uint32_t Instance)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSDeInit */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSDeInit */
+}
+
+/**
+  * @brief  Enable power supply over VBUS.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSOn(uint32_t Instance)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSOn */
+  /* Check if instance is valid       */
+  int32_t ret;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_VBUSOn");
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSOn */
+}
+
+/**
+  * @brief  Disable power supply over VBUS.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSOff(uint32_t Instance)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSOff */
+  /* Check if instance is valid       */
+  int32_t ret;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_VBUSOff");
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSOff */
+}
+
+/**
+  * @brief  Set a fixed/variable PDO and manage the power control.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  VbusTargetInmv the vbus Target (in mV)
+  * @param  OperatingCurrent the Operating Current (in mA)
+  * @param  MaxOperatingCurrent the Max Operating Current (in mA)
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSSetVoltage_Fixed(uint32_t Instance,
+                                           uint32_t VbusTargetInmv,
+                                           uint32_t OperatingCurrent,
+                                           uint32_t MaxOperatingCurrent)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSSetVoltage_Fixed */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_NONE;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSSetVoltage_Fixed */
+}
+
+/**
+  * @brief  Set a fixed/variable PDO and manage the power control.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  VbusTargetMinInmv the vbus Target min (in mV)
+  * @param  VbusTargetMaxInmv the vbus Target max (in mV)
+  * @param  OperatingCurrent the Operating Current (in mA)
+  * @param  MaxOperatingCurrent the Max Operating Current (in mA)
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSSetVoltage_Variable(uint32_t Instance,
+                                              uint32_t VbusTargetMinInmv,
+                                              uint32_t VbusTargetMaxInmv,
+                                              uint32_t OperatingCurrent,
+                                              uint32_t MaxOperatingCurrent)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSSetVoltage_Variable */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSSetVoltage_Variable */
+}
+
+/**
+  * @brief  Set a Battery PDO and manage the power control.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  VbusTargetMin the vbus Target min (in mV)
+  * @param  VbusTargetMax the vbus Target max (in mV)
+  * @param  OperatingPower the Operating Power (in mW)
+  * @param  MaxOperatingPower the Max Operating Power (in mW)
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSSetVoltage_Battery(uint32_t Instance,
+                                             uint32_t VbusTargetMin,
+                                             uint32_t VbusTargetMax,
+                                             uint32_t OperatingPower,
+                                             uint32_t MaxOperatingPower)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSSetVoltage_Battery */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSSetVoltage_Battery */
+}
+
+/**
+  * @brief  Set a APDO and manage the power control.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  VbusTargetInmv the vbus Target (in mV)
+  * @param  OperatingCurrent the Operating current (in mA)
+  * @param  Delta Delta between with previous APDO (in mV), 0 means APDO start
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSSetVoltage_APDO(uint32_t Instance,
+                                          uint32_t VbusTargetInmv,
+                                          uint32_t OperatingCurrent,
+                                          int32_t Delta)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSSetVoltage_APDO */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSSetVoltage_APDO */
+}
+
+/**
+  * @brief  Get actual voltage level measured on the VBUS line.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  pVoltage Pointer on measured voltage level (in mV)
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSGetVoltage(uint32_t Instance, uint32_t *pVoltage)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSGetVoltage */
+  /* Check if instance is valid       */
+  int32_t ret;
+  uint32_t val = 0U;
+
+  if ((Instance >= USBPD_PWR_INSTANCES_NBR) || (NULL == pVoltage))
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_VBUSGetVoltage");
+  }
+  *pVoltage = val;
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSGetVoltage */
+}
+
+/**
+  * @brief  Get actual current level measured on the VBUS line.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  pCurrent Pointer on measured current level (in mA)
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSGetCurrent(uint32_t Instance, int32_t *pCurrent)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSGetCurrent */
+  /* Check if instance is valid       */
+  int32_t ret;
+
+  if ((Instance >= USBPD_PWR_INSTANCES_NBR) || (NULL == pCurrent))
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    *pCurrent = 0;
+    ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSGetCurrent */
+}
+
+/**
+  * @brief  Initialize VCONN sourcing.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  CCPinId Type-C CC pin identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_CC1
+  *         @arg @ref USBPD_PWR_TYPE_C_CC2
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VCONNInit(uint32_t Instance,
+                                uint32_t CCPinId)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VCONNInit */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VCONNInit */
+}
+
+/**
+  * @brief  Un-Initialize VCONN sourcing.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  CCPinId Type-C CC pin identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_CC1
+  *         @arg @ref USBPD_PWR_TYPE_C_CC2
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VCONNDeInit(uint32_t Instance,
+                                  uint32_t CCPinId)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VCONNDeInit */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VCONNDeInit */
+}
+
+/**
+  * @brief  Enable VCONN sourcing.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  CCPinId Type-C CC pin identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_CC1
+  *         @arg @ref USBPD_PWR_TYPE_C_CC2
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VCONNOn(uint32_t Instance,
+                              uint32_t CCPinId)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VCONNOn */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VCONNOn */
+}
+
+/**
+  * @brief  Disable VCONN sourcing.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  CCPinId CC pin identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_CC1
+  *         @arg @ref USBPD_PWR_TYPE_C_CC2
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VCONNOff(uint32_t Instance,
+                               uint32_t CCPinId)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VCONNOff */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VCONNOff */
+}
+
+/**
+  * @brief  Get actual VCONN status.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  CCPinId Type-C CC pin identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_CC1
+  *         @arg @ref USBPD_PWR_TYPE_C_CC2
+  * @param  pState VCONN status (1: On, 0: Off)
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VCONNIsOn(uint32_t Instance,
+                                uint32_t CCPinId, uint8_t *pState)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VCONNIsOn */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  *pState = 0u;
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VCONNIsOn */
+}
+
+/**
+  * @brief  Set the VBUS disconnection voltage threshold.
+  * @note   Callback function registered through BSP_USBPD_PWR_RegisterVBUSDetectCallback
+  *         function call is invoked when VBUS falls below programmed threshold.
+  * @note   By default VBUS disconnection threshold is set to 3.3V
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  VoltageThreshold VBUS disconnection voltage threshold (in mV)
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_SetVBUSDisconnectionThreshold(uint32_t Instance,
+                                                    uint32_t VoltageThreshold)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_SetVBUSDisconnectionThreshold */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_SetVBUSDisconnectionThreshold */
+}
+
+/**
+  * @brief  Register USB Type-C Current callback function.
+  * @note   Callback function invoked when VBUS rises above 4V (VBUS present) or
+  *         when VBUS falls below programmed threshold (VBUS absent).
+  * @note   Callback function is un-registered when callback function pointer
+  *         argument is NULL.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  pfnVBUSDetectCallback callback function pointer
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_RegisterVBUSDetectCallback(uint32_t  Instance,
+                                                 USBPD_PWR_VBUSDetectCallbackFunc *pfnVBUSDetectCallback)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_RegisterVBUSDetectCallback */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_RegisterVBUSDetectCallback */
+}
+
+/**
+  * @brief  Get actual VBUS status.
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  pState VBUS status (1: On, 0: Off)
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VBUSIsOn(uint32_t Instance, uint8_t *pState)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VBUSIsOn */
+  /* Check if instance is valid       */
+  int32_t ret;
+  uint8_t state = 0U;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_VBUSIsOn");
+  }
+  *pState = state;
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VBUSIsOn */
+}
+
+/**
+  * @brief  Set state of VCC (specific functions)
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @param  State VCC state
+  * @retval BSP status
+  */
+__weak int32_t BSP_USBPD_PWR_VCCSetState(uint32_t Instance, uint32_t State)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_VCCSetState */
+  /* Check if instance is valid       */
+  int32_t ret = BSP_ERROR_NONE;
+
+  if (Instance >= USBPD_PWR_INSTANCES_NBR)
+  {
+    ret = BSP_ERROR_WRONG_PARAM;
+  }
+  else
+  {
+    ret = BSP_ERROR_FEATURE_NOT_SUPPORTED;
+    PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_VCCSetState");
+  }
+  return ret;
+  /* USER CODE END BSP_USBPD_PWR_VCCSetState */
+}
+
+/**
+  * @brief  USBPD PWR callback used to notify a asynchronous PWR event.
+  *         (This callback caould be called fromp an IT routine, associated to
+  *         any PWR related event detection mechanism)
+  * @param  Instance Type-C port identifier
+  *         This parameter can be take one of the following values:
+  *         @arg @ref USBPD_PWR_TYPE_C_PORT_1
+  * @retval None
+  */
+__weak void BSP_USBPD_PWR_EventCallback(uint32_t Instance)
+{
+  /* USER CODE BEGIN BSP_USBPD_PWR_EventCallback */
+  PWR_DEBUG_TRACE(Instance, "ADVICE: Update BSP_USBPD_PWR_EventCallback");
+  /* USER CODE END BSP_USBPD_PWR_EventCallback */
+}
+
+/**
+  * @}
+  */
+
+/** @addtogroup POWER_Private_Functions
+  * @{
+  */
+
+/* USER CODE BEGIN POWER_Private_Functions */
+
+/* USER CODE END POWER_Private_Functions */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
Index: /trunk/fw_g473rct/USBPD/Target/usbpd_pwr_user.h
===================================================================
--- /trunk/fw_g473rct/USBPD/Target/usbpd_pwr_user.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/Target/usbpd_pwr_user.h	(revision 59)
@@ -0,0 +1,269 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_pwr_user.h
+  * @author  MCD Application Team
+  * @brief   Header file for usbpd_pwr_user.c file
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+/* Define to prevent recursive inclusion -------------------------------------*/
+#ifndef USBPD_PWR_USER_H_
+#define USBPD_PWR_USER_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "stm32g4xx.h"
+
+/** @addtogroup BSP
+  * @{
+  */
+
+/** @addtogroup POWER
+  * @{
+  */
+
+/** @defgroup POWER_Exported_Types Exported Types
+  * @{
+  */
+
+/**
+  * @brief  Power role
+  */
+typedef enum
+{
+  POWER_ROLE_SOURCE = 0,
+  POWER_ROLE_SINK,
+  POWER_ROLE_DUAL
+} USBPD_PWR_PowerRoleTypeDef;
+
+/**
+  * @brief  Voltage control mode
+  */
+typedef enum
+{
+  DCDC_CTRL_MODE_UNKNOWN = 0,
+  DCDC_CTRL_MODE_GPIO,
+  DCDC_CTRL_MODE_PWM,
+} USBPD_PWR_DCDCCtrlModeTypeDef;
+
+/**
+  * @brief  Low Power Mode of TypeC ports
+  */
+typedef enum
+{
+  USBPD_PWR_MODE_OFF = 0,
+  USBPD_PWR_MODE_HIBERNATE,
+  USBPD_PWR_MODE_LOWPOWER,
+  USBPD_PWR_MODE_NORMAL
+} USBPD_PWR_PowerModeTypeDef;
+
+/**
+  * @brief  VBUS connection status
+  */
+typedef enum
+{
+  VBUS_CONNECTED = 0,
+  VBUS_NOT_CONNECTED
+} USBPD_PWR_VBUSConnectionStatusTypeDef;
+
+/**
+  * @brief VBUS Detection Callback
+  */
+typedef void USBPD_PWR_VBUSDetectCallbackFunc(uint32_t Instance,
+                                              USBPD_PWR_VBUSConnectionStatusTypeDef VBUSConnectionStatus);
+
+/**
+  * @}
+  */
+
+/** @defgroup POWER_Exported_Constants Exported Constants
+  * @{
+  */
+/* Common Error codes */
+#define BSP_ERROR_NONE                         0
+#define BSP_ERROR_NO_INIT                     -1
+#define BSP_ERROR_WRONG_PARAM                 -2
+#define BSP_ERROR_BUSY                        -3
+#define BSP_ERROR_PERIPH_FAILURE              -4
+#define BSP_ERROR_COMPONENT_FAILURE           -5
+#define BSP_ERROR_UNKNOWN_FAILURE             -6
+#define BSP_ERROR_UNKNOWN_COMPONENT           -7
+#define BSP_ERROR_BUS_FAILURE                 -8
+#define BSP_ERROR_CLOCK_FAILURE               -9
+#define BSP_ERROR_MSP_FAILURE                 -10
+#define BSP_ERROR_FEATURE_NOT_SUPPORTED       -11
+
+/**
+  * @brief  Number of TypeC ports
+  */
+#define USBPD_PWR_INSTANCES_NBR           (1U)
+
+/**
+  * @brief  Type-C port identifier
+  */
+#define USBPD_PWR_TYPE_C_PORT_1           (0U)
+
+/**
+  * @brief  CC pin identifier
+  */
+#define USBPD_PWR_TYPE_C_CC1              (1U)
+#define USBPD_PWR_TYPE_C_CC2              (2U)
+
+/**
+  * @brief  VBUS disconnection threshold values (in mV)
+  */
+#define USBPD_PWR_HIGH_VBUS_THRESHOLD     (2800U)
+#define USBPD_PWR_LOW_VBUS_THRESHOLD      (750U)
+#define USBPD_PWR_VBUS_THRESHOLD_5V       (2150U)
+#define USBPD_PWR_VBUS_THRESHOLD_9V       (7000U)
+#define USBPD_PWR_VBUS_THRESHOLD_15V      (12500U)
+#define USBPD_PWR_VBUS_THRESHOLD_20V      (17000U)
+#define USBPD_PWR_VBUS_THRESHOLD_APDO     (2150U)
+
+/**
+  * @brief  VBUS discharge parameters
+  */
+#define USBPD_PWR_DISCHARGE_MARGIN        (500U)
+#define USBPD_PWR_DISCHARGE_TIME          (6U)
+
+/**
+  * @brief  Calibration settings
+  */
+#define USBPD_PWR_DCDC_PRECISION          (40U)     /* DCDC output precision set to 40mV (Noise)*/
+#define USBPD_PWR_CALIBRATION_ENABLED     (1U)
+#define USBPD_PWR_CALIBRATION_DISABLED    (0U)
+
+/**
+  * @brief  Standard VBUS voltage levels
+  */
+#define USBPD_PWR_VBUS_5V                 5000U
+#define USBPD_PWR_VBUS_9V                 9000U
+#define USBPD_PWR_VBUS_15V                15000U
+
+/**
+  * @brief  power timeout
+  */
+#define USBPD_PWR_TIMEOUT_PDO             250U         /* Timeout for PDO to PDO or PDO to APDO at 250ms*/
+#define USBPD_PWR_TIMEOUT_APDO            25U          /* Timeout for APDO to APDO at 25ms*/
+
+/**
+  * @brief  Invalid value set during issue with voltage setting
+  */
+#define USBPD_PWR_INVALID_VALUE           0xFFFFFFFFU
+
+/**
+  * @}
+  */
+
+/** @defgroup POWER_Exported_Functions Exported Functions
+  * @{
+  */
+/* Common functions */
+int32_t BSP_USBPD_PWR_Init(uint32_t Instance);
+
+int32_t BSP_USBPD_PWR_Deinit(uint32_t Instance);
+
+int32_t BSP_USBPD_PWR_SetRole(uint32_t Instance, USBPD_PWR_PowerRoleTypeDef Role);
+
+int32_t BSP_USBPD_PWR_SetPowerMode(uint32_t Instance, USBPD_PWR_PowerModeTypeDef PwrMode);
+
+int32_t BSP_USBPD_PWR_GetPowerMode(uint32_t Instance, USBPD_PWR_PowerModeTypeDef *PwrMode);
+
+int32_t BSP_USBPD_PWR_VBUSInit(uint32_t Instance);
+
+int32_t BSP_USBPD_PWR_VBUSDeInit(uint32_t Instance);
+
+int32_t BSP_USBPD_PWR_VBUSOn(uint32_t Instance);
+
+int32_t BSP_USBPD_PWR_VBUSOff(uint32_t Instance);
+
+int32_t BSP_USBPD_PWR_VBUSSetVoltage_Fixed(uint32_t Instance,
+                                           uint32_t VbusTargetInmv,
+                                           uint32_t OperatingCurrent,
+                                           uint32_t MaxOperatingCurrent);
+
+int32_t BSP_USBPD_PWR_VBUSSetVoltage_Variable(uint32_t Instance,
+                                              uint32_t VbusTargetMaxInmv,
+                                              uint32_t VbusTargetMinInmv,
+                                              uint32_t OperatingCurrent,
+                                              uint32_t MaxOperatingCurrent);
+
+int32_t BSP_USBPD_PWR_VBUSSetVoltage_Battery(uint32_t Instance,
+                                             uint32_t VbusTargetMin,
+                                             uint32_t VbusTargetMax,
+                                             uint32_t OperatingPower,
+                                             uint32_t MaxOperatingPower);
+
+int32_t BSP_USBPD_PWR_VBUSSetVoltage_APDO(uint32_t Instance,
+                                          uint32_t VbusTargetInmv,
+                                          uint32_t OperatingCurrent,
+                                          int32_t Delta);
+
+int32_t BSP_USBPD_PWR_VBUSGetVoltage(uint32_t Instance, uint32_t *pVoltage);
+
+int32_t BSP_USBPD_PWR_VBUSGetCurrent(uint32_t Instance, int32_t *pCurrent);
+
+int32_t BSP_USBPD_PWR_VCONNInit(uint32_t Instance,
+                                uint32_t CCPinId);
+
+int32_t BSP_USBPD_PWR_VCONNDeInit(uint32_t Instance,
+                                  uint32_t CCPinId);
+
+int32_t BSP_USBPD_PWR_VCONNOn(uint32_t Instance,
+                              uint32_t CCPinId);
+
+int32_t BSP_USBPD_PWR_VCONNOff(uint32_t Instance,
+                               uint32_t CCPinId);
+
+int32_t BSP_USBPD_PWR_SetVBUSDisconnectionThreshold(uint32_t Instance,
+                                                    uint32_t VoltageThreshold);
+
+int32_t BSP_USBPD_PWR_RegisterVBUSDetectCallback(uint32_t Instance,
+                                                 USBPD_PWR_VBUSDetectCallbackFunc *pfnVBUSDetectCallback);
+
+int32_t BSP_USBPD_PWR_VBUSIsOn(uint32_t Instance, uint8_t *pState);
+
+int32_t BSP_USBPD_PWR_VCONNIsOn(uint32_t Instance,
+                                uint32_t CCPinId, uint8_t *pState);
+
+int32_t BSP_USBPD_PWR_VCCSetState(uint32_t Instance, uint32_t State);
+
+void    BSP_USBPD_PWR_EventCallback(uint32_t Instance);
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* USBPD_PWR_USER_H_ */
+
Index: /trunk/fw_g473rct/USBPD/Target/usbpd_vdm_user.c
===================================================================
--- /trunk/fw_g473rct/USBPD/Target/usbpd_vdm_user.c	(revision 59)
+++ /trunk/fw_g473rct/USBPD/Target/usbpd_vdm_user.c	(revision 59)
@@ -0,0 +1,488 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_vdm_user.c
+  * @author  MCD Application Team
+  * @brief   USBPD provider demo file
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "usbpd_core.h"
+#include "usbpd_dpm_conf.h"
+#include "usbpd_vdm_user.h"
+#include "usbpd_dpm_user.h"
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/** @addtogroup STM32_USBPD_APPLICATION
+  * @{
+  */
+
+/** @addtogroup STM32_USBPD_APPLICATION_VDM_USER
+  * @{
+  */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN Private_define */
+
+/* USER CODE END Private_define */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN Private_typedef */
+
+/* USER CODE END Private_typedef */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN Private_macro */
+
+/* USER CODE END Private_macro */
+
+/* Private function prototypes -----------------------------------------------*/
+static USBPD_StatusTypeDef USBPD_VDM_DiscoverIdentity(uint8_t PortNum, USBPD_DiscoveryIdentity_TypeDef *pIdentity);
+static USBPD_StatusTypeDef USBPD_VDM_DiscoverSVIDs(uint8_t PortNum, uint16_t **p_SVID_Info, uint8_t *nb);
+static USBPD_StatusTypeDef USBPD_VDM_DiscoverModes(uint8_t PortNum, uint16_t SVID, uint32_t **p_ModeInfo, uint8_t *nbMode);
+static USBPD_StatusTypeDef USBPD_VDM_ModeEnter(uint8_t PortNum, uint16_t SVID, uint32_t ModeIndex);
+static USBPD_StatusTypeDef USBPD_VDM_ModeExit(uint8_t PortNum, uint16_t SVID, uint32_t ModeIndex);
+static void USBPD_VDM_SendAttention(uint8_t PortNum, uint8_t *NbData, uint32_t *VDO);
+static void USBPD_VDM_ReceiveAttention(uint8_t PortNum, uint8_t NbData, uint32_t VDO);
+static USBPD_StatusTypeDef USBPD_VDM_ReceiveSpecific(uint8_t PortNum, USBPD_VDM_Command_Typedef VDMCommand, uint8_t *NbData, uint32_t *VDO);
+static void USBPD_VDM_InformIdentity(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, USBPD_DiscoveryIdentity_TypeDef *pIdentity);
+static void USBPD_VDM_InformSVID(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, USBPD_SVIDInfo_TypeDef *pListSVID);
+static void USBPD_VDM_InformMode(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, USBPD_ModeInfo_TypeDef *pModesInfo);
+static void USBPD_VDM_InformModeEnter(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, uint16_t SVID, uint32_t ModeIndex);
+static void USBPD_VDM_InformModeExit(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, uint16_t SVID, uint32_t ModeIndex);
+static void USBPD_VDM_InformSpecific(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_Command_Typedef VDMCommand, uint8_t *NbData, uint32_t *VDO);
+static void USBPD_VDM_SendSpecific(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_Command_Typedef VDMCommand, uint8_t *NbData, uint32_t *VDO);
+static void USBPD_VDM_SendUVDM(uint8_t PortNum, USBPD_UVDMHeader_TypeDef *pUVDM_Header, uint8_t *pNbData, uint32_t *pVDO);
+static USBPD_StatusTypeDef USBPD_VDM_ReceiveUVDM(uint8_t PortNum, USBPD_UVDMHeader_TypeDef UVDM_Header, uint8_t *pNbData, uint32_t *pVDO);
+
+/* USER CODE BEGIN Private_prototypes */
+
+/* USER CODE END Private_prototypes */
+
+/* Private variables ---------------------------------------------------------*/
+USBPD_VDM_SettingsTypeDef DPM_VDM_Settings[USBPD_PORT_COUNT] =
+{
+  {
+    .VDM_XID_SOP                = USBPD_XID,    /*!< A decimal number assigned by USB-IF before certification */
+    .VDM_USB_VID_SOP            = USBPD_VID,    /*!< A decimal number assigned by USB-IF before certification */
+    .VDM_PID_SOP                = USBPD_PID,    /*!< A unique number assigned by the Vendor ID holder identifying the product. */
+    .VDM_ModalOperation         = MODAL_OPERATION_NONSUPP, /*!< Product support Modes based on @ref USBPD_ModalOp_TypeDef */
+    .VDM_bcdDevice_SOP          = 0xAAAA,        /*!< A unique number assigned by the Vendor ID holder containing identity information relevant to the release version of the product. */
+    .VDM_USBHostSupport         = USB_NOTCAPABLE, /*!< Indicates whether the UUT is capable of enumerating USB Host */
+    .VDM_USBDeviceSupport       = USB_NOTCAPABLE, /*!< Indicates whether the UUT is capable of enumerating USB Devices */
+    .VDM_ProductTypeUFPorCP     = PRODUCT_TYPE_UNDEFINED, /*!< Product type UFP or CablePlug of the UUT based on @ref USBPD_ProductType_TypeDef */
+  }
+};
+
+/* USER CODE BEGIN Private_variables */
+const USBPD_VDM_Callbacks vdmCallbacks =
+{
+  USBPD_VDM_DiscoverIdentity,
+  USBPD_VDM_DiscoverSVIDs,
+  USBPD_VDM_DiscoverModes,
+  USBPD_VDM_ModeEnter,
+  USBPD_VDM_ModeExit,
+  USBPD_VDM_InformIdentity,
+  USBPD_VDM_InformSVID,
+  USBPD_VDM_InformMode,
+  USBPD_VDM_InformModeEnter,
+  USBPD_VDM_InformModeExit,
+  USBPD_VDM_SendAttention,
+  USBPD_VDM_ReceiveAttention,
+  USBPD_VDM_SendSpecific,
+  USBPD_VDM_ReceiveSpecific,
+  USBPD_VDM_InformSpecific,
+  USBPD_VDM_SendUVDM,
+  USBPD_VDM_ReceiveUVDM,
+};
+/* USER CODE END Private_variables */
+
+/* Private functions ---------------------------------------------------------*/
+/**
+  * @brief  VDM Discovery identity callback
+  * @note   Function is called to get Discovery identity information linked to the device and answer
+  *         to SVDM Discovery identity init message sent by port partner
+  * @param  PortNum current port number
+  * @param  pIdentity Pointer on @ref USBPD_DiscoveryIdentity_TypeDef structure
+  * @retval USBPD status: @ref USBPD_ACK or @ref USBPD_BUSY
+  */
+static USBPD_StatusTypeDef USBPD_VDM_DiscoverIdentity(uint8_t PortNum, USBPD_DiscoveryIdentity_TypeDef *pIdentity)
+{
+/* USER CODE BEGIN USBPD_VDM_DiscoverIdentity */
+  return USBPD_NAK;
+/* USER CODE END USBPD_VDM_DiscoverIdentity */
+}
+
+/**
+  * @brief  VDM Discover SVID callback
+  * @note   Function is called to retrieve SVID supported by device and answer
+  *         to SVDM Discovery SVID init message sent by port partner
+  * @param  PortNum        current port number
+  * @param  p_SVID_Info Pointer on @ref USBPD_SVIDInfo_TypeDef structure
+  * @param  pNbSVID     Pointer on number of SVID
+  * @retval USBPD status  @ref USBPD_BUSY or @ref USBPD_ACK or @ref USBPD_NAK
+  */
+static USBPD_StatusTypeDef USBPD_VDM_DiscoverSVIDs(uint8_t PortNum, uint16_t **p_SVID_Info, uint8_t *pNbSVID)
+{
+/* USER CODE BEGIN USBPD_VDM_DiscoverSVIDs */
+  return USBPD_NAK;
+/* USER CODE END USBPD_VDM_DiscoverSVIDs */
+}
+
+/**
+  * @brief  VDM Discover Mode callback (report all the modes supported by SVID)
+  * @note   Function is called to report all the modes supported by selected SVID and answer
+  *         to SVDM Discovery Mode init message sent by port partner
+  * @param  PortNum current port number
+  * @param  SVID         SVID value
+  * @param  p_ModeTab    Pointer on the mode value
+  * @param  NumberOfMode Number of mode available
+  * @retval USBPD status
+  */
+static USBPD_StatusTypeDef USBPD_VDM_DiscoverModes(uint8_t PortNum, uint16_t SVID, uint32_t **p_ModeTab, uint8_t *NumberOfMode)
+{
+/* USER CODE BEGIN USBPD_VDM_DiscoverModes */
+  return USBPD_NAK;
+/* USER CODE END USBPD_VDM_DiscoverModes */
+}
+
+/**
+  * @brief  VDM Mode enter callback
+  * @note   Function is called to check if device can enter in the mode received for the selected SVID in the
+  *         SVDM enter mode init message sent by port partner
+  * @param  PortNum current port number
+  * @param  SVID      SVID value
+  * @param  ModeIndex Index of the mode to be entered
+  * @retval USBPD status @ref USBPD_ACK/@ref USBPD_NAK
+  */
+static USBPD_StatusTypeDef USBPD_VDM_ModeEnter(uint8_t PortNum, uint16_t SVID, uint32_t ModeIndex)
+{
+/* USER CODE BEGIN USBPD_VDM_ModeEnter */
+  return USBPD_NAK;
+/* USER CODE END USBPD_VDM_ModeEnter */
+}
+
+/**
+  * @brief  VDM Mode exit callback
+  * @note   Function is called to check if device can exit from the mode received for the selected SVID in the
+  *         SVDM exit mode init message sent by port partner
+  * @param  PortNum current port number
+  * @param  SVID      SVID value
+  * @param  ModeIndex Index of the mode to be exited
+  * @retval USBPD status @ref USBPD_ACK/@ref USBPD_NAK
+  */
+static USBPD_StatusTypeDef USBPD_VDM_ModeExit(uint8_t PortNum, uint16_t SVID, uint32_t ModeIndex)
+{
+/* USER CODE BEGIN USBPD_VDM_ModeExit */
+  return USBPD_NAK;
+/* USER CODE END USBPD_VDM_ModeExit */
+}
+
+/**
+  * @brief  Send VDM Attention message callback
+  * @note   Function is called when device wants to send a SVDM attention message to port partner
+  *         (for instance DP status can be filled through this function)
+  * @param  PortNum    current port number
+  * @param  pNbData    Pointer of number of VDO to send
+  * @param  pVDO       Pointer of VDO to send
+  * @retval None
+  */
+static void USBPD_VDM_SendAttention(uint8_t PortNum, uint8_t *pNbData, uint32_t *pVDO)
+{
+/* USER CODE BEGIN USBPD_VDM_SendAttention */
+
+/* USER CODE END USBPD_VDM_SendAttention */
+}
+
+/**
+  * @brief  Receive VDM Attention callback
+  * @note   Function is called when a SVDM attention init message has been received from port partner
+  *         (for instance, save DP status data through this function)
+  * @param  PortNum   current port number
+  * @param  NbData    Number of received VDO
+  * @param  VDO       Received VDO
+  * @retval None
+  */
+static void USBPD_VDM_ReceiveAttention(uint8_t PortNum, uint8_t NbData, uint32_t VDO)
+{
+/* USER CODE BEGIN USBPD_VDM_ReceiveAttention */
+
+/* USER CODE END USBPD_VDM_ReceiveAttention */
+}
+
+/**
+  * @brief  VDM Receive Specific message callback
+  * @note   Function is called to answer to a SVDM specific init message received by port partner.
+  *         (for instance, retrieve DP status or DP configure data through this function)
+  * @param  PortNum     Current port number
+  * @param  VDMCommand  VDM command based on @ref USBPD_VDM_Command_Typedef
+  * @param  pNbData     Pointer of number of received VDO and used for the answer
+  * @param  pVDO        Pointer of received VDO and use for the answer
+  * @retval USBPD Status
+  */
+static USBPD_StatusTypeDef USBPD_VDM_ReceiveSpecific(uint8_t PortNum, USBPD_VDM_Command_Typedef VDMCommand, uint8_t *pNbData, uint32_t *pVDO)
+{
+/* USER CODE BEGIN USBPD_VDM_ReceiveSpecific */
+  return USBPD_NAK;
+/* USER CODE END USBPD_VDM_ReceiveSpecific */
+}
+
+/**
+  * @brief  Inform identity callback
+  * @note   Function is called to save Identity information received in Discovery identity from port partner
+            (answer to SVDM discovery identity sent by device)
+  * @param  PortNum       current port number
+  * @param  SOPType       SOP type
+  * @param  CommandStatus Command status based on @ref USBPD_VDM_CommandType_Typedef
+  * @param  pIdentity     Pointer on the discovery identity information based on @ref USBPD_DiscoveryIdentity_TypeDef
+  * @retval None
+*/
+static void USBPD_VDM_InformIdentity(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, USBPD_DiscoveryIdentity_TypeDef *pIdentity)
+{
+/* USER CODE BEGIN USBPD_VDM_InformIdentity */
+  switch(CommandStatus)
+  {
+  case SVDM_RESPONDER_ACK :
+    break;
+  case SVDM_RESPONDER_NAK :
+    break;
+  case SVDM_RESPONDER_BUSY :
+    break;
+  default :
+    break;
+  }
+/* USER CODE END USBPD_VDM_InformIdentity */
+}
+
+/**
+  * @brief  Inform SVID callback
+  * @note   Function is called to save list of SVID received in Discovery SVID from port partner
+            (answer to SVDM discovery SVID sent by device)
+  * @param  PortNum       current port number
+  * @param  SOPType       SOP type
+  * @param  CommandStatus Command status based on @ref USBPD_VDM_CommandType_Typedef
+  * @param  pListSVID     Pointer of list of SVID based on @ref USBPD_SVIDInfo_TypeDef
+  * @retval None
+  */
+static void USBPD_VDM_InformSVID(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, USBPD_SVIDInfo_TypeDef *pListSVID)
+{
+/* USER CODE BEGIN USBPD_VDM_InformSVID */
+  switch(CommandStatus)
+  {
+  case SVDM_RESPONDER_ACK :
+    break;
+  case SVDM_RESPONDER_NAK :
+    break;
+  case SVDM_RESPONDER_BUSY :
+    break;
+  default :
+      break;
+  }
+/* USER CODE END USBPD_VDM_InformSVID */
+}
+
+/**
+  * @brief  Inform Mode callback ( received in Discovery Modes ACK)
+  * @note   Function is called to save list of modes linked to SVID received in Discovery mode from port partner
+            (answer to SVDM discovery mode sent by device)
+  * @param  PortNum         current port number
+  * @param  SOPType         SOP type
+  * @param  CommandStatus   Command status based on @ref USBPD_VDM_CommandType_Typedef
+  * @param  pModesInfo      Pointer of Modes info based on @ref USBPD_ModeInfo_TypeDef
+  * @retval None
+  */
+static void USBPD_VDM_InformMode(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, USBPD_ModeInfo_TypeDef *pModesInfo)
+{
+/* USER CODE BEGIN USBPD_VDM_InformMode */
+  switch(CommandStatus)
+  {
+  case SVDM_RESPONDER_ACK :
+    break;
+  case SVDM_RESPONDER_NAK :
+    break;
+  case SVDM_RESPONDER_BUSY :
+    break;
+  default :
+    break;
+  }
+/* USER CODE END USBPD_VDM_InformMode */
+}
+
+/**
+  * @brief  Inform Mode enter callback
+  * @note   Function is called to inform if port partner accepted or not to enter in the mode
+  *         specified in the SVDM enter mode sent by the device
+  * @param  PortNum   current port number
+  * @param  SOPType       SOP type
+  * @param  CommandStatus Command status based on @ref USBPD_VDM_CommandType_Typedef
+  * @param  SVID      SVID ID
+  * @param  ModeIndex Index of the mode to be entered
+  * @retval None
+  */
+static void USBPD_VDM_InformModeEnter(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, uint16_t SVID, uint32_t ModeIndex)
+{
+/* USER CODE BEGIN USBPD_VDM_InformModeEnter */
+  switch(CommandStatus)
+  {
+  case SVDM_RESPONDER_ACK :
+    break;
+  case SVDM_RESPONDER_NAK :
+    break;
+  case SVDM_RESPONDER_BUSY :
+    /* retry in 50ms */
+    break;
+  default :
+    break;
+  }
+/* USER CODE END USBPD_VDM_InformModeEnter */
+}
+
+/**
+  * @brief  Inform Exit enter callback
+  * @param  PortNum   current port number
+  * @param  SVID      SVID ID
+  * @param  ModeIndex Index of the mode to be entered
+  * @retval None
+  */
+static void USBPD_VDM_InformModeExit(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_CommandType_Typedef CommandStatus, uint16_t SVID, uint32_t ModeIndex)
+{
+/* USER CODE BEGIN USBPD_VDM_InformModeExit */
+  switch(CommandStatus)
+  {
+  case SVDM_RESPONDER_ACK :
+    break;
+  case SVDM_RESPONDER_NAK :
+    break;
+  case SVDM_RESPONDER_BUSY :
+    /* retry in 50ms */
+    break;
+  default :
+    break;
+  }
+/* USER CODE END USBPD_VDM_InformModeExit */
+}
+
+/**
+  * @brief  VDM Send Specific message callback
+  * @note   Function is called when device wants to send a SVDM specific init message to port partner
+  *         (for instance DP status or DP configure can be filled through this function)
+  * @param  PortNum    current port number
+  * @param  SOPType    SOP type
+  * @param  VDMCommand VDM command based on @ref USBPD_VDM_Command_Typedef
+  * @param  pNbData    Pointer of number of VDO to send
+  * @param  pVDO       Pointer of VDO to send
+  * @retval None
+  */
+static void USBPD_VDM_SendSpecific(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_Command_Typedef VDMCommand, uint8_t *pNbData, uint32_t *pVDO)
+{
+/* USER CODE BEGIN USBPD_VDM_SendSpecific */
+
+/* USER CODE END USBPD_VDM_SendSpecific */
+}
+
+/**
+  * @brief  VDM Specific message callback to inform user of reception of VDM specific message
+  * @note   Function is called when answer from SVDM specific init message has been received by the device
+  *         (for instance, save DP status and DP configure data through this function)
+  * @param  PortNum    current port number
+  * @param  SOPType    SOP type
+  * @param  VDMCommand VDM command based on @ref USBPD_VDM_Command_Typedef
+  * @param  pNbData    Pointer of number of received VDO
+  * @param  pVDO       Pointer of received VDO
+  * @retval None
+  */
+static void USBPD_VDM_InformSpecific(uint8_t PortNum, USBPD_SOPType_TypeDef SOPType, USBPD_VDM_Command_Typedef VDMCommand, uint8_t *pNbData, uint32_t *pVDO)
+{
+/* USER CODE BEGIN USBPD_VDM_InformSpecific */
+
+/* USER CODE END USBPD_VDM_InformSpecific */
+}
+
+/**
+  * @brief  VDM Send Unstructured message callback
+  * @note   Aim of this function is to fill the UVDM message which contains 1 VDM Header + 6 VDO
+  *         This callback will be called when user requests to send a UVDM message thanks
+  *         to USBPD_DPM_RequestUVDMMessage function
+  * @param  PortNum       current port number
+  * @param  pUVDM_Header  Pointer on UVDM header based on @ref USBPD_UVDMHeader_TypeDef
+  * @param  pNbData       Pointer of number of VDO to send (max size must be equal to 6)
+  * @param  pVDO          Pointer of VDO to send (up to 6 x uint32_t)
+  * @retval None
+  */
+static void USBPD_VDM_SendUVDM(uint8_t PortNum, USBPD_UVDMHeader_TypeDef *pUVDM_Header, uint8_t *pNbData, uint32_t *pVDO)
+{
+/* USER CODE BEGIN USBPD_VDM_SendUVDM */
+
+/* USER CODE END USBPD_VDM_SendUVDM */
+}
+
+/**
+  * @brief  Unstructured VDM  message callback to inform user of reception of UVDM message
+  * @param  PortNum    current port number
+  * @param  UVDM_Header UVDM header based on @ref USBPD_UVDMHeader_TypeDef
+  * @param  pNbData    Pointer of number of received VDO
+  * @param  pVDO       Pointer of received VDO
+  * @retval USBPD Status
+  */
+static USBPD_StatusTypeDef USBPD_VDM_ReceiveUVDM(uint8_t PortNum, USBPD_UVDMHeader_TypeDef UVDM_Header, uint8_t *pNbData, uint32_t *pVDO)
+{
+/* USER CODE BEGIN USBPD_VDM_ReceiveUVDM */
+  return USBPD_ERROR;
+/* USER CODE END USBPD_VDM_ReceiveUVDM */
+}
+
+/* USER CODE BEGIN Private_functions */
+
+/* USER CODE END Private_functions */
+
+/* Exported functions ---------------------------------------------------------*/
+/**
+  * @brief  VDM Initialization function
+  * @param  PortNum     Index of current used port
+  * @retval status
+  */
+USBPD_StatusTypeDef USBPD_VDM_UserInit(uint8_t PortNum)
+{
+/* USER CODE BEGIN USBPD_VDM_UserInit */
+    return USBPD_OK;
+/* USER CODE END USBPD_VDM_UserInit */
+}
+
+/**
+  * @brief  VDM Reset function
+  * @param  PortNum     Index of current used port
+  * @retval status
+  */
+void USBPD_VDM_UserReset(uint8_t PortNum)
+{
+/* USER CODE BEGIN USBPD_VDM_UserReset */
+
+/* USER CODE END USBPD_VDM_UserReset */
+}
+
+/* USER CODE BEGIN Exported_functions */
+
+/* USER CODE END Exported_functions */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
Index: /trunk/fw_g473rct/USBPD/Target/usbpd_vdm_user.h
===================================================================
--- /trunk/fw_g473rct/USBPD/Target/usbpd_vdm_user.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/Target/usbpd_vdm_user.h	(revision 59)
@@ -0,0 +1,78 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_vdm_user.h
+  * @author  MCD Application Team
+  * @brief   Header file for usbpd_vdm_user.c file
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+#ifndef __USBPD_VDM_USER_H_
+#define __USBPD_VDM_USER_H_
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+/** @addtogroup STM32_USBPD_APPLICATION
+  * @{
+  */
+
+/** @addtogroup STM32_USBPD_APPLICATION_VDM_USER
+  * @{
+  */
+
+/* Exported typedef ----------------------------------------------------------*/
+typedef struct
+{
+  uint32_t VDM_XID_SOP                      :32; /*!< A decimal number assigned by USB-IF before certification */
+  uint32_t VDM_USB_VID_SOP                  :16; /*!< A unique 16-bit number, assigned to the Vendor by USB-IF. */
+  uint32_t VDM_PID_SOP                      :16; /*!< A unique number assigned by the Vendor ID holder identifying the product. */
+  uint32_t VDM_bcdDevice_SOP                :16; /*!< A unique number assigned by the Vendor ID holder containing identity information relevant to the release version of the product. */
+  USBPD_ModalOp_TypeDef VDM_ModalOperation  : 1; /*!< Product support Modes based on @ref USBPD_ModalOp_TypeDef */
+  USBPD_USBCapa_TypeDef VDM_USBHostSupport  : 1; /*!< Indicates whether the UUT is capable of enumerating USB Host */
+  USBPD_USBCapa_TypeDef VDM_USBDeviceSupport: 1; /*!< Indicates whether the UUT is capable of enumerating USB Devices */
+  USBPD_ProductType_TypeDef VDM_ProductTypeUFPorCP : 3; /*!< Product type UFP or CablePlug of the UUT based on @ref USBPD_ProductType_TypeDef */
+  USBPD_ProductType_TypeDef VDM_ProductTypeDFP : 3; /*!< Product type DFP of the UUT based on @ref USBPD_ProductType_TypeDef */
+  uint32_t Reserved3                        : 7; /*!< Reserved bits */
+} USBPD_VDM_SettingsTypeDef;
+/* USER CODE BEGIN typedef */
+
+/* USER CODE END typedef */
+
+/* Exported define -----------------------------------------------------------*/
+/* Exported constants --------------------------------------------------------*/
+/* Exported macro ------------------------------------------------------------*/
+/* Exported variables --------------------------------------------------------*/
+/* Exported functions --------------------------------------------------------*/
+USBPD_StatusTypeDef USBPD_VDM_UserInit(uint8_t PortNum);
+void                USBPD_VDM_UserReset(uint8_t PortNum);
+/* USER CODE BEGIN Exported functions */
+/* USER CODE END Exported functions */
+
+/**
+  * @}
+  */
+
+/**
+  * @}
+  */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __USBPD_VDM_USER_H_ */
+
Index: /trunk/fw_g473rct/USBPD/usbpd_devices_conf.h
===================================================================
--- /trunk/fw_g473rct/USBPD/usbpd_devices_conf.h	(revision 59)
+++ /trunk/fw_g473rct/USBPD/usbpd_devices_conf.h	(revision 59)
@@ -0,0 +1,125 @@
+/* USER CODE BEGIN Header */
+/**
+  ******************************************************************************
+  * @file    usbpd_devices_conf.h
+  * @author  MCD Application Team
+  * @brief   This file contains the device define.
+  ******************************************************************************
+  * @attention
+  *
+  * Copyright (c) 2026 STMicroelectronics.
+  * All rights reserved.
+  *
+  * This software is licensed under terms that can be found in the LICENSE file
+  * in the root directory of this software component.
+  * If no LICENSE file comes with this software, it is provided AS-IS.
+  *
+  ******************************************************************************
+  */
+/* USER CODE END Header */
+
+/* CubeMX Generated */
+#define CUBEMX_GENERATED
+
+#ifndef USBPD_DEVICE_CONF_H
+#define USBPD_DEVICE_CONF_H
+
+#ifdef __cplusplus
+ extern "C" {
+#endif
+
+/* Includes ------------------------------------------------------------------*/
+#include "stm32g4xx_ll_bus.h"
+#include "stm32g4xx_ll_dma.h"
+#include "stm32g4xx_ll_gpio.h"
+#include "stm32g4xx_ll_rcc.h"
+#include "stm32g4xx_ll_ucpd.h"
+#include "stm32g4xx_ll_pwr.h"
+#include "stm32g4xx_ll_tim.h"
+#include "usbpd_pwr_user.h"
+#include "usbpd_pwr_if.h"
+
+/* USER CODE BEGIN Includes */
+
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* Private function prototypes -----------------------------------------------*/
+/* Private functions ---------------------------------------------------------*/
+/* Private define ------------------------------------------------------------*/
+
+/* -----------------------------------------------------------------------------
+      usbpd_hw.c
+-------------------------------------------------------------------------------*/
+
+/* defined used to configure function : BSP_USBPD_GetUSPDInstance */
+#define UCPD_INSTANCE0 UCPD1
+
+/* defined used to configure function : BSP_USBPD_Init_DMARxInstance,BSP_USBPD_DeInit_DMARxInstance */
+#define UCPDDMA_INSTANCE0_CLOCKENABLE_RX  LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_DMA1)
+
+#define UCPDDMA_INSTANCE0_DMA_RX  DMA1
+
+#define UCPDDMA_INSTANCE0_REQUEST_RX   DMA_REQUEST_UCPD1_RX
+
+#define UCPDDMA_INSTANCE0_LL_CHANNEL_RX   LL_DMA_CHANNEL_8
+
+#define UCPDDMA_INSTANCE0_CHANNEL_RX   DMA1_Channel8
+
+/* defined used to configure function : BSP_USBPD_Init_DMATxInstance, BSP_USBPD_DeInit_DMATxInstance */
+#define UCPDDMA_INSTANCE0_CLOCKENABLE_TX  LL_AHB1_GRP1_EnableClock(LL_AHB1_GRP1_PERIPH_DMA1)
+
+#define UCPDDMA_INSTANCE0_DMA_TX  DMA2
+
+#define UCPDDMA_INSTANCE0_REQUEST_TX   DMA_REQUEST_UCPD1_TX
+
+#define UCPDDMA_INSTANCE0_LL_CHANNEL_TX   LL_DMA_CHANNEL_1
+
+#define UCPDDMA_INSTANCE0_CHANNEL_TX   DMA2_Channel1
+/* defined used to configure  BSP_USBPD_SetFRSSignalling */
+#define UCPDFRS_INSTANCE0_FRSCC1
+#define UCPDFRS_INSTANCE0_FRSCC2
+
+#define UCPD_INSTANCE0_ENABLEIRQ   do{                                                                 \
+                                        NVIC_SetPriority(UCPD1_IRQn,4);                              \
+                                        NVIC_EnableIRQ(UCPD1_IRQn);                                  \
+                                    } while(0)
+
+/* -----------------------------------------------------------------------------
+      Definitions for timer service feature
+-------------------------------------------------------------------------------*/
+
+#define TIMX                           TIM1
+#define TIMX_CLK_ENABLE                LL_APB2_GRP1_EnableClock(LL_APB2_GRP1_PERIPH_TIM1)
+#define TIMX_CLK_DISABLE               LL_APB2_GRP1_DisableClock(LL_APB2_GRP1_PERIPH_TIM1)
+#define TIMX_CHANNEL_CH1               LL_TIM_CHANNEL_CH1
+#define TIMX_CHANNEL_CH2               LL_TIM_CHANNEL_CH2
+#define TIMX_CHANNEL_CH3               LL_TIM_CHANNEL_CH3
+#define TIMX_CHANNEL_CH4               LL_TIM_CHANNEL_CH4
+#define TIMX_CHANNEL1_SETEVENT         do{                                                                    \
+                                          LL_TIM_OC_SetCompareCH1(TIMX, (TimeUs + TIMX->CNT) % TIM_MAX_TIME);\
+                                          LL_TIM_ClearFlag_CC1(TIMX);                                         \
+                                       }while(0)
+#define TIMX_CHANNEL2_SETEVENT         do{                                                                    \
+                                          LL_TIM_OC_SetCompareCH2(TIMX, (TimeUs + TIMX->CNT) % TIM_MAX_TIME);\
+                                          LL_TIM_ClearFlag_CC2(TIMX);                                         \
+                                       }while(0)
+#define TIMX_CHANNEL3_SETEVENT         do{                                                                    \
+                                          LL_TIM_OC_SetCompareCH3(TIMX, (TimeUs + TIMX->CNT) % TIM_MAX_TIME);\
+                                          LL_TIM_ClearFlag_CC3(TIMX);                                         \
+                                       }while(0)
+#define TIMX_CHANNEL4_SETEVENT         do{                                                                    \
+                                          LL_TIM_OC_SetCompareCH4(TIMX, (TimeUs + TIMX->CNT) % TIM_MAX_TIME);\
+                                          LL_TIM_ClearFlag_CC4(TIMX);                                         \
+                                       }while(0)
+#define TIMX_CHANNEL1_GETFLAG          LL_TIM_IsActiveFlag_CC1
+#define TIMX_CHANNEL2_GETFLAG          LL_TIM_IsActiveFlag_CC2
+#define TIMX_CHANNEL3_GETFLAG          LL_TIM_IsActiveFlag_CC3
+#define TIMX_CHANNEL4_GETFLAG          LL_TIM_IsActiveFlag_CC4
+
+#ifdef __cplusplus
+ }
+#endif
+
+#endif /* USBPD_DEVICE_CONF_H */
+
