cancel
Showing results for 
Search instead for 
Did you mean: 

Re: No data-role swap recognized with X Cube TCPP

Aristy
Associate

Hi @FBL 

I am working on a similar project like This one (USB CDC ACM device with Power Delivery in Source mode using USBX in standalone mode, FreeRTOS and USBPD with a TCPP02). The STM32 used is the H573I.

I have found some code to add in the function USBPD_DPM_Notification() in usbpd_dpm_user.c (solution you gave).

But in my code, the functions called are undefined because the file usbpd_usb_if.c is not generated. What I am missing?

2 REPLIES 2
FBL
ST Employee

Hi @Aristy 

Would you attach your IOC file?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


Aristy
Associate

Hi @FBL,

Yes, the file is attached.

Note that since I use FreeRTOS, I can't define the USBX stack in middleware via STM32CubeMX. To counter this issue, I have created another project to define the USBX stack without any RTOS (in standalone mode) and generate the code, then, copy / path the code in my project which has FreeRTOS activated.

My problem is, the USB communication woks very well when the Power Delivery is not defined and the Power Delivery is works when the USB communication is not defined. However, when I try both solution at the same time, only Power Delivery works and I don't have any communication.

To debug this, I have connected the USB line between the STM32 and a laptop (on linux) and use the command "dmesg" to get the kernel log :

[12883.502038] ucsi_acpi USBC000:00: unknown error 0
[12883.502043] ucsi_acpi USBC000:00: UCSI_GET_PDOS failed (-5)

Note that I do this in order to send data to a smartphone while charging it.

Thank you for your help.