cancel
Showing results for 
Search instead for 
Did you mean: 

B-U585I-IOT02A USB Host

ElectroManiac
Associate II

Hello forum, 

I'm trying to setup my B-U585I-IOT02A as a USB host. 
Ive turned on the following:

  • USBPD - Type C only, TIM2, enabled USB support 
  • USBX - core, Host CoreStack FS, Host Controller FS, MSC
  • USB_OTG_FS - Host Only
  • UCPD - Source
  • FileX - FileX Core

to initiate I've used these in my main:

 

MX_USB_OTG_FS_HCD_Init();
ux_host_stack_hcd_register(_ux_system_host_hcd_stm32_name,_ux_hcd_stm32_initialize, (ULONG)USB_OTG_FS,(ULONG)&hhcd_USB_OTG_FS);

 

It seems I don't get the any power out to my USB flash drive, and the USB event callback doesn't work.
am I doing something wrong? am I missing something? thanks in advace

9 REPLIES 9
Nicolas P.
ST Employee

Hello @ElectroManiac 

Could you share to us a trace .cpd file please ? Using the tracer tool here.

To check if the attach state is reached. Because in Type C, before turning on VBUS, the CC lines must be checked.

In the trace, check if there are notifications sent by the USBPD stack to the USB part.

The mechanism is described here.

Regards,

Nicolas

ABOUA
ST Employee

Hello @ElectroManiac 

Please check the Vbus generation, this should be managed by the TCPP03 

Regards

 

Hello @Nicolas P. 

the CubeMonitor UCPD doesn't recognize the USB-C of the board,
What should I do?


Hi @ElectroManiac.

You need to add the embedded trace tool. See this wiki.

Have you tried looking for the COM port directly (clicking on the blue top right panel) ?

Nicolas

@Nicolas P. 
the PC doesn't recognize the COM for the USBC, (it does show the STLink Com tho)

It's because you need to add a part in the firmware.

Have you followed the above link I shared ?

You need to configure a LPUART and an utility : Tracer_emb as on below picture.

NicolasP_0-1720516409818.png

 

@Nicolas P. I'm following the manual as I write to you and will update in a new comment once I'm done with It,
But before that, I must say that the USBPD_SNK_UX_Device_HID_CDC_ACM example doesn't include TCPP support. 
Will it even work without it? 

@Nicolas P. 

I get these errors after generating the codeError screen 09.07.2024.png

Hello @ElectroManiac 

The example USBPD_SNK_UX_Device_HID_CDC_ACM uses the TCPP.

NicolasP_0-1720708557563.png

NicolasP_2-1720708603447.png

Can you share your .ioc please ?

You made another post here. Is it the same project / issue ?