NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

StarterWare EMIFA

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

The EMIFA (External Memory Interface A) peripheral provides a means for the CPU to read and write external memory devices such as NAND flash, NOR flash, SDRAM, and ASRAM. By configuring bit fields in the EMIFA registers, applications can access various types of memory devices. EMIFA includes an error correction code (ECC) module that can be used to calculate the ECC for writing and reading from the NAND flash. EMIFA supports multiple ECC algorithms, including Hamming code 1 Bit and 4 Bit.

Programming[edit]

The following procedures can be used to access different devices from EMIFA using StarterWare APIs.

NAND Flash Access Via EMIFA[edit]

Basic Read/Write Access[edit]

  • Set the chip select for NAND using EMIFANANDCSSet().
  • Set the maximum extended wait cycles using EMIFAMaxExtWaitCycleSet().
  • Select the wait pin using EMIFACSWaitPinSelect().
  • Select the polarity for the wait pin using EMIFAWaitPinPolaritySet().
  • Enable/Disable the interrupts using EMIFAMskedIntDisable() and EMIFAMskedIntEnable().
  • Set the timing for NAND access using EMIFA_ASYNC_WAITTIME_CONFIG macro and EMIFAWaitTimingConfig().
  • Select the bus width using EMIFAAsyncDevDataBusWidthSelect().

The above initialization allows applications to access NAND flash for read/write operations using commands (i.e. opcodes) appropriate for the specific NAND device.

Read/Write Access With ECC[edit]

To enable ECC for read/write operations, the following additional steps are necessary.

  • Set the chip select for NAND (with ECC) using EMIFANANDCSSet().
  • Initialize the ECC calculation using EMIFANANDECCStart().
  • Read the calculated ECC value using EMIFANANDEccValGet().
  • Load the ECC value calculated after read using EMIFANAND4BitECCLoad().
  • Read the syndrome value using EMIFANANDEccValGet() for 4-bit Hamming code ECC.
  • If syndrome value is non-zero, then there are ECC errors. The following steps can pin point the error location:
    • Start the ECC error address calculation using EMIFANAND4BitECCAddrCalcStart().
    • Run the error address calculation using EMIFANAND4BitECCStateGet().
    • Read the number of ECC errors using EMIFANAND4BitECCNumOfErrsGet().
    • Read the error address and error value using EMIFANAND4BitEccErrAddrGet() and EMIFANAND4BitEccErrValGet().
    • Correct the error.
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article StarterWare EMIFA here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article StarterWare EMIFA here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article StarterWare EMIFA here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article StarterWare EMIFA here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article StarterWare EMIFA here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article StarterWare EMIFA here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article StarterWare EMIFA here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article StarterWare EMIFA here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article StarterWare EMIFA here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity