AnsweredAssumed Answered

How to use PA5 as gpio?

Question asked by Mucit23 on Jan 1, 2018
Latest reply on Jan 2, 2018 by Mucit23

Hi

 

I'm using STM32F429I Discovery Board. I need to use the PA5 pin as gpio. But I did not get any output from the PA5 pin.

The PA5 pin appears as an unused pin. 

GPIO_InitTypeDef GPIO_InitStructure;

RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
/* Configure PA5 Buzzer as output push-pull */

GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &GPIO_InitStructure);

 

GPIO_SetBits(GPIOA,GPIO_Pin_5);

 

These init codes are not working. What is the problem? Is there another feature of this pin?

 

Thanks

Outcomes