cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the fifth pin of port D stay on?

MMust.5
Senior II

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

1 ACCEPTED SOLUTION

Accepted Solutions
Javier1
Principal

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

we dont need to firmware by ourselves, lets talk

View solution in original post

5 REPLIES 5

Probably board related

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Javier1
Principal

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

we dont need to firmware by ourselves, lets talk

The best of the best

You have one hell of a top-notch crystal ball!

0693W00000NqSQmQAN.png

we dont need to firmware by ourselves, lets talk