# STUSB1602
**Repository Path**: chrisyuevista/STUSB1602
## Basic Information
- **Project Name**: STUSB1602
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-02-15
- **Last Updated**: 2026-02-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# STUSB1602 SW drivers (USB-C Power Delivery)
Dual-role USB-PD controller for STM32, with Power up to 100W (20V@5A).
The repository contains the USB-PD software stack for STM32.
USB-C PD 3.0 analog front-end controller, managed by both I2C and SPI interfaces. It needs to run the USB-PD stack in software thanks to the STM32.
The provided USB-PD stack only works on STM32 microcontroller family.
Certified by USB-IF consortium for USB Type-C and USB Power Delivery applications (USB-C & USB PD).
Info:
----------------
* __Device:__ STUSB1602A : USB-C Power Delivery with PPS (Programmable Power Supply)
* __Manufacturer:__ STMicroelectronics
* __Typical Application:__ To communicate over the CC line of the USB-C connector, and negociate power on VBUS
* __USB power role:__ Source, Sink, or Dual-Role Power (DRP)
* __USB data role:__ independant (works with No Data, or with external USB Device / USB Host that can be USB2.0 or USB3.1)
Note: If using the USB-C connector for both Power and Data, then the Power Sink application initial data role (at cable attachment) is always UFP (Device).
Similarly, the initial data role of a Power Source application is always DFP (Host).
To change the role, it is needed to send a USB PD command: PowerRole_Swap or DataRole_Swap.
* __Features:__ software based solution with Analog front-end (STM32+STUSB1602)
* __Requirements:__ ARM Cortex-M microcontroller :
- STM32F072 (ARM Cortex-M0 core , 48 MHz) | USB Data supported: USB Device 2.0 Full-Speed (UFP)
- STM32F446 (ARM Cortex-M4 core , 180 MHz) | USB Data supported: USB OTG 2.0 High-Speed (DRD)
- STM32G474 (ARM Cortex-M4 core , 170 MHz) | USB Data supported: USB Device 2.0 Full-Speed (UFP)
- STM32L4R5 (ARM Cortex-M4 core , 120 MHz) | USB Data supported: USB OTG 2.0 Full-Speed (DRD)
* __GPIO Requirements:__ SPI (4 pins) + I2C (2 pins) + Interrupt (1 pin) :
- For 1 USB-C port : 1x SPI + 1x I2C + 1x Interrupt
- For 2 USB-C ports: 2x SPI + 1x I2C + 2x Interrupt
Note: Both I2C and SPI interfaces are mandatory. SPI is used for USB-PD messaging to CC pin, and I2C is used for chip register's configuration
* __Operating supply:__ 5V to 20V directly from Vbus of the USB-C cable.
Or a lower power (3.3V) for battery supplied applications
* __Power Consumption:__ 113uA for Sink role, 158uA for Source role
* __Package:__ QFN24 EP 4x4mm
* __Part number:__ STUSB1602AQTR (STUSB1602QTR is deprecated)
* __USB Spec:__ USB Type-C v1.2 , USB PD v2.0 & v3.0
* __USB Certification:__ Test ID = 1010032
Notes:
----------------
- STUSB1602 software library has only been developed for STM32.
In particular the SPI interface is non-standard because it is not 8-bit aligned. So it may not work with other microcontrollers.
- Technical Support: The USB-PD software stack has only been tested on STM32 with official USB-C test equipments to pass the USB certification, so it is only supported for STM32.
- STUSB1602 Linux drivers: Not available
- Optional USB-PD features
- VDM messaging: Supported
- Alternate mode: Supported
- Data Role swap: Supported
- Power Role swap: Supported
- Firmware update over CC: Supported
- USB-C TCPI (Type-C Port Controller Interface): Not supported
- USB Fast role swap: Hardware feature Not supported