How to implement USB DPM, prevent hard reset
I tried following STM32 AN5418 but the EvaluateSinkCapabilities method is not getting called. I added debug prints everywhere in the code and here is what I am receiving:
1. VBusInit (this always happens)
2. DPM notification 104 (Stack init)
3. Cable detection
4. Unimplemented SetDataInfo 8 (USBPD_CORE_EXTENDED_CAPA)
5. SetDataInfo 6 (USBPD_CORE_DATATYPE_RCV_REQ_PDO
- I haven't implemented anything in this, but I had it print out what it received and it looked good (e.g. 5V 3A 9V 3A 20V 5A etc.)
6. Notification: 30 (USBPD_NOTIFY_HARDRESET_RX)
7. Hard reset callback
8. Device turns off, turns on a few seconds later and goes through this same loop
What do I need to implement to get this working? Is this just because all of my methods are unimplemented besides EvaluateSinkCapabilities and one of the cases in GetDataInfo? At what point/do I call USBPD_DPM_RequestMessageRequest?
