-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STM32G4 with USB-C PD: Some pins cannot be used as input by default #33253
Comments
I agree that this could be applied in the soc init routine. For G4 it should indeed be sufficient to set the For G0 Series the same can be accomplished by setting UCPDX_STROBE in SYSCFGR1. For L5 Series it is the same as for G4. |
it is does not work. pull-down resistor does not turn off for stm32g474ve rev.x |
@molchec do you confirm that, for G4 :
|
I solved the problem last night. did not work due to disabled PWR clocking. |
good. That's what the __HAL_RCC_PWR_CLK_ENABLE does. BTW is there any specific driver for usb_pd, out of the soc init, to include this config ? |
Describe the bug
The USB Type-C and Power Delivery Dead Battery feature requires 5k pull-downs on
UCPD1_CC1
andUCPD1_CC2
pins (PB4
andPB6
on STM32G474 series MCUs).These pull-downs are enabled by default and need to be actively disabled in order to use those pins as inputs.
To Reproduce
Configure PB4 or PB6 as inputs using the GPIO API and pull them up externally with e.g. 5k resistor to 3.3V. You will see that they end up in the middle at around 1.65V instead of at 3.3V.
Expected behavior
If something is configured as input via the GPIO API it should work out of the box.
These pull-ups seem to be somewhat separate from normal pinmuxing, so I'm not sure where this should be fixed. Possibly in some generic init code for this MCU, as the reference manual says:
Workaround
Add following line somewhere in the initialization of the app:
The text was updated successfully, but these errors were encountered: