cancel
Showing results for 
Search instead for 
Did you mean: 

In STM32U5G7VJT6, GPIO Input Mode not working PA11 and PA12 pin

Dharmendra_Singh
Associate II

Message:

I have configured PA11 and PA12 pins in input mode, but they are not responding — I’m continuously getting a low level from the MCU side.

For testing purposes, I configured the same pins as output, and they work fine in output mode.

To verify hardware, I removed the MCU and checked the lines — they remain high, confirming that the hardware is OK.

Please suggest the possible reason or solution at the earliest.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Issamos
Lead II

Hello @Dharmendra_Singh 

I think what is special for the PA11 and PA12 of theSTM32U5G7 is mentioned on the paragraph 10.7.12 of the RM0456:

  • PA11 and PA12 are used as standard GPIOs, set first the USV bit in the PWR_SVMCR register, then the USBPWREN and VDD11USBDIS bits in the PWR_VOSR register must be set prior to configure the GPIOs in a mode other than analog.

Issamos_0-1761730352231.png

Same behavior reported and solved here.

Best Reagrds.

II

View solution in original post

7 REPLIES 7
mƎALLEm
ST Employee

Hello @Dharmendra_Singh and welcome to the community,

PA11 and PA12 have bot the USB function. Are you sure you configured the GPIO in the right way?

I suggest to attach your project in the discussion in zip file.

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.
mƎALLEm
ST Employee

@Dharmendra_Singh 

Did you really accept the solution?

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.

I have configured it correctly. I’m attaching the code for better understanding.

Please reply ASAP.

 

Hello,

In next time please don't mark the solution as it was not solved. If it was mistakenly done, you can unmark it using this arrow:

mALLEm_0-1761725414836.png

I don't have the MCU part number to test but I don't see an issue in the IO config. Did you put a pull up or pull down resistors on the hardware. I don't see you configured the internal ones

 

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.
mƎALLEm
ST Employee

@Dharmendra_Singh why are you accepting as solution each time I post a comment?

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.
Issamos
Lead II

Hello @Dharmendra_Singh 

I think what is special for the PA11 and PA12 of theSTM32U5G7 is mentioned on the paragraph 10.7.12 of the RM0456:

  • PA11 and PA12 are used as standard GPIOs, set first the USV bit in the PWR_SVMCR register, then the USBPWREN and VDD11USBDIS bits in the PWR_VOSR register must be set prior to configure the GPIOs in a mode other than analog.

Issamos_0-1761730352231.png

Same behavior reported and solved here.

Best Reagrds.

II

Big Thanks, Working fine ....