2013-07-25 01:40 AM
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
2013-07-25 02:13 PM
Dear Ed,
It is a normal behavior. 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-322013-07-25 02:40 PM
Confused. Isn't PD2 Pin 54. Right now I suspect the board design, or a solder issue. Elaborate.
2013-07-25 11:00 PM
@STOne-32: Is this answer a little bit stupid?
PD2 is at pin 54 on the STM32F405RG (LQFP64). Regards, Ed2013-07-25 11:13 PM
@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, Ed2013-07-26 07:07 AM
My Question was stupid ;-), But at least helped to check out the solder issue on Pin54 .
Cheers, STOne-32.2013-07-28 10:56 PM
To be honest, your posting helped nothing.
Regards, Ed