Embedded software implements USB-C and Power Delivery
Moving towards fewer cables, fewer connectors, and universal chargers, STMicroelectronics offers certified embedded software, based on its STM32 ARM Cortex-M based microcontrollers, to implement USB Type-C and Power Delivery (PD) technology.
The free STM32 USB-C and PD middleware stack is compliant with USB Type-C 1.2 and USB Power Delivery 2.0 specifications.
The X-CUBE-USB-PD firmware stack is initially based on the STM32F0 entry level Cortex-M0 processor. It allows designers to upgrade USB legacy devices to provide the reversible connector technology that can carry data (including video or proprietary protocols), and up to 100W of power to supply or charge equipment connected to the USB port.
By using the microcontroller’s embedded features such as comparators, ADCs, timers, and direct memory access with the stack, designers only require only a simple analogue front end comprising a few passive components, to save PCB space and bill of material costs.
Up to two USB-C ports (provider, consumer, or dual role) can be supported. Another feature is cable-insertion detection and plug orientation. Vbus Power negotiation is via a PD communication protocol and Vendor-Defined Messages are handled to identify device or cable ID or to manage alternate mode commands.
The processing bandwidth and available resources allow the microcontroller to perform other application-specific tasks, such as power-management control, USB2.0 communication, and/or voltage and current monitoring, on top of USB-C functionality.
The software library provided in the X-CUBE-USB-PD software expansion is in line with STM32Cube APIs (HAL or hardware abstraction layer), ensuring easy switch across different STM32 series, says the company.
An supporting STM32 Nucleo Pack includes a NUCLEO-F072RB board, a USB-C and PD expansion board, and a USB Type-C cable. The expansion board features two dual-role power USB Type-C ports with a discrete analogue front end.