GPIO control fail on STM32F401 board.
Hi,
I bought the stm32f401 board from aliexpress.
"WeAct" print is on the back.
Seller's site do recommend the DFU method to program the board.
But, I want to use ST-Link, so I made a simple program to control gpio port. Fusing by ST-Link seems to be good, but, the gpio is not controlled.
I am familiar with STM32F10X. I did several projects using STM32F10X.
I though gpio control is simple, but not.
I am using newest SW4STM32 and ST-Link Utility.
My program is as follow:
So simple.
void main(void)
{
/* GPIOG Peripheral clock enable */
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
GPIO_InitTypeDef GPIO_InitStructure;
/* Configure PG6 and PG8 in output pushpull mode */
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_100MHz;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &GPIO_InitStructure);
GPIO_ResetBits (GPIOA, GPIO_Pin_2);
for (;;)
{
}
}
I am fusing and running program while BOOT0 pin is low.