STM32 USB Tipe-C Pangiriman Daya

Pambuka
Dokumen iki ngemot dhaptar pitakonan sing sering ditakoni (FAQ) babagan STM32 USB Type-C®, lan Pangiriman Daya.
Pangiriman Daya USB Tipe-C®
Can the USB Type-C® PD be used to transmit data? (Not using USB high-speed data transfer features)
Nalika USB Type-C® PD dhewe ora dirancang kanggo transfer data kacepetan dhuwur, bisa digunakake karo protokol liyane lan mode sulih lan ngatur transmisi data dhasar.
Apa panggunaan praktis modul VDM UCPD?
Pesen sing ditetepake vendor (VDM) ing Pangiriman Daya USB Type-C® nyedhiyakake mekanisme fleksibel kanggo nambah fungsi USB Type-C® PD ngluwihi negosiasi daya standar. VDM ngaktifake identifikasi piranti, mode alternatif, nganyari perangkat kukuh, perintah khusus, lan debugging. Kanthi ngleksanakake VDM, vendor bisa nggawe fitur lan protokol proprietary nalika njaga kompatibilitas karo spesifikasi USB Type-C® PD.
STM32CubeMX needs to be configured with specific parameters, where are they available?
Nganyari paling anyar ngganti informasi tampilan dadi luwih gampang pangguna, saiki antarmuka mung njaluk voltage lan saiki dikarepake. Nanging, paramèter kasebut bisa ditemokake ing dokumentasi, sampeyan bisa ndeleng tabel referensi cepet ing AN5418.
Gambar 1. Specification detail (table 6-14 in universal serial bus Power Delivery specification)

Gambar 2 explains the applied value 0x02019096.
Gambar 2. Decoding PDO rinci

