2018-01-01 01:31 PM
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
#stm32f4 #pa5-gpio #pa52018-01-01 04:03 PM
Try not loading the pin, PA5 should work normally. Make sure you are looking at the right pin.
Toggle the pin in a loop, and review with scope.
I don't see any solder bridges being an issue.
Make sure the code in question is actually executed, and inspect RCC and GPIO peripherals in debugger view.
2018-01-02 12:12 AM
After your code has started, Stop the debugger and inspect the GPIO register values to make sure everything look fine.
Sometime, SW bug are obvious mistypings.
2018-01-02 05:57 AM
Thank you for the reply. I found the problem via debug. The problem is that this problem is happening when another library I use uses that pin.