Skip to main content
Visitor II
April 18, 2023
Solved

Is there an example for the ll_ucpd driver?

  • April 18, 2023
  • 2 replies
  • 1848 views

I am developing on the STM32U5 family and i need to use UCPD. As far as I know the UCPD middleware is no supported on this family, so I need to implement my functionality using the LL driver for the UCPD module. I am not experienced with usb power delivery. It would be nice to see and example of the ll_ucpd usage.

    This topic has been closed for replies.
    Best answer by Guenael Cadier

    Hi @MCseh.377​ 

    It looks like a link problem. Undefined symbols as USBPD_PE_Init, are expected to be present in the USBPD Core library.

    Please check that you have such lib in the objects of your project : below picture is an example of USBPD MW lib in case of IAR Ewarm project.


    _legacyfs_online_stmicro_images_0693W00000biUp5QAE.pngRegards

    2 replies

    ST Employee
    April 18, 2023

    Hi @MCseh.377​ 

    I confirm that STM32U5 embeds a UCPD peripheral for USB Power Delivery feature support. The STM32CubeU5 package contains USBPD Middleware (USB Power Delivery Stack + U5 Device) that is illustrated in some USBPD applications running on STM32U5 boards.

    USBPD Middleware is provided in following directory in the STM32CubeU5 package : Middlewares\ST\STM32_USBPD_Library or here on Github.

    Application example are provided for each board in Projects\<Board Name>\Applications\USBPD directory. For example you could find an example of a SNK application for STM32U5 Discovery board (B-U585I-IOT02A) here.

    Regards

    MCseh.377Author
    Visitor II
    April 20, 2023

    Thank you @Guenael Cadier​ for your help,

    I checked the example and I followed this tutorial to set up my usbpd sink device:

    https://youtu.be/-vsJhNIaHxE

    However after code generation i cannot build the project.

    I am using STM32U575-Nucleo board, building it with the cubemx generated Makefile.

    I get the following errors:


    _legacyfs_online_stmicro_images_0693W00000biUYjQAM.pngI don't find definitions for these functions, only declarations in the header files.

    Can you help me where I messed up? :)

    Thanks and best regards,

    Mark

    ST Employee
    April 20, 2023

    Hi @MCseh.377​ 

    It looks like a link problem. Undefined symbols as USBPD_PE_Init, are expected to be present in the USBPD Core library.

    Please check that you have such lib in the objects of your project : below picture is an example of USBPD MW lib in case of IAR Ewarm project.


    _legacyfs_online_stmicro_images_0693W00000biUp5QAE.pngRegards