stm32g431 ucpd sink stack fail at -o2/-o3/-oFast optimization levels
I am running STM32G431 board with USBC PD feature.
CubeIDE 1.14.1
I am trying to bring up the UCPD stack.
I refer the basic guideline:
https://wiki.st.com/stm32mcu/wiki/STM32StepByStep:Getting_started_with_USB-Power_Delivery_Sink
It worked ideally.
However, if I add in my code a call "USBPD_DPM_RequestMessageRequest()", the operation gets broken.
Negotiation with Source fails, leading to power loss, and call "USBPD_DPM_RequestMessageRequest()" is not even reached.
I tried to search for the solution, but only found this, something probably related:
Is there anybody, who hit the same issue?
It is definitely source code issue. Is there a fix?
Kind regards, Ivan.
