EMC

The EMC API allows configuration of the external memory controller.

The EMC is usually initialized by the OS at startup using the following sample code:


Details

define EMC_VERSION

define EMC_IOC_IDENT_CHAR

define I_EMC_GETVERSION

define I_EMC_GETINFO

define I_EMC_SETATTR

define I_EMC_SETACTION

define I_EMC_TOTAL

enum emc_flag_t
  • EMC_FLAG_DISABLE
  • EMC_FLAG_ENABLE
  • EMC_FLAG_IS_SDRAM
  • EMC_FLAG_IS_PSRAM
  • EMC_FLAG_IS_SRAM
  • EMC_FLAG_IS_NOR
  • EMC_FLAG_IS_NAND
  • EMC_FLAG_IS_8B_ACCESS
  • EMC_FLAG_IS_16B_ACCESS
  • EMC_FLAG_IS_32B_ACCESS
  • EMC_FLAG_IS_AHB use only data bus without address
  • EMC_FLAG_IS_PSRAM_BANK1 use subbank BANK1 - cs0
  • EMC_FLAG_IS_PSRAM_BANK2 use subbank BANK2 - cs1
  • EMC_FLAG_IS_PSRAM_BANK3 use subbank BANK3 - cs2
  • EMC_FLAG_IS_PSRAM_BANK4 use subbank BANK4 - cs3
  • EMC_FLAG_AHB_WRITE_DATA write data throuth ahb
  • EMC_FLAG_AHB_WRITE_REG write reg throuth ahb

These are the flags for mode in emc_attr_t


struct::emc_pin_assignment_t

mcu_pin_t we

mcu_pin_t oe

mcu_pin_t bl

mcu_pin_t nadv

mcu_pin_t nwait

mcu_pin_t ncs

mcu_pin_t address

mcu_pin_t data

struct::emc_info_t

u32 o_flags

u32 o_events

u32 freq

u32 base_address

u32 size

u8 data_bus_width

u32 resd

struct::emc_attr_t

u32 o_flags

u32 base_address

u32 size

u32 freq

u32 data_or_reg

use for AHB command

u8 data_bus_width

emc_pin_assignment_t pin_assignment

u32 resd

X

Thanks for Coming!

Subscribe to news and updates