CARME-M4 BSP  V1.5
NOR/SRAM Controller functions

NOR/SRAM Controller functions. More...

+ Collaboration diagram for NOR/SRAM Controller functions:

Functions

void FSMC_NORSRAMDeInit (uint32_t FSMC_Bank)
 De-initializes the FSMC NOR/SRAM Banks registers to their default reset values. More...
 
void FSMC_NORSRAMInit (FSMC_NORSRAMInitTypeDef *FSMC_NORSRAMInitStruct)
 Initializes the FSMC NOR/SRAM Banks according to the specified parameters in the FSMC_NORSRAMInitStruct. More...
 
void FSMC_NORSRAMStructInit (FSMC_NORSRAMInitTypeDef *FSMC_NORSRAMInitStruct)
 Fills each FSMC_NORSRAMInitStruct member with its default value. More...
 
void FSMC_NORSRAMCmd (uint32_t FSMC_Bank, FunctionalState NewState)
 Enables or disables the specified NOR/SRAM Memory Bank. More...
 

Detailed Description

NOR/SRAM Controller functions.

 ===============================================================================
                    ##### NOR and SRAM Controller functions #####
 ===============================================================================  

 [..] The following sequence should be followed to configure the FSMC to interface
      with SRAM, PSRAM, NOR or OneNAND memory connected to the NOR/SRAM Bank:
 
   (#) Enable the clock for the FSMC and associated GPIOs using the following functions:
          RCC_AHB3PeriphClockCmd(RCC_AHB3Periph_FSMC, ENABLE);
          RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOx, ENABLE);

   (#) FSMC pins configuration 
       (++) Connect the involved FSMC pins to AF12 using the following function 
            GPIO_PinAFConfig(GPIOx, GPIO_PinSourcex, GPIO_AF_FSMC); 
       (++) Configure these FSMC pins in alternate function mode by calling the function
            GPIO_Init();    
       
   (#) Declare a FSMC_NORSRAMInitTypeDef structure, for example:
          FSMC_NORSRAMInitTypeDef  FSMC_NORSRAMInitStructure;
      and fill the FSMC_NORSRAMInitStructure variable with the allowed values of
      the structure member.
      
   (#) Initialize the NOR/SRAM Controller by calling the function
          FSMC_NORSRAMInit(&FSMC_NORSRAMInitStructure); 

   (#) Then enable the NOR/SRAM Bank, for example:
          FSMC_NORSRAMCmd(FSMC_Bank1_NORSRAM2, ENABLE);  

   (#) At this stage you can read/write from/to the memory connected to the NOR/SRAM Bank. 

Function Documentation

void FSMC_NORSRAMCmd ( uint32_t  FSMC_Bank,
FunctionalState  NewState 
)

Enables or disables the specified NOR/SRAM Memory Bank.

Parameters
FSMC_Bankspecifies the FSMC Bank to be used This parameter can be one of the following values:
  • FSMC_Bank1_NORSRAM1: FSMC Bank1 NOR/SRAM1
  • FSMC_Bank1_NORSRAM2: FSMC Bank1 NOR/SRAM2
  • FSMC_Bank1_NORSRAM3: FSMC Bank1 NOR/SRAM3
  • FSMC_Bank1_NORSRAM4: FSMC Bank1 NOR/SRAM4
NewStatenew state of the FSMC_Bank. This parameter can be: ENABLE or DISABLE.
Return values
None

Definition at line 273 of file stm32f4xx_fsmc.c.

+ Here is the caller graph for this function:

void FSMC_NORSRAMDeInit ( uint32_t  FSMC_Bank)

De-initializes the FSMC NOR/SRAM Banks registers to their default reset values.

Parameters
FSMC_Bankspecifies the FSMC Bank to be used This parameter can be one of the following values:
  • FSMC_Bank1_NORSRAM1: FSMC Bank1 NOR/SRAM1
  • FSMC_Bank1_NORSRAM2: FSMC Bank1 NOR/SRAM2
  • FSMC_Bank1_NORSRAM3: FSMC Bank1 NOR/SRAM3
  • FSMC_Bank1_NORSRAM4: FSMC Bank1 NOR/SRAM4
Return values
None

Definition at line 121 of file stm32f4xx_fsmc.c.

+ Here is the caller graph for this function:

void FSMC_NORSRAMInit ( FSMC_NORSRAMInitTypeDef FSMC_NORSRAMInitStruct)

Initializes the FSMC NOR/SRAM Banks according to the specified parameters in the FSMC_NORSRAMInitStruct.

Parameters
FSMC_NORSRAMInitStruct: pointer to a FSMC_NORSRAMInitTypeDef structure that contains the configuration information for the FSMC NOR/SRAM specified Banks.
Return values
None

Definition at line 148 of file stm32f4xx_fsmc.c.

+ Here is the caller graph for this function:

void FSMC_NORSRAMStructInit ( FSMC_NORSRAMInitTypeDef FSMC_NORSRAMInitStruct)

Fills each FSMC_NORSRAMInitStruct member with its default value.

Parameters
FSMC_NORSRAMInitStructpointer to a FSMC_NORSRAMInitTypeDef structure which will be initialized.
Return values
None

Definition at line 230 of file stm32f4xx_fsmc.c.