Kanggo katrangan luwih lengkap babagan definisi PDO, deleng bagean POWER_IF ing UM2552.
Apa saiki output maksimum antarmuka USB?
Arus output maksimum sing diidinake dening standar USB Type-C® PD yaiku 5 A kanthi kabel 5 A tartamtu. Tanpa kabel tartamtu, arus output maksimum yaiku 3 A.
Does this ‘Dual-role mode’ mean be able to supply power and charge in reverse?
Ya, DRP (dual role port) bisa diwenehake (sink), utawa bisa nyedhiyakake (sumber). Biasane digunakake ing piranti sing nganggo baterei.
STM32 Power Delivery controller lan pangayoman
Apa dhukungan MCU mung standar PD utawa QC uga?
Mikrokontroler STM32 utamane ndhukung standar USB Power Delivery (PD), yaiku protokol sing fleksibel lan diadopsi sacara luas kanggo Pangiriman Daya liwat sambungan USB Type-C®. Dhukungan asli kanggo Quick Charge (QC) ora diwenehake dening mikrokontroler STM32 utawa tumpukan USB PD saka STMicroelectronics. Yen dhukungan Quick Charge dibutuhake, IC pengontrol QC khusus kudu digunakake karo mikrokontroler STM32.
Is it possible to implement a synchronous rectification algorithm in the package? Can it manage multiple outputs and controller roles?
Ngleksanakake algoritma rectification sinkron karo macem-macem output lan peran controller layak karo STM32 mikrokontroler. Kanthi ngonfigurasi periferal PWM lan ADC lan ngembangake algoritma kontrol, bisa entuk konversi daya sing efisien lan ngatur macem-macem output. Kajaba iku, nggunakake protokol komunikasi kaya I2C utawa SPI koordinasi operasi saka macem-macem piranti ing konfigurasi controller-target. Minangka example, STEVAL-2STPD01 karo STM32G071RBT6 siji sing embeds loro UCPD controller bisa ngatur loro Type-C 60 W Type-C Power Delivery bandar.
Apa ana TCPP kanggo VBUS> 20 V? Apa produk kasebut ditrapake kanggo EPR?
Seri TCPP0 dirating nganti 20 V VBUS voltage SPR (Standard Power Range).
Seri mikrokontroler STM32 sing ndhukung USB Type-C® PD?
Periferal UCPD kanggo ngatur USB Type-C® PD ditempelake ing seri STM32 ing ngisor iki: STM32G0, STM32G4, STM32L5, STM32U5, STM32H5, STM32H7R/S, STM32N6, lan STM32MP2. Iki menehi 961 P/N nalika dokumen kasebut ditulis.
How to make the STM32 MCU works as a USB serial device following USB CDC class? Is the same or similar procedure help me go no-code?
Komunikasi liwat solusi USB didhukung dening mantan nyataampalat panemuan utawa evaluasi kalebu perpustakaan piranti lunak gratis lengkap lan examples kasedhiya karo paket MCU. Generator kode ora kasedhiya.
Is it possible to dynamically change the PD ‘data’ in the software run-time? E.g. voltage and current demands/capabilities, consumer/provider etc.?
It is possible to dynamically change the power role (consumer – SINK or provider – SOURCE), the power demand (power data object) and data role (host or device) thanks USB Type-C® PD. This flexibility is illustrated in STM32H7RS USB Dual Role Data and Power video.
Is it possible to use the USB2.0 standard and the Power Delivery (PD) to receive more than 500 mA?
USB Type-C® PD mbisakake kemampuan daya dhuwur lan daya cepet kanggo piranti USB kanthi bebas saka transmisi data. Dadi, bisa nampa luwih saka 500 mA nalika ngirim ing USB 2.x, 3.x.
Do we have the possibility to read information on the source or sink device such as the PID/UID of the USB device?
USB PD ndhukung ijol-ijolan macem-macem jinis pesen, kalebu pesen lengkap sing bisa nggawa informasi pabrikan sing rinci. USBPD_PE_SendExtendedMessage API dirancang kanggo nggampangake komunikasi iki, ngidini piranti njaluk lan nampa data kayata jeneng pabrikan, jeneng produk, nomer seri, versi perangkat kukuh, lan informasi khusus liyane sing ditetepake dening pabrikan.
Nalika nggunakake tameng X-NUCLEO-SNK1M1 sing kalebu TCPP01-M12, kudu X-CUBE-TCPP uga digunakake? Utawa X-CUBE-TCPP opsional ing kasus iki?
Kanggo miwiti solusi USB Type-C® PD ing mode SINK, X-CUBE-TCPP dianjurake kanggo nggampangake implementasine amarga solusi STM32 USB Type-C® PD kudu dikelola. TCPP01-M12 punika pangayoman optimal gadhah.
Ing PCB USB, garis data USB (D + lan D-) dituju minangka sinyal diferensial 90-Ohm. Apa jejak CC1 lan CC2 kudu dadi sinyal 90-Ohms uga?
Garis CC minangka garis tunggal kanthi komunikasi frekuensi rendah 300 kbps. Impedansi karakteristik ora kritis.
Bisa TCPP nglindhungi D+, D-?
TCPP is not adapted to protect D+/- lines. To protect D+/- lines USBLC6-2 ESD protections are recommended or ECMF2-40A100N6 ESD protections + common-mode filter if radio frequencies on the system.
Apa driver HAL utawa register encapsulated?
Sopir punika HAL.
Carane aku bisa mesthekake yen STM32 nangani rembugan daya lan Manajemen saiki ing protokol PD bener tanpa nulis kode?
A first step can be a series of field interoperability tests using available device available on the market. To understand the solution behavior, STM32CubeMonUCPD allows monitoring and configuration of STM32 USB Type-C® and Power Delivery applications.
A second step can be a certification with the USB-IF (USB implementer forum) compliance program to obtain an official TID (Test Identification) number. It can be performed in a USB-IF sponsored compliance workshop or in an authorized independent test lab.
The code generated by X-CUBE-TCPP is ready to be certified and solutions in the Nucleo/Discovery/Evaluation board have already been certified.
Kepiye cara ngetrapake fungsi OVP saka proteksi port Tipe-C? Apa margin kesalahan bisa disetel ing 8%?
Ambang OVP disetel dening voltage divider bridge connected on a comparator with a fixed bandgap value.
Comparator input is VBUS_CTRL on TCPP01-M12 and Vsense on TCPP03-M20. OVP VBUS threshold voltage bisa HW diganti miturut voltage divider ratio.
However, it is recommended to use the divider ratio presented on X-NUCLEO-SNK1M1 or X-NUCLEO-DRP1M1 according to the targeted maximum voltage.
Apa tingkat keterbukaan dhuwur? Bisa ngatur sawetara tugas tartamtu?
Tumpukan USB Type-C® PD ora mbukak. Nanging, sampeyan bisa ngatur kabeh input lan interaksi karo solusi kasebut. Uga, sampeyan bisa ngrujuk menyang manual referensi STM32 digunakake kanggo ndeleng ing antarmuka UCPD.
Apa sing kudu digatekake ing desain sirkuit perlindungan port?
TCPP IC must be placed close to the Type-C connector. Schematic recommendations are listed in user manuals of X-NUCLEO-SNK1M1, X-NUCLEO-SRC1M1, lan X-NUCLEO-DRP1M1. To insure a good ESD robustness, I would recommend having a look on ESD layout tips application note.
Dina iki, akeh IC siji-chip saka China sing dikenalake. Apa sing advan tartamtutagApa nggunakake STM32?
Keuntungan utama saka solusi iki katon nalika nambah konektor Type-C PD menyang solusi STM32 sing wis ana. Banjur, iku biaya efektif amarga vol kurangtage UCPD controller ditempelake ing STM32, lan vol dhuwurtage kontrol / pangayoman wis rampung dening TCPP.
Apa ana solusi dianjurake sing diwenehake dening ST karo sumber daya lan STM32-UCPD?
Padha mantan lengkapample karo a USB Type-C Power Delivery dual port adapter based on the STPD01 programmable buck converter. STM32G071RBT6 and two TCPP02-M18 are used to support two STPD01PUR programmable buck regulators.
Apa solusi sing ditrapake kanggo Sink (monitor kelas 60 W), aplikasi input lan daya HDMI utawa DP?
STM32-UCPD + TCPP01-M12 bisa ndhukung sinking daya nganti 60 W. Kanggo HDMI utawa DP, perlu mode sulih, lan bisa rampung dening piranti lunak.
Apa tegese produk kasebut wis diuji kanggo spesifikasi standar USB-IF lan kepatuhan USB?
Kode kui utawa ngajokaken ing paket perangkat kukuh wis dites lan resmi certified kanggo sawetara konfigurasi tombol HW. Minangka example, X-NUCLEO-SNK1M1, X-NUCLEO-SRC1M1, lan X-NUCLEO-DRP1M1 ing ndhuwur NUCLEO wis resmi disertifikasi lan ID test USB-IF yaiku: TID5205, TID6408, lan TID7884.
Konfigurasi lan kode aplikasi
Kepiye carane nggawe PDO?
Mbangun obyek data daya (PDO) ing konteks USB Power Delivery (PD) melu nemtokake kemampuan daya sumber USB PD utawa sink. Mangkene langkah-langkah kanggo nggawe lan ngatur PDO:
- Identify the type of PDO:
- Fixed supply PDO: Defines a fixed voltage lan saiki
- Battery supply PDO: Defines a range of voltages and a maximum power
- Variable supply PDO: Defines a range of voltages and a maximum current
- Programmable Power Supply (PPS) APDO: Allows for a programmable voltage lan saiki.
- Nemtokake paramèter:
- Voltage: Voltage tingkat sing PDO menehi utawa njaluk
- Current / power: The current (for fixed and variable PDOs) or power (for battery PDOs) the PDO provide
or request.
- Use the STM32 Cube MonUCPD GUI:
- Langkah 1: Ensure you have the latest version of the STM32 Cube Mon UCPD application
- Langkah 2: Connect your STM32G071-Disco board to your host machine and launch the STM32 Cube Monitor-UCPD application
- Langkah 3: Select your board in the application
- Langkah 4: Navigate to the “port configuration” page and click on the “sink capabilities” tab to see the
current PDO list - Langkah 5: Modify an existing PDO or add a new PDO by following the prompts
- Langkah 6: Click on the “send to target” icon to send the updated PDO list to your board
- Langkah 7: Click on the “save all in target” icon to save the updated PDO list onto your board[*].
Iki mantanampbabagan carane sampeyan bisa nemtokake PDO pasokan tetep ing kode:
/* Define a fixed supply PDO */
uint32_t fixed_pdo = 0;
fixed_pdo |= (voltage_in_50mv_units << 10); // Voltage in 50 mV units
fixed_pdo |= (max_current_in_10ma_units << 0); // Max current in 10 mA units
fixed_pdo |= (1 << 31); // fixed supply type
Exampkonfigurasi le
Kanggo PDO sumber tetep karo 5 V lan 3A:
content_copy
uint32_t fixed_pdo = 0;
fixed_pdo |= (100 << 10); // 5 V (100 * 50 mV)
fixed_pdo |= (30 << 0); // 3A (30 * 10 mA)
fixed_pdo |= (1 << 31); // fixed supply type
Pertimbangan tambahan:
- Dynamic PDO selection: You can dynamically change the PDO selection method at runtime by modifying the USED_PDO_SEL_METHOD variable in the usbpd_user_services.c file[*] .
- Evaluation of capabilities: Use functions like USBPD_DPM_SNK_EvaluateCapabilities to evaluate received capabilities and prepare the request message[*] .
Mbangun PDO melu netepake voltage lan saiki (utawa daya) paramèter lan configuring wong nggunakake alat kaya STM32CubeMonUCPD utawa langsung ing kode. Kanthi tindakake langkah lan examples kasedhiya, sampeyan bisa èfèktif nggawe lan ngatur PDO kanggo aplikasi USB PD.
Is there a function for a prioritizing scheme with more than one PD-sink connected?
Ya, ana fungsi sing ndhukung rencana prioritizing nalika luwih saka siji PD-sink disambungake. Iki utamané migunani ing skenario ing ngendi sawetara piranti disambungake menyang sumber daya siji. Distribusi daya kudu dikelola adhedhasar prioritas.
Skema prioritas bisa dikelola nggunakake fungsi USBPD_DPM_SNK_EvaluateCapabilities. Fungsi iki ngira-ngira kapabilitas ditampa saka sumber PD lan nyiapake pesen request adhedhasar syarat sink lan prioritas. Nalika nangani macem-macem sinks, sampeyan bisa ngleksanakake rencana prioritizing dening nemtokake tingkat prioritas kanggo saben sink lan ngowahi fungsi USBPD_DPM_SNK_EvaluateCapabilities kanggo nimbang prioritas iki.
content_copy
uint32_t fixed_pdo = 0;
fixed_pdo |= (100 << 10); // 5V (100 * 50mV)
fixed_pdo |= (30 << 0); // 3A (30 * 10mA)
fixed_pdo |= (1 << 31); // Fixed supply type
/* Define a Fixed Supply PDO */
uint32_t fixed_pdo = 0;
fixed_pdo |= (voltage_in_50mv_units << 10); // Voltage in 50mV units
fixed_pdo |= (max_current_in_10ma_units << 0); // Max current in 10mA units
fixed_pdo |= (1 << 31); // Fixed supply type
Apa wajib nggunakake DMA karo LPUART kanggo GUI?
Ya, iku wajib kanggo komunikasi liwat solusi ST-LINK.
Apa setelan LPUART 7 bit kanggo dawa tembung bener?
Ya bener.
In the STM32CubeMX tool – there is a check box “save power of non-active UCPD – deactive dead battery pull-up.” What does mean this check box if it is enable?
Nalika SOURCE, USB Type-C® mbutuhake resistor pull-up disambungake menyang 3.3 V utawa 5.0 V. Iku tumindak minangka generator sumber saiki. Sumber saiki iki bisa dipateni nalika USB Type-C® PD ora digunakake kanggo nyuda konsumsi daya.
Is it necessary to use FreeRTOS for STM32G0 and USB PD applications? Any plans for non-FreeRTOS USB PD examples?
Ora prentah nggunakake FreeRTOS kanggo aplikasi USB Power Delivery (USB PD) ing mikrokontroler STM32G0. Sampeyan bisa ngleksanakake USB PD tanpa RTOS kanthi nangani acara lan mesin negara ing daur ulang utama utawa liwat interrupting rutin layanan. Nalika wis ana panjalukan kanggo USB Power Delivery examples tanpa RTOS. Saiki ora ana ex non-RTOSample kasedhiya. Nanging sawetara AzureRTOS example kasedhiya kanggo seri STM32U5 lan H5.
In the STM32CubeMX demo building a USB PD application for STM32G0, is HSI accuracy acceptable for USB PD applications? Or the use of external HSE crystal is mandatory?
HSI nyedhiyakake jam kernel kanggo periferal UCPD, mula ora ana gunane nggunakake HSE. Uga, STM32G0 ndhukung tanpa kristal kanggo USB 2.0 ing mode piranti, saengga HSE mung dibutuhake ing mode host USB 2.0.
Gambar 3. UCPD reset and clocks

