2024-02-07
12:56 AM
- last edited on
2024-02-07
01:16 AM
by
Lina_DABASINSKA
Hey,
I have a U599 and would like to use the PA11 pin as an input with a pull-up. I've set the CR1_FORCE_USBPWR, USBPWREN, and VDD11USBDIS bits. However, the pull-up voltage only reaches 1.21V in this configuration. The pin works fine as an output.
/* USER CODE BEGIN SysInit */
SET_BIT(PWR->CR1 , PWR_CR1_FORCE_USBPWR);
SET_BIT(PWR->VOSR , PWR_VOSR_USBPWREN);
SET_BIT(PWR->VOSR , PWR_VOSR_VDD11USBDIS);
/* USER CODE END SysInit */
/* Initialize all configured peripherals */
MX_GPIO_Init();
.
.
2024-02-07 01:20 AM
Hi,the same question happened at U595.If you have solved this problem, please let me know.
But I got the pull-up voltage only 0.2V...:flushed_face:
2024-02-07 02:08 AM
What happens if you remove al the code related to USB and PWR and leave just the GPIO programming?
2024-02-07 02:21 AM - edited 2024-02-07 02:22 AM
.
2024-02-07 02:23 AM
then the voltage only goes up to 0.7V.
2024-02-07 02:35 AM
Hello @AGeis.4,
Could you give us more information about the USB config when it was enabled?
I'm asking this because suspect that this is related to the limitation when USB is enabled (OTG_GCCFG.PWRDWN=1) the GPIO pin with the OTGx_ID function enables an internal pull-up for ID pin detection and when that function is no anymore required and you want to re-program it as GPIO, this will not disable the “ID” pull-up already described and this could corrupt the expected level.
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-02-07 02:38 AM
USB is not activated
2024-02-07 05:06 AM
Hi @Sarra.S ,
Note, that PA11 which is the pin in question, is *not* OTG_HS_ID; it's OTG_HS_DM i.e. one pin of the transceiver itself:
JW
PS. The (boot) after the signal name is very confusing. Can it please be removed, and replaced by footnote?
2024-02-07 08:01 AM
Hello @waclawek.jan
Thank you, I'm sorry for the misunderstanding!
I've reported your request about the footnote
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.