PDL for FM4  Version1.2
Peripheral Driverl Library for FM4
extif.h File Reference
#include "pdl.h"
Include dependency graph for extif.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stc_extif_arrays
 Definition of MODE, TIM, AREA, ATIM register arrays. More...
 
struct  stc_extif_area_config
 Extif area configuration. More...
 
struct  stc_extif_intern_data
 EXTIF Error Interrupt Callback Pointers. More...
 

Macros

#define EXTIF   (*((stc_extif_arrays_t *) FM4_EXBUS_BASE))
 
#define EXITIF_NAND_ALE_OFFSET   0x00003000ul
 Address offset for MNALE assert until write. More...
 
#define EXITIF_NAND_ADDR_OFFSET   0x00002000ul
 Address offset for address cycle (+ MNALE) More...
 
#define EXITIF_NAND_CMD_OFFSET   0x00001000ul
 Address offset for command cycle (+ MNCLE) More...
 
#define EXITIF_NAND_DATA_OFFSET   0x00000000ul
 Address offset for data read/write. More...
 
#define Extif_Nand_SetCommand(base, cmd)   {*(volatile unsigned char*)((base) + EXITIF_NAND_CMD_OFFSET) = (unsigned char)(cmd);}
 Sets a NAND command cycle. More...
 
#define Extif_Nand_SetAddress(base, addr)   {*(volatile unsigned char*)((base) + EXITIF_NAND_ADDR_OFFSET) = (unsigned char)(addr);}
 Sets a NAND address cycle. More...
 
#define Extif_Nand_ReadData(base)   (*(volatile unsigned char*)((base) + EXITIF_NAND_DATA_OFFSET))
 Reads NAND data. More...
 
#define Extif_Nand_WriteData(base, data)   {*(volatile unsigned char*)((base) + EXITIF_NAND_DATA_OFFSET) = (unsigned char)(data);}
 Writes NAND data. More...
 
#define Extif_Nand_ClearAle(base)   {*(volatile unsigned char*)((base) + EXITIF_NAND_ALE_OFFSET) = (unsigned char)0;}
 De-asserts MNALE signal. More...
 

Typedefs

typedef struct stc_extif_arrays stc_extif_arrays_t
 Definition of MODE, TIM, AREA, ATIM register arrays. More...
 
typedef enum en_extif_width en_extif_width_t
 Extif data width. More...
 
typedef enum en_extif_cycle en_extif_cycle_t
 Extif cycle defintion. More...
 
typedef enum en_extif_mask en_extif_mask_t
 Extif mask setup (area size) More...
 
typedef enum en_extif_cas en_extif_cas_t
 Extif CAS address select. More...
 
typedef enum en_extif_ras en_extif_ras_t
 Extif RAS address select. More...
 
typedef enum en_extif_bas en_extif_bas_t
 Extif BAS address select. More...
 
typedef struct
stc_extif_area_config 
stc_extif_area_config_t
 Extif area configuration. More...
 
typedef struct
stc_extif_intern_data 
stc_extif_intern_data_t
 EXTIF Error Interrupt Callback Pointers. More...
 

Enumerations

enum  en_extif_width {
  Extif8Bit = 0,
  Extif16Bit = 1
}
 Extif data width. More...
 
enum  en_extif_cycle {
  Extif0Cycle = 0,
  Extif1Cycle = 1,
  Extif2Cycle = 2,
  Extif3Cycle = 3,
  Extif4Cycle = 4,
  Extif5Cycle = 5,
  Extif6Cycle = 6,
  Extif7Cycle = 7,
  Extif8Cycle = 8,
  Extif9Cycle = 9,
  Extif10Cycle = 10,
  Extif11Cycle = 11,
  Extif12Cycle = 12,
  Extif13Cycle = 13,
  Extif14Cycle = 14,
  Extif15Cycle = 15,
  Extif16Cycle = 16,
  ExtifDisabled = 17
}
 Extif cycle defintion. More...
 
enum  en_extif_mask {
  Extif1MB = 0,
  Extif2MB = 1,
  Extif4MB = 2,
  Extif8MB = 3,
  Extif16MB = 4,
  Extif32MB = 5,
  Extif64MB = 6,
  Extif128MB = 7
}
 Extif mask setup (area size) More...
 
enum  en_extif_cas {
  ExtifCas16Bit = 0,
  ExtifCas32Bit = 1
}
 Extif CAS address select. More...
 
enum  en_extif_ras {
  ExtifRas_19_6 = 0,
  ExtifRas_20_7 = 1,
  ExtifRas_21_8 = 2,
  ExtifRas_22_9 = 3,
  ExtifRas_23_10 = 4,
  ExtifRas_24_11 = 5,
  ExtifRas_25_12 = 6
}
 Extif RAS address select. More...
 
enum  en_extif_bas {
  ExtifBas_20_19 = 0,
  ExtifBas_21_20 = 1,
  ExtifBas_22_21 = 2,
  ExtifBas_23_22 = 3,
  ExtifBas_24_23 = 4,
  ExtifBas_25_24 = 5,
  ExtifBas_26_25 = 6
}
 Extif BAS address select. More...
 

Functions

void ExtifIrqHandler (void)
 External Bus Interface Error Interrupt Service Routine. More...
 
en_result_t Extif_InitArea (uint8_t u8Area, stc_extif_area_config_t *pstcConfig)
 Setup (init) an EXT-I/F area. More...
 
en_result_t Extif_ReadErrorStatus (void)
 Read Error Status Register. More...
 
uint32_t Extif_ReadErrorAddress (void)
 Read Error Address Register. More...
 
en_result_t Extif_ClearErrorStatus (void)
 Clear Error Status Register. More...
 
en_result_t Extif_CheckSdcmdReady (void)
 Check SDRAM command register is ready. More...
 
en_result_t Extif_SetSdramCommand (uint16_t u16Address, boolean_t bMsdwex, boolean_t bMcasx, boolean_t bMrasx, boolean_t bMcsx8, boolean_t bMadcke)
 Set a SDRAM command. More...
 

Detailed Description

Headerfile for EXTIF functions

History:

  • 2013-04-16 1.0 MWi First version.

Definition in file extif.h.