cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F7 Discovery Benchmark project - adding OTG_FS_PowerSwitchOn toggling problem

ilde
Associate
Posted on June 09, 2016 at 17:44

Hi everyone, i'm trying to start playing with STM32F7 Discovery board, taking as base the benchmark project and modifying it. i did the following modification in stm32f746g_discovery.c:

GPIO_InitTypeDef GPIO_Init_Structure;

GPIO_Init_Structure.Mode = GPIO_MODE_OUTPUT_PP;

GPIO_Init_Structure.Pull = GPIO_NOPULL;

GPIO_Init_Structure.Speed = GPIO_SPEED_HIGH;

/*GPIO_Init_Structure.Alternate = GPIO_AF12_FMC;*/

/* GPIOD configuration */

GPIO_Init_Structure.Pin = GPIO_PIN_1 | GPIO_PIN_5;

HAL_GPIO_Init(GPIOI, &GPIO_Init_Structure);

in main, i added the following:

if (BSP_PB_GetState(BUTTON_KEY)) {

HAL_GPIO_WritePin(GPIOD,GPIO_PIN_5,GPIO_PIN_SET);

}

else {

HAL_GPIO_WritePin(GPIOD,GPIO_PIN_5,GPIO_PIN_RESET);

}

i can see in the, debbuging sesion, GPIOD ODR pin 5 going up and down, but the physical pin (OTG_FS_PowerSwitchOn) remains up without toggling.

any clue why is this?

thanks in advance

0 REPLIES 0