cancel
Showing results for 
Search instead for 
Did you mean: 

USB PD SOURCE with USB HID device (SRC1M1 + MB1360-G0B1RE)

ASedo.1
Associate II

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:

  • enable USB_DRD_FS as a device_fs;
  • check Interrupts enabling;
  • enable USB support into USBPD middleware;
  • configure USB_DEVICE middleware; 

photo_2023-08-23_14-48-45.jpg

 

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 . 

photo_2023-08-23_14-48-46.jpg

 

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:

  • What I should provide from project for better description (I'm not able to attach exported project)?
  • Shall HID device code work "from  the box" with USB PD after enabling in CubeMx?
  • Shall I do any additional configuration at SRC1M1 for a support not only PD but with USB2.0 too (set jumpers or 0-ohm resistors)?

P.S. Stm32CubeIDE v1.13.1, G0 package version is 1.6.1.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions

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

 

 

View solution in original post

7 REPLIES 7
Guenael Cadier
ST Employee

Dear @ASedo.1 ,
Is it possible for you to share your project running on SRC1M1 + MB1360-G0B1RE ?
Thanks
Guenael

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.

LLECH.1
ST Employee

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 ?  

 

LLECH.1
ST Employee

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

ASedo.1
Associate II

@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:

ASedo1_0-1695148324870.png

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.

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

 

 

ASedo.1
Associate II

@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.