Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.
/ X-CUBE-USB-PD Public archive

USB-C Power Delivery Firmware for STM32 microcontroller (ARM Cortex M0 & M4)

Notifications You must be signed in to change notification settings

st-one/X-CUBE-USB-PD

Repository files navigation

Warning ! DEPRECATED

The X-CUBE-USB-PD has been deprecated for STUSB1602. Do not use it.
The latest version of X-CUBE-USB-PD doesn't support anymore the STUSB1602. This repository contains the last version of X-CUBE-USB-PD which was still including some STUSB1602 code.

The new firmware for STUSB1602 is available in new software packages, with several fixes and enhancements:


Below is the archived version

X-CUBE-USB-PD

"X-Cube-USB-PD" is the open source Firmware for STM32Fx microcontrollers. It support USB Type-C and USB PD up to 100W.

  • The FW can be tested with the following Evaluation Kit:
    • P-NUCLEO-USB002 (based on STUSB1602 controller + STM32F0)
    • P-NUCLEO-USB001 (based on Discrete components + STM32F0)
    • STM32G071B-DISCO discovery kit (based on STM32G0)
    • STM32G081B-EVAL Evaluation board (contains 2 USB-C ports)

   (The FW sources are located in the folder: STM32CubeExpansion_USBPD_F0)

Purpose:

USB type-C (USB-C) and USB Power Delivery (USB-PD) controller based on STM32.

Work in any mode: DFP, UFP, and DRP (Dual Role Power)
Specifiation: Compliant with USB PD v2.0 & v3.0, and USB Type-C v1.2

Description:

This is the firmware to use with either :

  1. STM32 and a dedicated USB PD controller
  2. or STM32 and GPIO/ADC pins to simulate a USB Type-C + PD controller.
  • Case 1: Optimised PCB solution. No external components needed.
  • Case 2: No specific USB-PD IC is required. Everything is managed by software. Making this discrete solution a low cost USB-PD controller. Just few external component are required like resitors, capacitors, and Mosfets.

These solutions from the silicon provider (STMicroelectronics) has been certified by the official USB organisation (USB-IF: USB implementer forum). It only works on STM32 microcontroller (ARM Cortex-M based). But may be ported on other devices.

Hardware:

Several boards are available to implement and test the USB-C PD firmware.

  • Provider: STMicroelectronics

  • Development board: P-NUCLEO-USB002     (contains NUCLEO-F072RB Board + MB1303 expansion board)

    Onboard Devices:

    • Embedded Controller: STM32F072 (runs the USB-PD stack in software)

    • Analog Front End: STUSB1602 USB-PD controller (high voltage tolerant 28V)

      • Note: NUCLEO-F072RB is the Nucleo board.
        MB1303 is the Xpansion board containing STUSB1602, to connect on top of the Nucleo board.

  • Development board: P-NUCLEO-USB001     (contains NUCLEO-F072RB Board + MB1257 expansion board)

    Onboard Devices:

    • Embedded Controller: STM32F072 (runs the USB-PD stack in software)
    • Analog Front End: Discrete implementation with several external components
      • warning: STM32F0 is not 5V compatible, but 3.6V max --> needs external components.
  • Development board: STM32G071B-DISCO     (USB-C Discovery kit for STM32G071RB MCU)

    Onboard Devices:

    • Embedded Controller: STM32G071 with UCPD feature (runs the USB-PD stack in software)
    • Analog Front End: Discrete implementation (warning: STM32G0 is not 5V compatible --> needs external components).
      • warning: STM32G0 is not 5V tolerant, but 3.6V max --> needs external components.
  • Development board: STM32G081B-EVAL Evaluation board     (the daughterboard features 2 independent USB-C ports controlled)

    Onboard Devices:

    • Embedded Controller: STM32G081RBT6 with UCPD feature (runs the USB-PD stack in software)
    • Analog Front End: Discrete implementation
      • warning: STM32G0 is not 5V tolerant, but 3.6V max --> needs external components.

X Cube USB PD
STUSB1602 solution or Discrete solution STM32G0 world 1st general purpose MCU with USB-C support