cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G0B1 USB PD NO UTILITY OS infinite loop.

JBand.2
Associate II

When generating code with CubeMX for an USBPD sink application for the STM32G0B1 when no RTOS is used within the function USBPD_DPM_Run on line 340 till 363 it enters an inifinite do while loop. This happens in the usbpd_dpm_core.c file.

It is undesired as this function should be called in the main while loop and would block all other code execution.

I attached a screenshot of the specific code.

1 REPLY 1
Piranha
Chief II

That USE_STM32_UTILITY_OS option is not a preempting RTOS, but just a simple cooperative task scheduler with software timers, about which you can read in this topic.

The whole file seems to be very OS specific. So either you use ST's "sequencer" or reimplement the whole file with your scheduler and timer implementation.