Skip to content

Latest commit

 

History

History

UCSI_DRP Application Description

This application provides an example running on STM32G0 32-bit microcontroller acting as an UCSI (USB Type-CTM Connector System Software Interface) Platform Policy Manager (PPM) on the STM32MP135F-DK board. The PPM is a combination of hardware and firmware that manages the USB Type-C connectors on the platform. The STM32MP13 has a role of UCSI OS Policy Manager (OPM) to interface with the PPM, via I2C with the UCSI interface. This application also features the TCPP02-M18/TCPP03-M20 USB Type-C port protection device.

For debug purpose, TRACER_EMB utility is enabled in this application. STM32CubeMonUCPD can be used to display USB-PD traces. Tool can be found at the following link: https://www.st.com/en/development-tools/stm32cubemonucpd.html.

Note: Care must be taken when using HAL_Delay(), this function provides accurate delay (in milliseconds) based on variable incremented in SysTick ISR. This implies that if HAL_Delay() is called from a peripheral ISR process, then the SysTick interrupt must have higher priority (numerically lower) than the peripheral interrupt. Otherwise the caller ISR process will be blocked. To change the SysTick interrupt priority you have to use HAL_NVIC_SetPriority() function.

Note: The application needs to ensure that the SysTick time base is always set to 1 millisecond to have correct operation.

Keywords

stm32, stm32cube, x-cube, usb-pd, usb-c, UCSI, stm32g0

Directory contents

  • UCSI_DRP/Binary/stm32g0-ucsi.fw Application binary file
  • UCSI_DRP/Src/app_freertos.c FreeRTOS application file
  • UCSI_DRP/Src/main.c Main program
  • UCSI_DRP/Src/stm32g0xx_hal_msp.c STM32G0XX HAL MSP functions
  • UCSI_DRP/Src/stm32g0xx_it.c Interrupt handlers
  • UCSI_DRP/Src/system_stm32g0xx.c STM32G0XX system clock configuration file
  • UCSI_DRP/Src/usbpd.c Main USBPD file for initialization
  • UCSI_DRP/Src/usbpd_dpm_core.c DPM CORE layer implementation
  • UCSI_DRP/Src/usbpd_dpm_user.c DPM USER layer implementation
  • UCSI_DRP/Src/usbpd_pwr_if.c General power interface configuration
  • UCSI_DRP/Src/usbpd_pwr_user.c User power implementation
  • UCSI_DRP/Src/usbpd_ucsi_if.c UCSI HW interface implementation
  • UCSI_DRP/Src/usbpd_vdm_user.c User VDM implementation
  • UCSI_DRP/Inc/usbpd-tcpp0203_conf.h Configuration file used for TCPP0203 BSP
  • UCSI_DRP/Inc/FreeRTOSConfig.h FreeRTOS module configuration file
  • UCSI_DRP/Inc/main.h Main program header file
  • UCSI_DRP/Inc/stm32_assert.h Assert header file
  • UCSI_DRP/Inc/stm32g0xx_hal_conf.h HAL configuration file
  • UCSI_DRP/Inc/stm32g0xx_it.h Interrupt handlers header file
  • UCSI_DRP/Inc/tracer_emb_conf.h Debug trace UART settings
  • UCSI_DRP/Inc/usbpd.h USBPD application includes
  • UCSI_DRP/Inc/usbpd_devices_conf.h Device settings (Timers, DMA...)
  • UCSI_DRP/Inc/usbpd_dpm_conf.h USB-C Power Delivery application Configuration file
  • UCSI_DRP/Inc/usbpd_dpm_core.h USB-C Power Delivery core Configuration file
  • UCSI_DRP/Inc/usbpd_dpm_user.h DPM Layer header file
  • UCSI_DRP/Inc/usbpd_pdo_defs.h PDO definition central header file
  • UCSI_DRP/Inc/usbpd_pwr_if.h Defines for PDOs
  • UCSI_DRP/Inc/usbpd_pwr_user.h User power header file
  • UCSI_DRP/Inc/usbpd_ucsi_if.h USCI HW header file
  • UCSI_DRP/Inc/usbpd_vdm_user.h User VDM header file

Hardware and Software environment

  • This application runs on STM32G0XX devices.

  • This example has been tested with STMicroelectronics STM32MP135F-DK board.

How to use it?

In order to make the program work, you must do the following :

  • Open your preferred toolchain
  • Rebuild all files and load your image into target memory
  • Run the example