Hi,
I have been working on building a USB PD application, and have since been looking into the UCPD peripheral of some STM32 chips (mainly G0 and G4 family). I have no issue getting the stack working with the generated code out of CubeMX (building barebones C with a makefile).
However, I can't seem to get it working when taking the stack and using as a library with Arduino framework. I have brought over the build flags and tried to align the compiling as close as I can to the (working) makefile.
I was able to make the FDCAN peripheral work fine in Arduino by taking some of the generated code from CubeMX as long as HAL calls were wrapped with "C", but this isn't working for me with UCPD. Maybe there is something more complex to the problem that I am missing.
The code does run, and I can make an LED blink, but there is no response on the CC lines when connected to a PD source (goodCRC missing).
I checked out the usb-pd-arduino library, which does not use the ST UCPD stack, but this is not working for me either, although my hardware is slightly different from what is used in that project (I am using the Nucleo G474RE). I am planning to use the device as a PD sink.
Has anyone had success using the UCPD peripheral with the Arduino framework using the stack/library provided by ST?
UCPD peripheral in Arduino
Working libraries, libraries being ported and related hardware
-
- Posts: 1
- Joined: Mon Jan 29, 2024 5:59 pm
Return to “Libraries & Hardware”
Jump to
- Announcements
- New users start here
- ↳ Forum rules, FAQs and HowTo's
- ↳ Let us know a bit about you and your projects
- Arduino for STM32
- ↳ General discussion
- ↳ Ideas & suggestions
- ↳ Cores
- ↳ STM32 Core
- ↳ Builds and Announcements
- ↳ Code snippets
- ↳ Ideas & suggestions
- ↳ General discussion
- ↳ Installation and OS related
- ↳ Libraries & Hardware
- ↳ PR's bugs and enhancements
- ↳ LibMaple
- ↳ Builds and Announcements
- ↳ Code snippets
- ↳ General discussion
- ↳ Ideas & suggestions
- ↳ Installation and OS related
- ↳ Libraries & Hardware
- ↳ PR's bugs and enhancements
- ↳ Steve's LibMaple core
- ↳ General discussion
- ↳ PR's bugs and enhancements
- ↳ Projects
- ↳ IDE's
- ↳ Off topic
- Arduino for STM8
- ↳ General discussion
- ↳ Cores
- ↳ STM8 Core
- ↳ Other
- Boards
- ↳ Custom design boards
- ↳ Maple & Maple mini etc
- ↳ STM boards (Discovery, Eval, Nucleo, ...)
- ↳ All other boards
- ↳ STM32F0 based boards
- ↳ STM32F1 based boards
- ↳ STM32F2 based boards
- ↳ STM32F3 based boards
- ↳ STM32F4 based boards
- ↳ STM32F7 based boards
- ↳ STM32G0 based boards
- ↳ STM32G4 based boards
- ↳ STM32H7 based boards
- ↳ STM32L0 based boards
- ↳ STM32L1 based boards
- ↳ STM32L4 based boards
- ↳ STM32L5 based boards
- ↳ STM32MP1 based boards
- ↳ STM32WB based boards
- Bootloaders
- ↳ STM32 HID bootloader
- ↳ USB bootloader
- ↳ STM32 SD-Bootloader
- ↳ STM32 USB CDC bootloader
- Uploaders and debuggers
- ↳ STLink
- ↳ USB to Serial adaptors
- ↳ Black Magic Probe & other
- Dead Thread Graveyard
- ↳ Dead Thread Graveyard