cancel
Showing results for 
Search instead for 
Did you mean: 

Strange PD2 behavior on STM32F405RG

Eich
Associate III
Posted on July 25, 2013 at 10:40

Hi !

I'm trying to use PD2 on my STM32F405RG as GPIO output. I think i configured it correctly but it does not switch. Here is my code, it is not that difficult....

GPIO_InitTypeDef GPIO_InitStructure;
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOD, ENABLE);
GPIO_DeInit(GPIOD);
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_2;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_25MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOD, &GPIO_InitStructure);
GPIO_SetBits(GPIOD, GPIO_Pin_2);

Or is there a special function on that pin that must be disabled? Same code ported to PORTA works fine. Regards, Ed #nonsens-stupid #stm32f4-gpio
6 REPLIES 6
Nickname12657_O
Associate III
Posted on July 25, 2013 at 23:13

Dear Ed,

It is a normal behavior.

0690X0000060Mm7QAE.gif

I will not answer, but I will ask you a simple question : Can you tell me the pin number of PD2 on 405RG (LQFP64) package?

Good luck, STOne-32

Posted on July 25, 2013 at 23:40

Confused. Isn't PD2 Pin 54. Right now I suspect the board design, or a solder issue. Elaborate.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Eich
Associate III
Posted on July 26, 2013 at 08:00

@STOne-32: Is this answer a little bit stupid?

PD2 is at pin 54 on the STM32F405RG (LQFP64).

Regards,

Ed

Eich
Associate III
Posted on July 26, 2013 at 08:13

@clive1: Thanks, just wanted to make sure that i haven't overseen something in the datasheet. It was indeed a soldering issue on the prototype.

Regards,

Ed

Nickname12657_O
Associate III
Posted on July 26, 2013 at 16:07

My Question was stupid ;-),  But at least helped to check out  the solder issue on Pin54 .

Cheers,

STOne-32.

Eich
Associate III
Posted on July 29, 2013 at 07:56

To be honest, your posting helped nothing.

Regards,

Ed