HAL_PCDEx_BCD_Callback defect in L4 1.12.0 HAL
There was a change in the HAL_PCDEx_BCD_Callback() function defined in usb_device.c that, by default, results in the code not handling the PCD_BCD_DISCOVERY_COMPLETED notification.
The switch statement for processing the state changes in the new user code is wrapped in an if (hpcd->battery_charging_active){...} however battery charging is deactivated before calling HAL_PCDEx_BCD_Callback(PCD_BCD_DISCOVERY_COMPLETED), so the switch statement is never evaluated in that case.
The solution is to just remove the if() {...} guard completely. I fail to see why it was added.
