Bug with STM32H743 FMC pin and other GPIO pin with same AF12.
Hello. Get strange problem.
I am using SRAM witn NE3 that is routed to PG10 (AF12). I am also using led on PG6 ( that could be also FMC AF12 fro NE3)
For some reason if i configure GPIO prior SRAM, i can't blink LED, while i can blink led when GPIO is configured after SRAM. Is it some kind of bug or limitation of AF functions ?
I double checked, SRAM only configures PG10, and GPIO function only configures PG6.
Any ideas why it is happening ?
LED start to glow when i enable Bank3 , so that is clearcly corespoinding to SRAM pin NE3, while it is not configured in any AF mode!!! ( mode is output push pull)
// SRAM code
GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_9|GPIO_PIN_12|GPIO_PIN_15
|GPIO_PIN_14|GPIO_PIN_13|GPIO_PIN_8|GPIO_PIN_5
|GPIO_PIN_4|GPIO_PIN_3|GPIO_PIN_2|GPIO_PIN_0
|GPIO_PIN_1;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
LED GPIO EN code
GPIO_InitTypeDef GPIO_InitStruct;
__HAL_RCC_GPIOG_CLK_ENABLE();
GPIO_InitStruct.Pin = GPIO_PIN_6;
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
And yes, if i check pin with scope, I have FMC_CS3 on PG10 and PG6 pins, even if PG6 is not configured !
But, if i configure GPIO after SRAM, it looks like everything is working as it should. I just don't like that i have to account for this problem, by calling functions in special sequence....
