
Software description
UM2546
16/30
UM2546 Rev 1
5 Software
description
Figure 11. STM32G0 software architecture overview
Following sections detail:
•
Application: in charge to initialize demo application, HAL, interrupt handler and launch
the main module
•
Middleware: FreeRTOS, USBPD
5.1 Demonstration
Application
The application goal is to prepare demonstration startup, by initializing all the HW/SW.
Table below provides a description of all the actions performed by the different functions in
main.c
Table 4. Main application functions description
Functions (Main.c)
Description
Main
Initialize the HAL, configure the clock and the power
MOS, depending on the door position, initialize the
responder for the STM32CubeMonitor USB Type-C PD
tool (GUI_Init), start the stack (USBPD_DPM_InitCore),
the UCPD application (USBPD_DPM_UserInit), start the
OS (USBPD_DPM_InitOS), and then start the
demonstration
SystemClock_Config
Set the right clocks for flash and RCC