Apa ana dokumentasi sing bisa dakrujuk kanggo nyetel CubeMX kaya sing wis diterangake mengko?
The documentation is available in the following Wiki link.
Is the STM 32 Cube Monitor capable of real-time monitoring? Is real-time monitoring possible by connecting STM32 and ST-LINK?
Ya, STM32CubeMonitor bisa nindakake pemantauan nyata kanthi nyambungake STM32 lan ST-LINK.
Apa VBUS voltage / fungsi pangukuran saiki tontonan ing layar monitor kasedhiya kanthi dhasar lan gawan ing Papan UCPD-aktif, utawa iku fitur saka Papan NUCLEO ditambahaké?
Akurat voltagpangukuran kasedhiya native amarga VBUS voltage is required by USB Type-C®.
Accurate current measurement can be done by TCPP02-M18 / TCPP03-M20 thanks to high side amplifier lan shunt resistor uga digunakake kanggo nindakake liwat pangayoman saiki.
generator kode aplikasi
Can CubeMX generate an Azure RTOS-based project with X-CUBE-TCPP by the same way with FreeRTOS™? Can it generate the code managing the USB PD without using FreeRTOS™? Does this software suite require an RTOS to operate?
STM32CubeMX generates code thanks to the X-CUBE-TCPP package using the RTOS available for the MCU, FreeRTOS™ (for STM32G0 as example), utawa AzureRTOS (kanggo STM32H5 minangka example).
Can X-CUBE-TCPP generate code for dual Type-C PD port such as STSW-2STPD01 board?
X-CUBE-TCPP can generate code for only a single port. To do it for two ports, two separated projects have to be generated without overlap on STM32 resources and with two I2C addresses for TCPP02-M18 and be merged.
Untunge, STSW-2STPD01 has a complete firmware package for the two ports. It is then not necessary to generate code.
Apa alat desain iki bisa digunakake karo kabeh mikrokontroler nganggo USB Type-C®?
Ya, X-CUBE-TCPP bisa digunakake karo STM32 sing ngemot UCPD kanggo kabeh kasus daya (SINK / SOURCE / Dual Role). Bisa digunakake karo STM32 kanggo 5 V Type-C SOURCE.
Tabel 1. Riwayat revisi dokumen
| Tanggal | Revisi | Owah-owahan |
| 20-Jun-2025 | 1 | Rilis wiwitan. |
Important Notice – Read Carefully
STMicroelectronics NV lan anak perusahaan ("ST") nduweni hak kanggo nggawe owahan, koreksi, dandan, modifikasi, lan dandan kanggo produk ST lan / utawa dokumen iki sawayah-wayah tanpa kabar. Para panuku kudu entuk informasi paling anyar babagan produk ST sadurunge nggawe pesenan. Produk ST didol miturut syarat lan kahanan adol ST nalika diakoni pesenan.
Para panuku mung tanggung jawab kanggo milih, milih, lan nggunakake produk ST lan ST ora duwe tanggung jawab kanggo pitulung aplikasi utawa desain produk para panuku.
Ora ana lisensi, nyata utawa diwenehake, kanggo hak properti intelektual sing diwenehake dening ST ing kene.
Adol maneh produk ST kanthi pranata sing beda karo informasi sing kasebut ing kene bakal ngilangi garansi sing diwenehake dening ST kanggo produk kasebut.
ST lan logo ST iku merek dagang saka ST. Kanggo informasi tambahan babagan merek dagang ST, waca www.st.com/trademarks. Kabeh jeneng produk utawa layanan liyane minangka properti sing nduweni.
Informasi ing dokumen iki ngganti lan ngganti informasi sing diwenehake sadurunge ing versi sadurunge dokumen iki.
© 2025 STMicroelectronics – Kabeh hak dilindhungi undhang-undhang

Dokumen / Sumber Daya
![]() |
ST STM32 USB Tipe-C Pangiriman Daya [pdf] Manual pangguna TN1592, UM2552, STEVAL-2STPD01, STM32 Pangiriman Daya USB Tipe-C, STM32, Pangiriman Daya USB Tipe-C, Pangiriman Daya Tipe-C, Pangiriman Daya, Pangiriman |
