Functions
EMIF4F Functions
EMIF4F

Functions

CSL_IDEF_INLINE void CSL_EMIF4F_GetModuleInfo (Uint8 *moduleID, Uint8 *rtlInfo, Uint8 *majRev, Uint8 *minRev)
CSL_IDEF_INLINE Bool CSL_EMIF4F_IsBigEndian ()
CSL_IDEF_INLINE Bool CSL_EMIF4F_IsAsynchronous ()
CSL_IDEF_INLINE Bool CSL_EMIF4F_IsDDRPhyRead ()
CSL_IDEF_INLINE void CSL_EMIF4F_GetSDRAMConfig (EMIF4F_SDRAM_CONFIG *ptrConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_SetSDRAMConfig (EMIF4F_SDRAM_CONFIG *ptrConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_DisableInitRefresh (void)
CSL_IDEF_INLINE void CSL_EMIF4F_EnableInitRefresh (void)
CSL_IDEF_INLINE Uint16 CSL_EMIF4F_GetRefreshRate (void)
CSL_IDEF_INLINE void CSL_EMIF4F_SetRefreshRate (Uint16 refreshRate)
CSL_IDEF_INLINE void CSL_EMIF4F_GetTiming1Config (EMIF4F_TIMING1_CONFIG *ptrTimingConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_SetTiming1Config (EMIF4F_TIMING1_CONFIG *ptrTimingConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_GetPowerMgmtConfig (EMIF4F_PWR_MGMT_CONFIG *ptrPwrMgmtConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_SetPowerMgmtConfig (EMIF4F_PWR_MGMT_CONFIG *ptrPwrMgmtConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_GetVBUSConfig (Uint8 *cosCount1, Uint8 *cosCount2, Uint8 *prOldCount)
CSL_IDEF_INLINE void CSL_EMIF4F_SetVBUSConfig (Uint8 cosCount1, Uint8 cosCount2, Uint8 prOldCount)
CSL_IDEF_INLINE void CSL_EMIF4F_GetVBUSConfigValues (EMIF4F_VBUS_CONFIG_VALUE *ptrVBUSConfigValue)
CSL_IDEF_INLINE void CSL_EMIF4F_GetIODFTControl (EMIF4F_IODFT_CONTROL *ptrIODFTControl)
CSL_IDEF_INLINE void CSL_EMIF4F_SetIODFTControl (EMIF4F_IODFT_CONTROL *ptrIODFTControl)
CSL_IDEF_INLINE void CSL_EMIF4F_GetIODFTControlResults (Uint16 *dqmTLMRResults, Uint16 *ctlTLMRResults)
CSL_IDEF_INLINE void CSL_EMIF4F_GetIODFTAddrResults (Uint32 *addrTLMRResults)
CSL_IDEF_INLINE void CSL_EMIF4F_GetIODFTDataResults (Uint32 *dataTLMRResults1, Uint32 *dataTLMRResults2, Uint32 *dataTLMRResults3, Uint32 *dataTLMRResults4, Uint32 *dataTLMRResults5)
CSL_IDEF_INLINE void CSL_EMIF4F_GetPerfCounters (Uint32 *perfCounter1, Uint32 *perfCounter2)
CSL_IDEF_INLINE void CSL_EMIF4F_GetPerfCounterConfig (Uint8 counter, EMIF4F_PERF_CONFIG *ptrPerfCounterConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_SetPerfCounterConfig (Uint8 counter, EMIF4F_PERF_CONFIG *ptrPerfCounterConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_GetPerfCounterMasterRegion (Uint8 counter, Uint8 *mstID, Uint8 *regionSel)
CSL_IDEF_INLINE void CSL_EMIF4F_SetPerfCounterMasterRegion (Uint8 counter, Uint8 mstID, Uint8 regionSel)
CSL_IDEF_INLINE Uint32 CSL_EMIF4F_GetPerfCounterTime (void)
CSL_IDEF_INLINE void CSL_EMIF4F_GetInterruptRawStatus (Uint8 *rawStatus)
CSL_IDEF_INLINE void CSL_EMIF4F_SetInterruptRawStatus (Uint8 rawStatus)
CSL_IDEF_INLINE void CSL_EMIF4F_GetInterruptStatus (Uint8 *intrStatus)
CSL_IDEF_INLINE void CSL_EMIF4F_ClearInterruptStatus (Uint8 intrStatus)
CSL_IDEF_INLINE void CSL_EMIF4F_EnableInterrupts (Uint8 intrStatus)
CSL_IDEF_INLINE void CSL_EMIF4F_DisableInterrupts (Uint8 intrStatus)
CSL_IDEF_INLINE void CSL_EMIF4F_GetOutputImpedanceConfig (EMIF4F_OUTPUT_IMP_CONFIG *ptrOutputImpedanceConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_SetOutputImpedanceConfig (EMIF4F_OUTPUT_IMP_CONFIG *ptrOutputImpedanceConfig)
CSL_IDEF_INLINE void CSL_EMIF4F_GetErrorLog (Uint8 *errCRSel, Uint8 *errAddMode, Uint8 *errCmdType, Uint8 *errMstID)
CSL_IDEF_INLINE void CSL_EMIF4F_GetPriorityToCOSMapping (EMIF4_PRI_COS_MAPPING *ptrPriCosMapper)
CSL_IDEF_INLINE void CSL_EMIF4F_SetPriorityToCOSMapping (EMIF4_PRI_COS_MAPPING *ptrPriCosMapper)
CSL_IDEF_INLINE void CSL_EMIF4F_GetMstIDToCos1Mapping (EMIF4_MSTID_COS_MAPPING *ptrMstIDCosMapper)
CSL_IDEF_INLINE void CSL_EMIF4F_SetMstIDToCos1Mapping (EMIF4_MSTID_COS_MAPPING *ptrMstIDCosMapper)
CSL_IDEF_INLINE void CSL_EMIF4F_GetMstIDToCos2Mapping (EMIF4_MSTID_COS_MAPPING *ptrMstIDCosMapper)
CSL_IDEF_INLINE void CSL_EMIF4F_SetMstIDToCos2Mapping (EMIF4_MSTID_COS_MAPPING *ptrMstIDCosMapper)
CSL_IDEF_INLINE void CSL_EMIF4F_GetECCControl (EMIF4_ECC_CONTROL *ptrECCControl)
CSL_IDEF_INLINE void CSL_EMIF4F_SetECCControl (EMIF4_ECC_CONTROL *ptrECCControl)
CSL_IDEF_INLINE void CSL_EMIF4F_GetECCAddressRange (Uint8 range, Uint16 *endAddr, Uint16 *startAddr)
CSL_IDEF_INLINE void CSL_EMIF4F_SetECCAddressRange (Uint8 range, Uint16 endAddr, Uint16 startAddr)
CSL_IDEF_INLINE void CSL_EMIF4F_GetReadWriteThreshold (Uint8 *wrThreshold, Uint8 *rdThreshold)
CSL_IDEF_INLINE void CSL_EMIF4F_SetReadWriteThreshold (Uint8 wrThreshold, Uint8 rdThreshold)

Function Documentation

CSL_IDEF_INLINE void CSL_EMIF4F_ClearInterruptStatus ( Uint8  intrStatus)

============================================================================
CSL_EMIF4F_ClearInterruptStatus

Description
The function is used to clear the interrupt status

Arguments

        intrStatus       Interrupt Status populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_IRQSTATUS_SYS

Example

        Uint8   intrStatus;

        // Get the Interrupt Status
        CSL_EMIF4F_GetInterruptRawStatus (&intrStatus);
        ...
        // Process the interrupts
        ...
        // Clear the Interrupts
        CSL_EMIF4F_ClearInterruptStatus (intrStatus);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_DisableInitRefresh ( void  )

============================================================================
CSL_EMIF4F_DisableInitRefresh

Description
The function is used to disable the initialization and refresh.

Arguments

         None
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_SDRAM_REF_CTRL_REG_INITREF_DIS=1

Example


        // Disable Initialization & Refresh
        CSL_EMIF4F_DisableInitRefresh();

     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_DisableInterrupts ( Uint8  intrStatus)

============================================================================
CSL_EMIF4F_DisableInterrupts

Description
The function is used to disable interrupts

Arguments

        intrFlag       Interrupt flag for interrupts to be disabled
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_IRQENABLE_CLR_SYS

Example


        // Disable address error interrupt 
        CSL_EMIF4F_DisableInterrupts (0x1);

     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_EnableInitRefresh ( void  )

============================================================================
CSL_EMIF4F_EnableInitRefresh

Description
The function is used to enable the initialization and refresh.

Arguments

         None
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_SDRAM_REF_CTRL_REG_INITREF_DIS=0

Example


        // Enable Initialization & Refresh
        CSL_EMIF4F_EnableInitRefresh();

     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_EnableInterrupts ( Uint8  intrStatus)

============================================================================
CSL_EMIF4F_EnableInterrupts

Description
The function is used to enable interrupts

Arguments

        intrFlag       Interrupt flag for interrupts to be enabled
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_IRQENABLE_SET_SYS

Example


        // Enable address error interrupt 
        CSL_EMIF4F_EnableInterrupts (0x1);

     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetECCAddressRange ( Uint8  range,
Uint16 *  endAddr,
Uint16 *  startAddr 
)

============================================================================
CSL_EMIF4F_GetECCAddressRange

Description
The function is used to get the ECC Address Range

Arguments

        range           Address Range for which start and end address are required
        endAddr         End Address
        startAddr       Start Address
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_ECC_ADDR_RNG_1_REG_ECC_END_ADDR_1, EMIF4FV_ECC_ADDR_RNG_1_REG_ECC_STRT_ADDR_1; EMIF4FV_ECC_ADDR_RNG_2_REG_ECC_END_ADDR_2, EMIF4FV_ECC_ADDR_RNG_2_REG_ECC_STRT_ADDR_2

Example

        Uint16  endAddr;
        Uint16  startAddr;

        // Get the ECC Address Range1
        CSL_EMIF4F_GetECCAddressRange (1, &endAddr, &startAddr);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetECCControl ( EMIF4_ECC_CONTROL ptrECCControl)

============================================================================
CSL_EMIF4F_GetECCControl

Description
The function is used to get the ECC Control Information

Arguments

        ptrECCControl       ECC Control Configuration
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_ECC_CTRL_REG_ECC_EN, EMIF4FV_ECC_CTRL_REG_ECC_ADDR_RNG_PROT, EMIF4FV_ECC_CTRL_REG_ECC_ADDR_RNG_2_EN, EMIF4FV_ECC_CTRL_REG_ECC_ADDR_RNG_1_EN

Example

        EMIF4_ECC_CONTROL eccControl;

        // Get the ECC Control Configuration
        CSL_EMIF4F_GetECCControl (&eccControl);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetErrorLog ( Uint8 *  errCRSel,
Uint8 *  errAddMode,
Uint8 *  errCmdType,
Uint8 *  errMstID 
)

============================================================================
CSL_EMIF4F_GetErrorLog

Description
The function is used to get the error log

Arguments

        errCRSel    CRSel for the first errored transaction populated by this API
        errAddMode  Addressing Mode populated by this API
        errCmdType  Command Type of the first errored transaction populated by this API
        errMstID    Master ID of the first errored transaction populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_VBUSM_ERR_LOG_REG_CRSEL,EMIF4FV_VBUSM_ERR_LOG_REG_CAMODE, EMIF4FV_VBUSM_ERR_LOG_REG_CDIR, EMIF4FV_VBUSM_ERR_LOG_REG_CMSTID

Example

        Uint8  errCRSel;
        Uint8  errAddMode;
        Uint8  errCmdType;
        Uint8  errMstID;

        // Get the Error Log 
        CSL_EMIF4F_GetErrorLog (&errCRSel, &errAddMode, &errCmdType, &errMstID);

     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetInterruptRawStatus ( Uint8 *  rawStatus)

============================================================================
CSL_EMIF4F_GetInterruptRawStatus

Description
The function is used to get the interrupt RAW status

Arguments

        rawStatus       Raw Interrupt Status populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_IRQSTATUS_RAW_SYS

Example

        Uint8   rawStatus;

        // Get the Interrupt RAW Status
        CSL_EMIF4F_GetInterruptRawStatus (&rawStatus);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetInterruptStatus ( Uint8 *  intrStatus)

============================================================================
CSL_EMIF4F_GetInterruptStatus

Description
The function is used to get the interrupt status

Arguments

        intrStatus       Interrupt Status populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_IRQSTATUS_SYS

Example

        Uint8   intrStatus;

        // Get the Interrupt Status
        CSL_EMIF4F_GetInterruptStatus (&intrStatus);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetIODFTAddrResults ( Uint32 *  addrTLMRResults)

============================================================================
CSL_EMIF4F_GetIODFTAddrResults

Description
The function is used to get the IODFT Address results.

Arguments

        addrTLMRResults      Addr TLMR Results populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_IODFT_ADDR_MISR_RSLT_REG_ADDR_TLMR

Example

        Uint32     addrTLMRResults;

        // Get the IODFT Address results
        CSL_EMIF4F_GetIODFTAddrResults(&addrTLMRResults);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetIODFTControl ( EMIF4F_IODFT_CONTROL ptrIODFTControl)

============================================================================
CSL_EMIF4F_GetIODFTControl

Description
The function is used to get the IODFT Control configuration

Arguments

        ptrIODFTControl      IODFT Control Configuration populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_IODFT_TLGC_REG_TLEC, EMIF4FV_IODFT_TLGC_REG_MT, EMIF4FV_IODFT_TLGC_REG_ACT_CAP_EN,EMIF4FV_IODFT_TLGC_REG_OPG_LD, EMIF4FV_IODFT_TLGC_REG_MMS, EMIF4FV_IODFT_TLGC_REG_MC, EMIF4FV_IODFT_TLGC_REG_PC

Example

        EMIF4F_IODFT_CONTROL     IODFTcontrol;

        // Get the IODFT Configuration values
        CSL_EMIF4F_GetIODFTControl(&IODFTcontrol);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetIODFTControlResults ( Uint16 *  dqmTLMRResults,
Uint16 *  ctlTLMRResults 
)

============================================================================
CSL_EMIF4F_GetIODFTControlResults

Description
The function is used to get the IODFT Control results.

Arguments

        dqmTLMRResults      DQM TLMR Results populated by this API
        ctlTLMRResults      CTL TLMR Results populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_IODFT_CTRL_MISR_RSLT_REG_DQM_TLMR, EMIF4FV_IODFT_CTRL_MISR_RSLT_REG_CTL_TLMR

Example

        Uint16     dqmTLMRResults;
        Uint16     ctlTLMRResults;

        // Get the IODFT Control Results
        CSL_EMIF4F_GetIODFTControlResults(&dqmTLMRResults, &ctlTLMRResults);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetIODFTDataResults ( Uint32 *  dataTLMRResults1,
Uint32 *  dataTLMRResults2,
Uint32 *  dataTLMRResults3,
Uint32 *  dataTLMRResults4,
Uint32 *  dataTLMRResults5 
)

============================================================================
CSL_EMIF4F_GetIODFTDataResults

Description
The function is used to get the IODFT Data results.

Arguments

        dataTLMRResults1      Data TLMR1 Results populated by this API
        dataTLMRResults2      Data TLMR2 Results populated by this API
        dataTLMRResults3      Data TLMR3 Results populated by this API
        dataTLMRResults4      Data TLMR4 Results populated by this API
        dataTLMRResults5      Data TLMR5 Results populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_IODFT_DATA_MISR_RSLT_1,EMIF4FV_IODFT_DATA_MISR_RSLT_2, EMIF4FV_IODFT_DATA_MISR_RSLT_3,EMIF4FV_IODFT_DATA_MISR_RSLT_4, EMIF4FV_IODFT_DATA_MISR_RSLT_5

Example

        Uint32     dataTLMRResults1;
        Uint32     dataTLMRResults2;
        Uint32     dataTLMRResults3;
        Uint32     dataTLMRResults4;
        Uint32     dataTLMRResults5;

        // Get the IODFT Data results
        CSL_EMIF4F_GetIODFTDataResults(&dataTLMRResults1, &dataTLMRResults2, 
                                      &dataTLMRResults3, &dataTLMRResults4, 
                                      &dataTLMRResults5);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetModuleInfo ( Uint8 *  moduleID,
Uint8 *  rtlInfo,
Uint8 *  majRev,
Uint8 *  minRev 
)

============================================================================
CSL_EMIF4F_GetModuleInfo

Description
This function reads the peripheral ID register which identifies the module id, RTL version information etc.

Arguments

          moduleID     Module Id Information populated by this API
          rtlInfo      RTL Version Information populated by this API
          majRev       Major Revision Information populated by this API
          minRev       Minor Revision Information populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_EMIF_MOD_ID_REV_REG_MODULE_ID,EMIF4FV_EMIF_MOD_ID_REV_REG_RTL_VERSION, EMIF4FV_EMIF_MOD_ID_REV_REG_MAJOR_REVISION,EMIF4FV_EMIF_MOD_ID_REV_REG_MINOR_REVISION

Example

        Uint8   moduleID;
        Uint8   rtlInfo;
        Uint8   majRev;
        Uint8   minRev;

        // Get the EMIF4F Module Information.
        CSL_EMIF4F_GetModuleInfo (&moduleID, &rtlInfo, &majRev, &minRev);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetMstIDToCos1Mapping ( EMIF4_MSTID_COS_MAPPING ptrMstIDCosMapper)

============================================================================
CSL_EMIF4F_GetMstIDToCos1Mapping

Description
The function is used to get the master id to Class of Service 1 mapping

Arguments

        ptrMstIDCosMapper       Master ID to COS Mapping configuration
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_MSTID_COS_1_MAP_REG_MSTID_COS_1_MAP_EN, EMIF4FV_MSTID_COS_1_MAP_REG_MSTID_1_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSK_1_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSTID_2_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSK_2_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSTID_3_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSK_3_COS_1

Example

        EMIF4_MSTID_COS_MAPPING mstIDCosMapper;

        // Get the Master ID to COS1 Mapper information
        CSL_EMIF4F_GetMstIDToCos1Mapping (&mstIDCosMapper);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetMstIDToCos2Mapping ( EMIF4_MSTID_COS_MAPPING ptrMstIDCosMapper)

============================================================================
CSL_EMIF4F_GetMstIDToCos2Mapping

Description
The function is used to get the master id to Class of Service 2 mapping

Arguments

        ptrMstIDCosMapper       Master ID to COS Mapping configuration
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_MSTID_COS_2_MAP_REG_MSTID_COS_2_MAP_EN, EMIF4FV_MSTID_COS_2_MAP_REG_MSTID_1_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSK_1_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSTID_2_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSK_2_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSTID_3_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSK_3_COS_2

Example

        EMIF4_MSTID_COS_MAPPING mstIDCosMapper;

        // Get the Master ID to COS2 Mapper information
        CSL_EMIF4F_GetMstIDToCos2Mapping (&mstIDCosMapper);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetOutputImpedanceConfig ( EMIF4F_OUTPUT_IMP_CONFIG ptrOutputImpedanceConfig)

============================================================================
CSL_EMIF4F_GetOutputImpedanceConfig

Description
The function is used to get the Output Impedance Calibrartion configuration

Arguments

        ptrOutputImpedanceConfig    Output Impedance Calibrartion configuration 
                                    populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_ZQ_CONFIG_REG_ZQ_CS1EN, EMIF4FV_ZQ_CONFIG_REG_ZQ_CS0EN, EMIF4FV_ZQ_CONFIG_REG_ZQ_DUALCALEN, EMIF4FV_ZQ_CONFIG_REG_ZQ_SFEXITEN, EMIF4FV_ZQ_CONFIG_REG_ZQ_ZQCL_MULT, EMIF4FV_ZQ_CONFIG_REG_ZQ_REFINTERVAL

Example

        EMIF4F_OUTPUT_IMP_CONFIG outputImpConfig; 

        // Get the output impedance configuration
        CSL_EMIF4F_GetOutputImpedanceConfig (&outputImpConfig);

     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetPerfCounterConfig ( Uint8  counter,
EMIF4F_PERF_CONFIG ptrPerfCounterConfig 
)

============================================================================
CSL_EMIF4F_GetPerfCounterConfig

Description
The function is used to get the configuration for performance counters

Arguments

        counter                 Perf Counter for which configuration is required (1 or 2)
        ptrPerfCounterConfig    Performance Counter Configuration populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_PERF_CNT_CFG_REG_CNTR2_MSTID_EN, EMIF4FV_PERF_CNT_CFG_REG_CNTR2_REGION_EN, EMIF4FV_PERF_CNT_CFG_REG_CNTR2_CFG; EMIF4FV_PERF_CNT_CFG_REG_CNTR1_MSTID_EN, EMIF4FV_PERF_CNT_CFG_REG_CNTR1_REGION_EN, EMIF4FV_PERF_CNT_CFG_REG_CNTR1_CFG

Example

        EMIF4F_PERF_CONFIG     perfCounterConfig;

        // Get the EMIF4F Performance Counter Configuration for counter 1
        CSL_EMIF4F_GetPerfCounterConfig(1, &perfCounterConfig);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetPerfCounterMasterRegion ( Uint8  counter,
Uint8 *  mstID,
Uint8 *  regionSel 
)

============================================================================
CSL_EMIF4F_GetPerfCounterMasterRegion

Description
The function is used to get the master region selection for the specific performance counters

Arguments

        counter          Perf Counter for which master region selection is configured
        mstID            Master ID selection for the specified performance counter
        regionSel        Region Selection for the specified performance counter
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_PERF_CNT_SEL_REG_MCONNID1, EMIF4FV_PERF_CNT_SEL_REG_REGION_SEL1; EMIF4FV_PERF_CNT_SEL_REG_MCONNID2, EMIF4FV_PERF_CNT_SEL_REG_REGION_SEL2

Example

        Uint8   mstID;
        Uint8   regionSel;

        // Get the Master Region Selection for Counter 1
        CSL_EMIF4F_GetPerfCounterMasterRegion (1, &mstID, &regionSel);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetPerfCounters ( Uint32 *  perfCounter1,
Uint32 *  perfCounter2 
)

============================================================================
CSL_EMIF4F_GetPerfCounters

Description
The function is used to get the performance counters

Arguments

        perfCounter1        Performance Counter1 populated by this API
        perfCounter2        Performance Counter2 populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_PERF_CNT_1,EMIF4FV_PERF_CNT_2

Example

        Uint32     perfCounter1;
        Uint32     perfCounter2;

        // Get the EMIF4F Performance counters
        CSL_EMIF4F_GetPerfCounters(&perfCounter1, &perfCounter2);
        ...
     

=============================================================================

CSL_IDEF_INLINE Uint32 CSL_EMIF4F_GetPerfCounterTime ( void  )

============================================================================
CSL_EMIF4F_GetPerfCounterTime

Description
The function is used to get the performance counter timer register

Arguments

        None
     

Return Value
Performance counter Time Register

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_PERF_CNT_TIM

Example

        Uint32  perfCount;

        // Get the Performance Counter Time Register
        perfCount = CSL_EMIF4F_GetPerfCounterTime ();
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetPowerMgmtConfig ( EMIF4F_PWR_MGMT_CONFIG ptrPwrMgmtConfig)

============================================================================
CSL_EMIF4F_GetPowerMgmtConfig

Description
The function is used to get the Power Management Configuration.

Arguments

         ptrPwrMgmtConfig       Power Management Configuration populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_PWR_MGMT_CTRL_REG_PD_TIM, EMIF4FV_PWR_MGMT_CTRL_REG_DPD_EN, EMIF4FV_PWR_MGMT_CTRL_REG_LP_MODE, EMIF4FV_PWR_MGMT_CTRL_REG_SR_TIM, EMIF4FV_PWR_MGMT_CTRL_REG_CS_TIM

Example

        EMIF4F_PWR_MGMT_CONFIG pwrConfig;

        // Get the power management configuration.
        CSL_EMIF4F_GetPowerMgmtConfig(&pwrConfig);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetPriorityToCOSMapping ( EMIF4_PRI_COS_MAPPING ptrPriCosMapper)

============================================================================
CSL_EMIF4F_GetPriorityToCOSMapping

Description
The function is used to get the priority to class of service mapping.

Arguments

        ptrPriCosMapper       Priority to COS Mapping configuration
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_PRI_COS_MAP_REG_PRI_COS_MAP_EN, EMIF4FV_PRI_COS_MAP_REG_PRI_7_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_5_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_4_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_3_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_2_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_1_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_0_COS

Example

        EMIF4_PRI_COS_MAPPING priCosMapper;

        // Get the Priority to COS Mapper information
        CSL_EMIF4F_GetPriorityToCOSMapping (&priCosMapper);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetReadWriteThreshold ( Uint8 *  wrThreshold,
Uint8 *  rdThreshold 
)

============================================================================
CSL_EMIF4F_GetReadWriteThreshold

Description
The function is used to get the Read, Write Execution Thresholds

Arguments

        wrThreshold       Write Threshold
        rdThreshold       Read  Threshold
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads EMIF4FV_RD_WR_EXEC_THRSH_REG_WR_THRSH, EMIF4FV_RD_WR_EXEC_THRSH_REG_RD_THRSH

Example

        Uint8   wrThreshold;
        Uint8   rdThreshold;

        // Get the Read, Write Execution Thresholds.
        CSL_EMIF4F_GetReadWriteThreshold (&wrThreshold, &rdThreshold);
        ...
     

=============================================================================

CSL_IDEF_INLINE Uint16 CSL_EMIF4F_GetRefreshRate ( void  )

============================================================================
CSL_EMIF4F_GetRefreshRate

Description
The function is used to get the refresh rate

Arguments

         None
     

Return Value
Current Refresh Rate configuration

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_SDRAM_REF_CTRL_REG_REFRESH_RATE

Example

        Uint8   refreshRate;

        // Get the Refresh Rate 
        refreshRate = CSL_EMIF4F_GetRefreshRate();
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetSDRAMConfig ( EMIF4F_SDRAM_CONFIG ptrConfig)

============================================================================
CSL_EMIF4F_GetSDRAMConfig

Description
The function gets the current SDRAM Configuration.

Arguments

         ptrConfig  SDRAM Configuration populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_SDRAM_CONFIG_REG_SDRAM_TYPE,EMIF4FV_SDRAM_CONFIG_REG_DDR_TERM, EMIF4FV_SDRAM_CONFIG_REG_DDR2_DDQS,EMIF4FV_SDRAM_CONFIG_REG_DYN_ODT, EMIF4FV_SDRAM_CONFIG_REG_CWL,EMIF4FV_SDRAM_CONFIG_REG_NARROW_MODE, EMIF4FV_SDRAM_CONFIG_REG_CL,EMIF4FV_SDRAM_CONFIG_REG_IBANK, EMIF4FV_SDRAM_CONFIG_REG_EBANK,EMIF4FV_SDRAM_CONFIG_REG_PAGESIZE

Example

        EMIF4F_SDRAM_CONFIG  sdramConfig;
        ...
        // Get the EMIF4F SDRAM Configuration.
        CSL_EMIF4F_GetSDRAMConfig (&sdramConfig);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetTiming1Config ( EMIF4F_TIMING1_CONFIG ptrTimingConfig)

============================================================================
CSL_EMIF4F_GetTiming1Config

Description
The function is used to get the SDRAM Timing1 Configuration

Arguments

         ptrTimingConfig       Timing Configuration populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_SDRAM_TIM_1_REG_T_WR, EMIF4FV_SDRAM_TIM_1_REG_T_RAS, EMIF4FV_SDRAM_TIM_1_REG_T_RC, EMIF4FV_SDRAM_TIM_1_REG_T_RRD, EMIF4FV_SDRAM_TIM_1_REG_T_WTR

Example

        EMIF4F_TIMING1_CONFIG timingConfig;

        // Get the current timing configuration.
        CSL_EMIF4F_GetTiming1Config(&timingConfig);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetVBUSConfig ( Uint8 *  cosCount1,
Uint8 *  cosCount2,
Uint8 *  prOldCount 
)

============================================================================
CSL_EMIF4F_GetVBUSConfig

Description
The function is used to get the VBUSM Configuration

Arguments

        cosCount1   Priority Raise Counter for Class of Service 1
        cosCount2   Priority Raise Counter for Class of Service 2
        prOldCount  Priority Raise Old Counter
     

Return Value
Priority Raise New Counter

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_VBUSM_CONFIG_REG_COS_COUNT_1, EMIF4FV_VBUSM_CONFIG_REG_COS_COUNT_2,
EMIF4FV_VBUSM_CONFIG_REG_PR_OLD_COUNT

Example

        Uint8 cosCount1;
        Uint8 cosCount2;
        Uint8 prOldCount;

        // Get the VBUS Configuration
        CSL_EMIF4F_GetVBUSConfig(&cosCount1, &cosCount2, &prOldCount);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_GetVBUSConfigValues ( EMIF4F_VBUS_CONFIG_VALUE ptrVBUSConfigValue)

============================================================================
CSL_EMIF4F_GetVBUSConfigValues

Description
The function is used to get the VBUSM Configuration values

Arguments

        ptrVBUSConfigValue      VBUS Configuration populated by this API
     

Return Value
None

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_VBUSM_CFG_VAL_1_REG_SYS_BUS_WIDTH, EMIF4FV_VBUSM_CFG_VAL_1_REG_STAT_FIFO_DEPTH, EMIF4FV_VBUSM_CFG_VAL_1_REG_WR_FIFO_DEPTH, EMIF4FV_VBUSM_CFG_VAL_1_REG_CMD_FIFO_DEPTH,
EMIF4FV_VBUSM_CFG_VAL_2_REG_RREG_FIFO_DEPTH, EMIF4FV_VBUSM_CFG_VAL_2_REG_RSD_FIFO_DEPTH, EMIF4FV_VBUSM_CFG_VAL_2_REG_RCMD_FIFO_DEPTH

Example

        EMIF4F_VBUS_CONFIG_VALUE     VBUSconfigValue;

        // Get the VBUS Configuration values
        CSL_EMIF4F_GetVBUSConfigValues(&VBUSconfigValue);
        ...
     

=============================================================================

CSL_IDEF_INLINE Bool CSL_EMIF4F_IsAsynchronous ( )

============================================================================
CSL_EMIF4F_IsAsynchronous

Description
The function gets the dual clock mode on which the EMIF4F is operating.

Arguments

         None 
     

Return Value
TRUE - Asynchronous (V_CLK and M_CLK can have any freq ratio)
FALSE - Synchronous (V_CLK is the same as M_CLK)

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_STATUS_REG_DUAL_CLK_MODE

Example


        // Get the EMIF4F Clock
        if (CSL_EMIF4F_IsAsynchronous () == TRUE)
        {
            // Asynchronous Clock
        }
        else
        {
            // Synchronous Clock
        }
        ...
     

=============================================================================

CSL_IDEF_INLINE Bool CSL_EMIF4F_IsBigEndian ( )

============================================================================
CSL_EMIF4F_IsBigEndian

Description
The function gets the endianess mode in which the EMIF4F is operating.

Arguments

         None 
     

Return Value
TRUE - Big Endian Mode
FALSE - Little Endian Mode.

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_STATUS_REG_BE

Example


        // Get the EMIF4F Endianness mode.
        if (CSL_EMIF4F_IsBigEndian () == TRUE)
        {
            // Big Endian Mode.
        }
        else
        {
            // Little Endian Mode.
        }
        ...
     

=============================================================================

CSL_IDEF_INLINE Bool CSL_EMIF4F_IsDDRPhyRead ( )

============================================================================
CSL_EMIF4F_IsDDRPhyRead

Description
The function gets the status of the DDR PHY

Arguments

         None 
     

Return Value
TRUE - DDR PHY is ready
FALSE - DDR PHY is not ready

Pre Condition
None

Post Condition
None

Reads
EMIF4FV_STATUS_REG_PHY_DLL_READY

Example


        // Get the EMIF4F DDR PHY Ready Status
        if (CSL_EMIF4F_IsDDRPhyRead () == TRUE)
        {
            // DDR PHY is ready
        }
        else
        {
            // DDR PHY is not ready
        }
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetECCAddressRange ( Uint8  range,
Uint16  endAddr,
Uint16  startAddr 
)

============================================================================
CSL_EMIF4F_SetECCAddressRange

Description
The function is used to set the ECC Address Range

Arguments

        range           Address Range for which start and end address are required
        endAddr         End Address
        startAddr       Start Address
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_ECC_ADDR_RNG_1_REG_ECC_END_ADDR_1, EMIF4FV_ECC_ADDR_RNG_1_REG_ECC_STRT_ADDR_1; EMIF4FV_ECC_ADDR_RNG_2_REG_ECC_END_ADDR_2, EMIF4FV_ECC_ADDR_RNG_2_REG_ECC_STRT_ADDR_2

Example

        Uint16  endAddr;
        Uint16  startAddr;

        // Set the ECC Address Range1
        CSL_EMIF4F_SetECCAddressRange (1, 0x100, 0x0);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetECCControl ( EMIF4_ECC_CONTROL ptrECCControl)

============================================================================
CSL_EMIF4F_SetECCControl

Description
The function is used to set the ECC Control Information

Arguments

        ptrECCControl       ECC Control Configuration
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_ECC_CTRL_REG_ECC_EN, EMIF4FV_ECC_CTRL_REG_ECC_ADDR_RNG_PROT, EMIF4FV_ECC_CTRL_REG_ECC_ADDR_RNG_2_EN, EMIF4FV_ECC_CTRL_REG_ECC_ADDR_RNG_1_EN

Example

        EMIF4_ECC_CONTROL eccControl;

        // Get the ECC Control Configuration
        CSL_EMIF4F_GetECCControl (&eccControl);
        ..
        // Enable ECC 
        eccControl.enable = 1;
        CSL_EMIF4F_SetECCControl (&eccControl);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetInterruptRawStatus ( Uint8  rawStatus)

============================================================================
CSL_EMIF4F_SetInterruptRawStatus

Description
The function is used to set the interrupt RAW status

Arguments

        rawStatus       Raw Interrupt Status to be configured
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_IRQSTATUS_RAW_SYS

Example

        
        // Set the Interrupt RAW Status for LPDDR2 NVM data not valid
        CSL_EMIF4F_SetInterruptRawStatus (0x4);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetIODFTControl ( EMIF4F_IODFT_CONTROL ptrIODFTControl)

============================================================================
CSL_EMIF4F_SetIODFTControl

Description
The function is used to set the IODFT Control configuration

Arguments

        ptrIODFTControl      IODFT Control Configuration to be configured
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_IODFT_TLGC_REG_TLEC, EMIF4FV_IODFT_TLGC_REG_MT, EMIF4FV_IODFT_TLGC_REG_ACT_CAP_EN,EMIF4FV_IODFT_TLGC_REG_OPG_LD, EMIF4FV_IODFT_TLGC_REG_MMS, EMIF4FV_IODFT_TLGC_REG_MC, EMIF4FV_IODFT_TLGC_REG_PC

Example

        EMIF4F_IODFT_CONTROL     IODFTcontrol;

        // Get the IODFT Configuration values
        CSL_EMIF4F_GetIODFTControl(&IODFTcontrol);

        // Set the new IODFT configuration 
        CSL_EMIF4F_SetIODFTControl (&IODFTcontrol);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetMstIDToCos1Mapping ( EMIF4_MSTID_COS_MAPPING ptrMstIDCosMapper)

============================================================================
CSL_EMIF4F_SetMstIDToCos1Mapping

Description
The function is used to set the master id to Class of Service 1 mapping

Arguments

        ptrMstIDCosMapper       Master ID to COS Mapping configuration
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_MSTID_COS_1_MAP_REG_MSTID_COS_1_MAP_EN, EMIF4FV_MSTID_COS_1_MAP_REG_MSTID_1_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSK_1_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSTID_2_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSK_2_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSTID_3_COS_1, EMIF4FV_MSTID_COS_1_MAP_REG_MSK_3_COS_1

Example

        EMIF4_MSTID_COS_MAPPING mstIDCosMapper;

        // Get the Master ID to COS1 Mapper information
        CSL_EMIF4F_GetMstIDToCos1Mapping (&mstIDCosMapper);
        ...
        // Enable the Master ID to COS1 Mapping
        mstIDCosMapper.enable = 1;
        CSL_EMIF4F_SetMstIDToCos1Mapping (&mstIDCosMapper);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetMstIDToCos2Mapping ( EMIF4_MSTID_COS_MAPPING ptrMstIDCosMapper)

============================================================================
CSL_EMIF4F_SetMstIDToCos2Mapping

Description
The function is used to set the master id to Class of Service 2 mapping

Arguments

        ptrMstIDCosMapper       Master ID to COS Mapping configuration
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_MSTID_COS_2_MAP_REG_MSTID_COS_2_MAP_EN, EMIF4FV_MSTID_COS_2_MAP_REG_MSTID_1_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSK_1_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSTID_2_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSK_2_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSTID_3_COS_2, EMIF4FV_MSTID_COS_2_MAP_REG_MSK_3_COS_2

Example

        EMIF4_MSTID_COS_MAPPING mstIDCosMapper;

        // Get the Master ID to COS2 Mapper information
        CSL_EMIF4F_GetMstIDToCos2Mapping (&mstIDCosMapper);
        ...
        // Enable the Master ID to COS2 Mapping
        mstIDCosMapper.enable = 1;
        CSL_EMIF4F_SetMstIDToCos2Mapping (&mstIDCosMapper);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetOutputImpedanceConfig ( EMIF4F_OUTPUT_IMP_CONFIG ptrOutputImpedanceConfig)

============================================================================
CSL_EMIF4F_SetOutputImpedanceConfig

Description
The function is used to set the Output Impedance Calibrartion configuration

Arguments

        ptrOutputImpedanceConfig    Output Impedance Calibrartion configuration to be
                                    configured
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_ZQ_CONFIG_REG_ZQ_CS1EN, EMIF4FV_ZQ_CONFIG_REG_ZQ_CS0EN, EMIF4FV_ZQ_CONFIG_REG_ZQ_DUALCALEN, EMIF4FV_ZQ_CONFIG_REG_ZQ_SFEXITEN, EMIF4FV_ZQ_CONFIG_REG_ZQ_ZQCL_MULT, EMIF4FV_ZQ_CONFIG_REG_ZQ_REFINTERVAL

Example

        EMIF4F_OUTPUT_IMP_CONFIG outputImpConfig; 

        // Get the output impedance configuration
        CSL_EMIF4F_GetOutputImpedanceConfig (&outputImpConfig);

        // Enable ZQ Calibration for CS1
        outputImpConfig.zqCS1En = 1;

        // Set the new output impedance configuration.
        CSL_EMIF4F_SetOutputImpedanceConfig(&outputImpConfig);

     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetPerfCounterConfig ( Uint8  counter,
EMIF4F_PERF_CONFIG ptrPerfCounterConfig 
)

============================================================================
CSL_EMIF4F_SetPerfCounterConfig

Description
The function is used to set the configuration for performance counters

Arguments

        counter                 Perf Counter for which configuration is to be set (1 or 2)
        ptrPerfCounterConfig    Performance Counter Configuration to be configured
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_PERF_CNT_CFG_REG_CNTR2_MCONNID_EN, EMIF4FV_PERF_CNT_CFG_REG_CNTR2_REGION_EN, EMIF4FV_PERF_CNT_CFG_REG_CNTR2_CFG; EMIF4FV_PERF_CNT_CFG_REG_CNTR1_MCONNID_EN, EMIF4FV_PERF_CNT_CFG_REG_CNTR1_REGION_EN, EMIF4FV_PERF_CNT_CFG_REG_CNTR1_CFG

Example

        EMIF4F_PERF_CONFIG     perfCounterConfig;

        // Get the EMIF4F Performance Counter Configuration for counter 2
        CSL_EMIF4F_GetPerfCounterConfig(2, &perfCounterConfig);

        // Enable Master ID Filter Enable 
        perfCounterConfig.mstIDEn = 1;
        
        // Set the EMIF4F Performance Counter Configuration.
        CSL_EMIF4F_SetPerfCounterConfig(2, &perfCounterConfig);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetPerfCounterMasterRegion ( Uint8  counter,
Uint8  mstID,
Uint8  regionSel 
)

============================================================================
CSL_EMIF4F_SetPerfCounterMasterRegion

Description
The function is used to set the master region selection for the specific performance counters

Arguments

        counter          Perf Counter for which master region selection is configured
        mstID            Master ID selection for the specified performance counter
        regionSel        Region Selection for the specified performance counter
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_PERF_CNT_SEL_REG_MCONNID1, EMIF4FV_PERF_CNT_SEL_REG_REGION_SEL1; EMIF4FV_PERF_CNT_SEL_REG_MCONNID2, EMIF4FV_PERF_CNT_SEL_REG_REGION_SEL2

Example

        Uint8   mstID;
        Uint8   regionSel;

        // Get the Master Region Selection for Counter 1
        CSL_EMIF4F_GetPerfCounterMasterRegion (1, &mstID, &regionSel);

        // Change Master ID to be 5
        CSL_EMIF4F_SetPerfCounterMasterRegion(1, 5, regionSel);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetPowerMgmtConfig ( EMIF4F_PWR_MGMT_CONFIG ptrPwrMgmtConfig)

============================================================================
CSL_EMIF4F_SetPowerMgmtConfig

Description
The function is used to set the Power Management Configuration.

Arguments

         ptrPwrMgmtConfig       Power Management Configuration to be configured
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_PWR_MGMT_CTRL_REG_PD_TIM, EMIF4FV_PWR_MGMT_CTRL_REG_DPD_EN, EMIF4FV_PWR_MGMT_CTRL_REG_LP_MODE, EMIF4FV_PWR_MGMT_CTRL_REG_SR_TIM, EMIF4FV_PWR_MGMT_CTRL_REG_CS_TIM

Example

        EMIF4F_PWR_MGMT_CONFIG pwrConfig;

        // Get the power management configuration.
        CSL_EMIF4F_GetPowerMgmtConfig(&pwrConfig);

        // Enable Deep Power Down Mode
        pwrConfig.dpdEnable = 1;

        // Set the power management configuration
        CSL_EMIF4F_SetPowerMgmtConfig(&pwrConfig);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetPriorityToCOSMapping ( EMIF4_PRI_COS_MAPPING ptrPriCosMapper)

============================================================================
CSL_EMIF4F_SetPriorityToCOSMapping

Description
The function is used to set the priority to class of service mapping.

Arguments

        ptrPriCosMapper       Priority to COS Mapping configuration
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_PRI_COS_MAP_REG_PRI_COS_MAP_EN, EMIF4FV_PRI_COS_MAP_REG_PRI_7_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_5_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_4_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_3_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_2_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_1_COS, EMIF4FV_PRI_COS_MAP_REG_PRI_0_COS

Example

        EMIF4_PRI_COS_MAPPING priCosMapper;

        // Get the Priority to COS Mapper information
        CSL_EMIF4F_GetPriorityToCOSMapping (&priCosMapper);
        ...
        // Configure the mapper to allow priority to COS mapping 
        priCosMapper.enable = 1;
        CSL_EMIF4F_SetPriorityToCOSMapping (&priCosMapper);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetReadWriteThreshold ( Uint8  wrThreshold,
Uint8  rdThreshold 
)

============================================================================
CSL_EMIF4F_SetReadWriteThreshold

Description
The function is used to set the Read, Write Execution Thresholds

Arguments

        wrThreshold       Write Threshold
        rdThreshold       Read  Threshold
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes EMIF4FV_RD_WR_EXEC_THRSH_REG_WR_THRSH, EMIF4FV_RD_WR_EXEC_THRSH_REG_RD_THRSH

Example


        // Get the Read, Write Execution Thresholds.
        CSL_EMIF4F_SetReadWriteThreshold (1, 2);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetRefreshRate ( Uint16  refreshRate)

============================================================================
CSL_EMIF4F_SetRefreshRate

Description
The function is used to set the refresh rate

Arguments

         refreshRate   Refresh Rate to be configured
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_SDRAM_REF_CTRL_REG_REFRESH_RATE

Example


        // Enable Initialization & Refresh
        CSL_EMIF4F_EnableInitRefresh();

        // Set the Refresh Rate to be 15.7 us 
        CSL_EMIF4F_SetRefreshRate(0x7AA);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetSDRAMConfig ( EMIF4F_SDRAM_CONFIG ptrConfig)

============================================================================
CSL_EMIF4F_SetSDRAMConfig

Description
The function sets the SDRAM Configuration as specified.

Arguments

         ptrConfig  SDRAM Configuration to be configured
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_SDRAM_CONFIG_REG_SDRAM_TYPE,EMIF4FV_SDRAM_CONFIG_REG_DDR_TERM, EMIF4FV_SDRAM_CONFIG_REG_DDR2_DDQS,EMIF4FV_SDRAM_CONFIG_REG_DYN_ODT, EMIF4FV_SDRAM_CONFIG_REG_CWL,EMIF4FV_SDRAM_CONFIG_REG_NARROW_MODE, EMIF4FV_SDRAM_CONFIG_REG_CL,EMIF4FV_SDRAM_CONFIG_REG_IBANK, EMIF4FV_SDRAM_CONFIG_REG_EBANK,EMIF4FV_SDRAM_CONFIG_REG_PAGESIZE

Example

        EMIF4F_SDRAM_CONFIG  sdramConfig;
        ...
        // Get the EMIF4F SDRAM Configuration.
        CSL_EMIF4F_GetSDRAMConfig (&sdramConfig);
        ...
        // Set the SDRAM Data Bus Width to be 32 bits
        sdramConfig.narrowMode = 0;

        // Set the EMIF4F SDRAM Configuration.
        CSL_EMIF4F_SetSDRAMConfig (&sdramConfig);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetTiming1Config ( EMIF4F_TIMING1_CONFIG ptrTimingConfig)

============================================================================
CSL_EMIF4F_SetTiming1Config

Description
The function is used to set the SDRAM Timing1 Configuration

Arguments

         ptrTimingConfig       Timing Configuration to be configured
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_SDRAM_TIM_1_REG_T_WR, EMIF4FV_SDRAM_TIM_1_REG_T_RAS, EMIF4FV_SDRAM_TIM_1_REG_T_RC, EMIF4FV_SDRAM_TIM_1_REG_T_RRD, EMIF4FV_SDRAM_TIM_1_REG_T_WTR

Example

        EMIF4F_TIMING1_CONFIG timingConfig;

        // Get the current timing configuration.
        CSL_EMIF4F_GetTiming1Config(&timingConfig);

        // Set the min number of m_clk cycles from precharge to activate
        timingConfig.t_rp = 1;

        // Set the timing configuration.
        CSL_EMIF4F_SetTiming1Config (&timingConfig);
        ...
     

=============================================================================

CSL_IDEF_INLINE void CSL_EMIF4F_SetVBUSConfig ( Uint8  cosCount1,
Uint8  cosCount2,
Uint8  prOldCount 
)

============================================================================
CSL_EMIF4F_SetVBUSConfig

Description
The function is used to set the VBUSM Configuration

Arguments

        cosCount1   Priority Raise Counter for Class of Service 1
        cosCount2   Priority Raise Counter for Class of Service 2
        prOldCount  Priority Raise Old Counter
     

Return Value
None

Pre Condition
None

Post Condition
None

Writes
EMIF4FV_VBUSM_CONFIG_REG_COS_COUNT_1, EMIF4FV_VBUSM_CONFIG_REG_COS_COUNT_2,
EMIF4FV_VBUSM_CONFIG_REG_PR_OLD_COUNT

Example

        Uint8 cosCount1;
        Uint8 cosCount2;
        Uint8 prOldCount;

        // Get the VBUS Configuration
        CSL_EMIF4F_GetVBUSConfig(&cosCount1, &cosCount2, &prOldCount);

        // Set the VBUS Configuration
        CSL_EMIF4F_SetVBUSConfig(cosCount1, cosCount2, 0x1);
        ...
     

=============================================================================


Copyright 2014, Texas Instruments Incorporated