2024-03-06 09:34 PM
Solved! Go to Solution.
2024-03-08 02:30 AM
Hello @forst
Yes, depending on what you plug the devices will not behave the same.
On the trace you've shared, we see that it is from the sink. And after an explicit contract, we see that we get some SVDM_DISCOVER_SVIDS message from the source. The sink replies "NOT_SUPPORTED", which is a behavior you can change in the user application.
Sometime, when a device receives this "not supported" message, it asks again forever, because it could be that the answer changes over time.This is application choice. So this can explain why you see differences between Android and Windows. Even depending on the devices brand, the dialogs are different, depending on the feature they support (USB capability, VDM options...)
I don't see Android or Windows trace here. Could you give the related traces ?
Why do you say that CAD stops working ? CAD is the CAble Detection part. If you don't unplug or plug the cable, CAD states should not change. The states of CAD (USBPD_CAD_STATE_ATTACHED_WAIT, USBPD_CAD_STATE_ATTACHED...) are described in the file usbpd_cad_hw_if.c. Have a loot also at this part of the wiki.
The picture you shared seems the same as the trace text. It would be easier to share the full .cpd trace, it is much practical to read back using STM32CubeMonitor-UCPD.
2024-03-08 02:30 AM
Hello @forst
Yes, depending on what you plug the devices will not behave the same.
On the trace you've shared, we see that it is from the sink. And after an explicit contract, we see that we get some SVDM_DISCOVER_SVIDS message from the source. The sink replies "NOT_SUPPORTED", which is a behavior you can change in the user application.
Sometime, when a device receives this "not supported" message, it asks again forever, because it could be that the answer changes over time.This is application choice. So this can explain why you see differences between Android and Windows. Even depending on the devices brand, the dialogs are different, depending on the feature they support (USB capability, VDM options...)
I don't see Android or Windows trace here. Could you give the related traces ?
Why do you say that CAD stops working ? CAD is the CAble Detection part. If you don't unplug or plug the cable, CAD states should not change. The states of CAD (USBPD_CAD_STATE_ATTACHED_WAIT, USBPD_CAD_STATE_ATTACHED...) are described in the file usbpd_cad_hw_if.c. Have a loot also at this part of the wiki.
The picture you shared seems the same as the trace text. It would be easier to share the full .cpd trace, it is much practical to read back using STM32CubeMonitor-UCPD.
2024-03-10 11:38 PM
Hello,
I disabled the support in some PD settings to try
・Fast Role Swap
・Ping Support
・Fast Role Swap Support
・Src CapExt Support
・FirmUpdateRequest Support
・Unchunk Support
Then CAD no longer stopped working.
Is there a PD setting that is not supported by x-cube-tcpp?
2024-03-11 01:33 AM - edited 2024-03-11 01:37 AM
@forst the x-cube-tcpp give a few examples of simple applications. But there are a lot of options in the power delivery specification. So all of them cannot be demonstrated with one application.
ST provides the stack as a toolbox. But every client need to put in place their own needs. This is why we have inserted some help in the trace.
For example in the file usbpd_dpm_user.c you will see lines like :
DPM_USER_DEBUG_TRACE(PortNum, "ADVICE: update USBPD_DPM_SetDataInfo:%d", DataId);
If you get such "ADVICE" messages in your trace (using STM32CubeMonitor-UCPD), it means that you have to add some application part.
You can get inspiration from the G0 evaluation demo code here.
Can you give details on what you mean by "CAD stop working" ? Can you share such a .cpd trace ?
2024-03-11 02:02 AM
Hello,
I am currently unable to reproduce the issue of CAD not working.
Here is a screenshot of what appears to be when the problem occurred at the time.
From the attached file,
I remember that the CAD task was not working properly due to a series of IRQ interrupts for some unknown reason.