2023-08-23 05:20 AM - last edited on 2023-08-31 02:09 AM by Amel NASRI
Hello.
I try to develop a FW which should include USBPD SOURCE and USB HID device. My current dev kit -is SRC1M1 + MB1360-G0B1RE. The USB PD functionality was added in accordance with Stm32 wiki link for PD Source device - it is tested and OK. After that USB HID device was added with Cube configuration:
After that project was compiled and flashed. A Type-C cable is connected to the laptop with Windows 10 and HID device was not detected.
Next try was to connect MB1360-G0B1RE to MB1303B (only USB2.0 data lines, 3.3V and GND), because P-NUCLEO-USB002 kit has never had this issue with USB and Cube code .
This setup is working for USB2.0 - HID device is detected over Type-C. I checked a schematics for both boards(MB1303B and SRC1M1) - it looks like that USB2.0 lines are independent from any other lines or ICs.
My final goal - use SRC1M1 + MB1360-G0B1RE kit for PD and HID. Now it looks like some conflict or insufficient configuration.
My questions:
P.S. Stm32CubeIDE v1.13.1, G0 package version is 1.6.1.
Thank you.
Solved! Go to Solution.
2023-09-20 02:15 AM
Hello @ASedo.1,
By default, a source will take the role of the host (DFP), however it is possible to swap those roles by sending a data role swap message. Power roles and data roles are independent, you can change either data role without modifying power role. It would be easier to help you with a trace of the communication between your devices. You could use STM32CubeMonitor-UCPD to do so. Here is a link to help you to develop your application : Introduction to USB Power Delivery with STM32 - stm32mcu
Best regards,
LECHEVESTRIER Lucas
2023-09-11 09:17 AM
Dear @ASedo.1 ,
Is it possible for you to share your project running on SRC1M1 + MB1360-G0B1RE ?
Thanks
Guenael
2023-09-12 08:08 AM - edited 2023-09-12 08:12 AM
Hello @Guenael Cadier. of course, yes. Additionally, I have created a ticket - Case Number 00186568, where my progress and updates are presented, but issue is still.
2023-09-19 08:24 AM
Dear @ASedo.1, I tried to reproduce your setup by my side with the project you gave to Guenael CADIER. For the USB stack to be triggered, you first need to negociate a first USBPD contract with the device your SRC1M1 + MB1360-G0B1RE is plugged to. By my side I can see the USB stack starting if I plug a device with a typeC-typeC cable. However if your cable is a typeC-typeA the USBPD contract won't be established. Thus, the USB Stack won't start. Could you tell me what type of cable you used please ?
2023-09-19 08:30 AM
Also what do you mean by "HID device was not detected." ? Does the USB stack start ? Would you have any trace to give us ?
Thanks
LECHEVESTRIER Lucas
2023-09-19 11:42 AM
@LLECH.1, thank you for your replay.
1) This Type-C - Type-C cable from a refurbished Apple iPad. It was checked. We got the same result with the cable from ST.
2) We found possible root of problem, maybe you could validate our thoughts. We want to get HID composite device (mouse and keyboard) from stm32G0 with SRC1M1 as PD source. The code for HID composite device was checked for this cable - it is OK. From TCPP02-M18 datasheet we got:
Does it mean that TCPP02-M18 could be only HID HOST? And we are not able to get SOURCE + USB DEVICE with SRM1M1? Does it mean that we have to use TCPP03-M20 for that?
4) Are power roles and data roles independent of each other in ST USB PD SDK? Could the USB role defined from code by the developer or it requires vendor messages from USB host for roles' swap?
Thank you.
2023-09-20 02:15 AM
Hello @ASedo.1,
By default, a source will take the role of the host (DFP), however it is possible to swap those roles by sending a data role swap message. Power roles and data roles are independent, you can change either data role without modifying power role. It would be easier to help you with a trace of the communication between your devices. You could use STM32CubeMonitor-UCPD to do so. Here is a link to help you to develop your application : Introduction to USB Power Delivery with STM32 - stm32mcu
Best regards,
LECHEVESTRIER Lucas
2023-09-26 10:37 PM
@LLECH.1 , hello. Thank you, yes it works for us. As a customer feedback - maybe it could be useful to extend information about data role swapping into wiki.