Associate II
March 17, 2026
Solved
USB PD SINK application with APDO
- March 17, 2026
- 2 replies
- 146 views
Hello everybody
I'm building the device with power delivery sink function. I need the 21V (PPS). I done the configuration with STM32CubeMX and wrote some code in STM32CubeIDE. Unfortunately, after about 14 s of estabilishing connection, the source send hardware reset. What is the problem? In the attached file is the trase from STM32CubeMonitor-UCPD. I use STM32CubeIDE v. 2.1.1 and STM32CubeMX v. 6.17.0.
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");
USBPD_SNKRDO_TypeDef rdo;
rdo.d32=0U;
rdo.ProgRDO.ObjectPosition=6U;
rdo.ProgRDO.OutputVoltageIn20mV=1050U; //21V
rdo.ProgRDO.OperatingCurrentIn50mAunits=60U; //3A
rdo.ProgRDO.NoUSBSuspend=USBPD_ENABLE;
rdo.ProgRDO.USBCommunicationsCapable=USBPD_ENABLE;
*PtrPowerObjectType=USBPD_CORE_PDO_TYPE_APDO;
*PtrRequestData=rdo.d32;
/* USER CODE END USBPD_DPM_SNK_EvaluateCapabilities */
}
Best regards
