Skip to main content
MMust.5
Senior
May 20, 2022
Solved

Why does the fifth pin of port D stay on?

STM32F407

Why does the fifth pin of port D stay on?

Here is the code:

RCC->AHB1ENR|=RCC_AHB1ENR_GPIODEN;

GPIOD->MODER&=0UL;

GPIOD->IDR&=0UL;

There are 3 volts on pin 5 of port D (I checked with a multimeter).

The IDR register looks like this: IDR: 0000 0000 0010 0000

The ODR register looks like this: ODR: 0000 0000 0000 0000

This topic has been closed for replies.
Javier1
Javier1Best answer
Principal
May 20, 2022

You didnt specify , but if you are using a STM32F4DISCOVERY board (making a guess here).

The Pin D5 is tied to the USB otg current sense, this could be the reason youre unable to see 0v. (remove the R50 bridge to release that D5 from the usb otg IC )

0693W00000NqLCnQAN.png 

https://www.st.com/resource/en/schematic_pack/mb997-f407vgt6-c01_schematic.pdf

hit me up in https://www.linkedin.com/in/javiermuñoz/

5 replies

Tesla DeLorean
Guru
May 20, 2022

Probably board related

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Javier1
Javier1Best answer
Principal
May 20, 2022

You didnt specify , but if you are using a STM32F4DISCOVERY board (making a guess here).

The Pin D5 is tied to the USB otg current sense, this could be the reason youre unable to see 0v. (remove the R50 bridge to release that D5 from the usb otg IC )

0693W00000NqLCnQAN.png 

https://www.st.com/resource/en/schematic_pack/mb997-f407vgt6-c01_schematic.pdf

hit me up in https://www.linkedin.com/in/javiermuñoz/
MMust.5
MMust.5Author
Senior
May 20, 2022

The best of the best

Javier1
Principal
May 23, 2022

0693W00000NqSQmQAN.png

hit me up in https://www.linkedin.com/in/javiermuñoz/