cancel
Showing results for 
Search instead for 
Did you mean: 

STM32U599 PA11 as input

AGeis.4
Associate III

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();
.
.

 

8 REPLIES 8
Elatewendy
Associate III

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...😳 

gbm
Lead III

What happens if you remove al the code related to USB and PWR and leave just the GPIO programming?

AGeis.4
Associate III

.

AGeis.4
Associate III

then the voltage only goes up to 0.7V.

Sarra.S
ST Employee

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.

USB is not activated

Screenshot 2024-02-07 113733.png

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:

waclawekjan_0-1707311097774.png

JW

PS. The (boot) after the signal name is very confusing. Can it please be removed, and replaced by footnote?

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.