项目场景:
使用STM32CubeMX新建工程报错 Error: L6218E: Undefined symbol HAL_PWREx_DisableUCPDDeadBattery (referred from stm32g4xx_hal_msp.o).
问题描述
Error: L6218E: Undefined symbol HAL_PWREx_DisableUCPDDeadBattery (referred from stm32g4xx_hal_msp.o).
解决方案:
将HAL_PWREx_DisableUCPDDeadBattery
改为HAL_PWREx_DisableUSBDeadBatteryPD
HAL_PWREx_DisableUSBDeadBatteryPD();