cancel
Showing results for 
Search instead for 
Did you mean: 

How make the nucleo-h7s3l8 HID device can be detached

prometheans152
Associate II

I folloe the nucleo-h7s3l8 HID example to create my  project (by STM32Cubemx), But it is not work.Pc always didnt detect ny board.

I trace code to here(like the picture) when I use debug tool

prometheans152_0-1717998247554.png

In my code ,the CAD_StateMachine_SNK run onec time and _handle->cstate is USBPD_CAD_STATE_DETACHED. It is wrong

I think the USBPD_PWR_IF_GetVBUSStatus need to be called,but my peoject never process USBPD_PWR_IF_GetVBUSStatus. I dont know how to resolve this problem.

Can anybody tell me how to do?Can tell me something that I need to fix my code or cubemx config ?

 

My code is in the attach

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @prometheans152 

Sorry for my late response. I hope you made progress since then.

Otherwise, here very helpful Wiki to learn more about UCPD peripheral.

https://wiki.st.com/stm32mcu/wiki/Introduction_to_USB_Power_Delivery_with_STM32

Introduction to USB Type-C® Power Delivery for STM32 MCUs and MPUs - Application note

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.

View solution in original post

3 REPLIES 3
FBL
ST Employee

Hi @prometheans152 

I have tried the example firmware STM32CubeH7RS/Projects/NUCLEO-H7S3L8/Applications/USB_Device/HID_Standalone at main · STMicroelectronics/STM32CubeH7RS (github.com)

It detects the attachment of cable without issues. Check UCPD jumper should be fitted. JP3 [7-8]

FBL_1-1718121649940.png

 

 

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.

Yes,I did it,and I check my board have power.

By the way ,I follow the HID_Standalone example to config my cubemx but I'm not sure that is right.

I don't know what thing is UCPD need?ADC? IIC? .Those are enable in the example.

But I can check my project UCPD and USBD config in STM32CubeMX as same as HID_Standalone

Have any spec/doc or any other things can read ?  I know nothing about UCPD with USB Deive

I tried to find the spec and doc before. I just find that how to use UCPD with Power

Hi @prometheans152 

Sorry for my late response. I hope you made progress since then.

Otherwise, here very helpful Wiki to learn more about UCPD peripheral.

https://wiki.st.com/stm32mcu/wiki/Introduction_to_USB_Power_Delivery_with_STM32

Introduction to USB Type-C® Power Delivery for STM32 MCUs and MPUs - Application note

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.