2017-07-30 02:36 AM
Hi everybody,
my CubeMX project and the code generated are attached.
GPIO is initialized as bellow:
static void MX_GPIO_Init(void)
{/* GPIO Ports Clock Enable */
__HAL_RCC_GPIOG_CLK_ENABLE(); __HAL_RCC_GPIOE_CLK_ENABLE(); __HAL_RCC_GPIOD_CLK_ENABLE(); __HAL_RCC_GPIOA_CLK_ENABLE(); __HAL_RCC_GPIOB_CLK_ENABLE();}
there is no any configuration relating to FSMC.
Regards, Rasool
#stm32 #fsmc #cubemx #cubeSolved! Go to Solution.
2017-07-30 03:24 AM
wrong!
the GPIOs are initialized in STM32F4xx_hal_msp.c file and called by HAL_SRAM_Init() function in the main.c
2017-07-30 03:24 AM
wrong!
the GPIOs are initialized in STM32F4xx_hal_msp.c file and called by HAL_SRAM_Init() function in the main.c
2017-07-30 09:01 AM
CubeMX hides and abstracts things in ways I often find unhelpful.
Generally I want to enable all my clocks early on, then the pins, then the peripherals. This is less prone to error and interplay/sequencing than trying to do them all over the place and immediately prior to configuration for individual interfaces/peripherals. Makes it easier to reorder initialization code, and reduces chance of breaking one interface while initializing another, or merging functionality from multiple examples.