2014-03-17 08:18 AM
Hello everybody!
I check the Stm32Cube graphical pin definition. I want to use FSMC bus SRAM1, with 16 bit bus, and 1 address bit. The address pin I want is PE3, but the cube not allowing use this. If i use 1 bit addressing only the PF0 can select for FSMC address pin. This is a bug or what? Thanks2014-03-18 02:39 AM
Hi Janos,
What part number are you selecting exactly? -Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2014-03-18 02:53 AM
Stm32f407ig controller.
2014-03-19 04:19 AM
Hi Janos,
STM32CubeMX does not support this configuration. However, you can follow the following procedure to obtain the code you want: [Note: your application will need to manage the offset introduced by using FSMC_A19 instead of FSMC_A0: when using 8 bit data, this means for example considering 0x7FFFF as the base adress and 0x8000 as the second adress.] Use STM32CubeMX and configure the FSMC for 20 bit address (pinout tab) in order to reserve the PE3 pin:Configure the Project options from the Project menu to generate peripheral initialization code as peripheral dedicated .c/.h files :
In the inc/src folders you will find the fsmc initialization code.
Modify the function HAL_FSMC_MspInit in the fsmc.c file to configure only the GPIO PE3 (i.e. comment all other GPIO initialization code) as shown in example below [Warning: this modification will be overwritten if regenerating the code with STM32CubeMX. So you should copy the code to a dedicated project folder]: