2024-06-09 10:58 PM
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
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
Solved! Go to Solution.
2024-09-18 08:00 AM
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.
2024-06-11 09:07 AM
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]
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.
2024-06-11 09:30 AM
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
2024-09-18 08:00 AM
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.