# MEMCFG Module

The MemCfg module provides an API to configure the device’s Memory Control Module. The functions that are provided fall into three main categories: RAM section configuration, access violation status and interrupts, and memory error status an interrupts. The RAM section configuration functions can initialize RAM, configure access protection settings, and configure section ownership. The access violation and memory error categories contain functions that can return violation and error status and address information as well as configure interrupts that can be generated as a result of these issues.

group `memcfg_api`

  Defines

  `MEMCFG_SECT_TYPE_MASK` 0xFF000000U
  `MEMCFG_SECT_TYPE_D` 0x00000000U
  `MEMCFG_SECT_TYPE_LS` 0x01000000U
  `MEMCFG_SECT_TYPE_GS` 0x02000000U
  `MEMCFG_SECT_TYPE_MSG` 0x03000000U
  `MEMCFG_SECT_NUM_MASK` 0x00FFFFFFU
  `MEMCFG_XACCPROTX_M` ((uint32_t)MEMCFG_GSXACCPROT0_FETCHPROT_GS0

  | \

  (uint32_t)

  MEMCFG_GSXACCPROT0_CPUWRPROT_GS0

  | \

  (uint32_t)

  MEMCFG_GSXACCPROT0_DMAWRPROT_GS0)
  `MEMCFG_XTEST_M` MEMCFG_DXTEST_TEST_M0_M
  `MEMCFG_NMVIOL_MASK` 0x0000FFFFU
  `MEMCFG_MVIOL_MASK` 0x000F0000U
  `MEMCFG_MVIOL_SHIFT` 16U
  `MEMCFG_SECT_M0` 0x00000001U

    M0 RAM.

  `MEMCFG_SECT_M1` 0x00000002U

    M1 RAM.

  `MEMCFG_SECT_DX_ALL` 0x00000003U

    All M and D RAM.

  `MEMCFG_SECT_LS0` 0x01000001U

    LS0 RAM.

  `MEMCFG_SECT_LS1` 0x01000002U

    LS1 RAM.

  `MEMCFG_SECT_LS2` 0x01000004U

    LS2 RAM.

  `MEMCFG_SECT_LS3` 0x01000008U

    LS3 RAM.

  `MEMCFG_SECT_LS4` 0x01000010U

    LS4 RAM.

  `MEMCFG_SECT_LS5` 0x01000020U

    LS5 RAM.

  `MEMCFG_SECT_LS6` 0x01000040U

    LS6 RAM.

  `MEMCFG_SECT_LS7` 0x01000080U

    LS7 RAM.

  `MEMCFG_SECT_LSX_ALL` 0x010000FFU

    All LS RAM.

  `MEMCFG_SECT_GS0` 0x02000001U

    GS0 RAM.

  `MEMCFG_SECT_GS1` 0x02000002U

    GS1 RAM.

  `MEMCFG_SECT_GS2` 0x02000004U

    GS2 RAM.

  `MEMCFG_SECT_GS3` 0x02000008U

    GS3 RAM.

  `MEMCFG_SECT_GSX_ALL` 0x0200000FU

    All GS RAM.

  `MEMCFG_SECT_MSGCPUTOCLA1` 0x03000002U

    CPU-to-CLA1 message RAM.

  `MEMCFG_SECT_MSGCLA1TOCPU` 0x03000004U

    CLA1-to-CPU message RAM.

  `MEMCFG_SECT_MSGX_ALL` 0x03000006U

    All message RAM.

  `MEMCFG_SECT_ALL` 0xFFFFFFFFU

    All configurable RAM.

  `MEMCFG_PROT_ALLOWCPUFETCH` 0x00000000U

    CPU fetch allowed.

  `MEMCFG_PROT_BLOCKCPUFETCH` 0x00000001U

    CPU fetch blocked.

  `MEMCFG_PROT_ALLOWCPUWRITE` 0x00000000U

    CPU write allowed.

  `MEMCFG_PROT_BLOCKCPUWRITE` 0x00000002U

    CPU write blocked.

  `MEMCFG_PROT_ALLOWDMAWRITE` 0x00000000U

    DMA write allowed (GSxRAM)

  `MEMCFG_PROT_BLOCKDMAWRITE` 0x00000004U

    DMA write blocked (GSxRAM)

  `MEMCFG_NMVIOL_CPUREAD` 0x00000001U

    Non-master CPU read access.

  `MEMCFG_NMVIOL_CPUWRITE` 0x00000002U

    Non-master CPU write access.

  `MEMCFG_NMVIOL_CPUFETCH` 0x00000004U

    Non-master CPU fetch access.

  `MEMCFG_NMVIOL_DMAWRITE` 0x00000008U

    Non-master DMA write access.

  `MEMCFG_NMVIOL_CLA1READ` 0x00000010U

    Non-master CLA1 read access.

  `MEMCFG_NMVIOL_CLA1WRITE` 0x00000020U

    Non-master CLA1 write access.

  `MEMCFG_NMVIOL_CLA1FETCH` 0x00000040U

    Non-master CLA1 fetch access.

  `MEMCFG_MVIOL_CPUFETCH` 0x00010000U

    Master CPU fetch access.

  `MEMCFG_MVIOL_CPUWRITE` 0x00020000U

    Master CPU write access.

  `MEMCFG_MVIOL_DMAWRITE` 0x00040000U

    Master DMA write access.

  `MEMCFG_CERR_CPUREAD` 0x0001U

    Correctable CPU read error.

  `MEMCFG_CERR_DMAREAD` 0x0002U

    Correctable DMA read error.

  `MEMCFG_CERR_CLA1READ` 0x0004U

    Correctable CLA1 read error.

  `MEMCFG_UCERR_CPUREAD` 0x0001U

    Uncorrectable CPU read error.

  `MEMCFG_UCERR_DMAREAD` 0x0002U

    Uncorrectable DMA read error.

  `MEMCFG_UCERR_CLA1READ` 0x0004U

    Uncorrectable CLA1 read error.

  Enums

  enum `MemCfg_CLAMemoryType`

    Values that can be passed to MemCfg_setCLAMemType() as the claMemType parameter.

    Values:

    enumerator `MEMCFG_CLA_MEM_DATA`

      Section is CLA data memory.

    enumerator `MEMCFG_CLA_MEM_PROGRAM`

      Section is CLA program memory.

  enum `MemCfg_LSRAMMasterSel`

    Values that can be passed to MemCfg_setLSRAMMasterSel() as the masterSel parameter.

    Values:

    enumerator `MEMCFG_LSRAMMASTER_CPU_ONLY`

      CPU is the master of the section.

    enumerator `MEMCFG_LSRAMMASTER_CPU_CLA1`

      CPU and CLA1 share this section.

  enum `MemCfg_TestMode`

    Values that can be passed to MemCfg_setTestMode() as the testMode parameter.

    Values:

    enumerator `MEMCFG_TEST_FUNCTIONAL` = 0

      Functional mode. Test mode is disabled.

    enumerator `MEMCFG_TEST_WRITE_DATA` = 1

      Writes allowed to data only.

    enumerator `MEMCFG_TEST_WRITE_ECC` = 2

      Writes allowed to ECC only (for DxRAM/MxRAM)

    enumerator `MEMCFG_TEST_WRITE_PARITY` = 2

      Writes allowed to parity only (for LSxRAM, GSxRAM, and MSGxRAM)

  Functions

  void `MemCfg_setCLAMemType`(uint32_t ramSections, MemCfg_CLAMemoryType claMemType)

    Sets the CLA memory type of the specified RAM section.

    This function sets the CLA memory type configuration of the RAM section. If the

    claMemType parameter is MEMCFG_CLA_MEM_DATA, the RAM section will be configured as CLA data memory. If MEMCFG_CLA_MEM_PROGRAM, the RAM section will be configured as CLA program memory.
    Parameters

      - `ramSections`: is the logical OR of the sections to be configured.

      - `claMemType`: indicates data memory or program memory.

    The ramSections parameter is an OR of the following indicators: MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx.

    Note

      This API only applies to LSx RAM and has no effect if the CLA isn’t master of the memory section.

    See

      MemCfg_setLSRAMMasterSel()

    Return

      None.

  void `MemCfg_enableViolationInterrupt`(uint32_t intFlags)

    Enables individual RAM access violation interrupt sources.

    Return

      None.

    Parameters

      - `intFlags`: is a bit mask of the interrupt sources to be enabled. Can be a logical OR any of the following values:

        - MEMCFG_NMVIOL_CPUREAD - Non-master CPU read access

        - MEMCFG_NMVIOL_CPUWRITE - Non-master CPU write access

        - MEMCFG_NMVIOL_CPUFETCH - Non-master CPU fetch access

        - MEMCFG_NMVIOL_DMAWRITE - Non-master DMA write access

        - MEMCFG_NMVIOL_CLA1READ - Non-master CLA1 read access

        - MEMCFG_NMVIOL_CLA1WRITE - Non-master CLA1 write access

        - MEMCFG_NMVIOL_CLA1FETCH - Non-master CLA1 fetch access

        - MEMCFG_MVIOL_CPUFETCH - Master CPU fetch access

        - MEMCFG_MVIOL_CPUWRITE - Master CPU write access

        - MEMCFG_MVIOL_DMAWRITE - Master DMA write access This function enables the indicated RAM access violation interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

  void `MemCfg_disableViolationInterrupt`(uint32_t intFlags)

    Disables individual RAM access violation interrupt sources.

    This function disables the indicated RAM access violation interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

    Parameters

      - `intFlags`: is a bit mask of the interrupt sources to be disabled. Can be a logical OR any of the following values:

        - MEMCFG_NMVIOL_CPUREAD - Non-master CPU read access

        - MEMCFG_NMVIOL_CPUWRITE - Non-master CPU write access

        - MEMCFG_NMVIOL_CPUFETCH - Non-master CPU fetch access

        - MEMCFG_NMVIOL_DMAWRITE - Non-master DMA write access

        - MEMCFG_NMVIOL_CLA1READ - Non-master CLA1 read access

        - MEMCFG_NMVIOL_CLA1WRITE - Non-master CLA1 write access

        - MEMCFG_NMVIOL_CLA1FETCH - Non-master CLA1 fetch access

        - MEMCFG_MVIOL_CPUFETCH - Master CPU fetch access

        - MEMCFG_MVIOL_CPUWRITE - Master CPU write access

        - MEMCFG_MVIOL_DMAWRITE - Master DMA write access

    Note

      Note that only non-master violations may generate interrupts.

    Return

      None.

  uint32_t `MemCfg_getViolationInterruptStatus`(void)

    Gets the current RAM access violation status.

    This function returns the RAM access violation status. This function will return flags for both master and non-master access violations although only the non-master flags have the ability to cause the generation of an interrupt.

    Return

      Returns the current violation status, enumerated as a bit field of the values:

      - MEMCFG_NMVIOL_CPUREAD - Non-master CPU read access

      - MEMCFG_NMVIOL_CPUWRITE - Non-master CPU write access

      - MEMCFG_NMVIOL_CPUFETCH - Non-master CPU fetch access

      - MEMCFG_NMVIOL_DMAWRITE - Non-master DMA write access

      - MEMCFG_NMVIOL_CLA1READ - Non-master CLA1 read access

      - MEMCFG_NMVIOL_CLA1WRITE - Non-master CLA1 write access

      - MEMCFG_NMVIOL_CLA1FETCH - Non-master CLA1 fetch access

      - MEMCFG_MVIOL_CPUFETCH - Master CPU fetch access

      - MEMCFG_MVIOL_CPUWRITE - Master CPU write access

      - MEMCFG_MVIOL_DMAWRITE - Master DMA write access

  void `MemCfg_forceViolationInterrupt`(uint32_t intFlags)

    Sets the RAM access violation status.

    This function sets the RAM access violation status. This function will set flags for both master and non-master access violations, and an interrupt will be generated if it is enabled.

    Parameters

      - `intFlags`: is a bit mask of the access violation flags to be set. Can be a logical OR any of the following values:

        - MEMCFG_NMVIOL_CPUREAD - Non-master CPU read access

        - MEMCFG_NMVIOL_CPUWRITE - Non-master CPU write access

        - MEMCFG_NMVIOL_CPUFETCH - Non-master CPU fetch access

        - MEMCFG_NMVIOL_DMAWRITE - Non-master DMA write access

        - MEMCFG_NMVIOL_CLA1READ - Non-master CLA1 read access

        - MEMCFG_NMVIOL_CLA1WRITE - Non-master CLA1 write access

        - MEMCFG_NMVIOL_CLA1FETCH - Non-master CLA1 fetch access

        - MEMCFG_MVIOL_CPUFETCH - Master CPU fetch access

        - MEMCFG_MVIOL_CPUWRITE - Master CPU write access

        - MEMCFG_MVIOL_DMAWRITE - Master DMA write access

    Return

      None.

  void `MemCfg_clearViolationInterruptStatus`(uint32_t intFlags)

    Clears RAM access violation flags.

    Return

      None.

    Parameters

      - `intFlags`: is a bit mask of the access violation flags to be cleared. Can be a logical OR any of the following values:

        - MEMCFG_NMVIOL_CPUREAD - Non-master CPU read access

        - MEMCFG_NMVIOL_CPUWRITE - Non-master CPU write access

        - MEMCFG_NMVIOL_CPUFETCH - Non-master CPU fetch access

        - MEMCFG_NMVIOL_DMAWRITE - Non-master DMA write access

        - MEMCFG_NMVIOL_CLA1READ - Non-master CLA1 read access

        - MEMCFG_NMVIOL_CLA1WRITE - Non-master CLA1 write access

        - MEMCFG_NMVIOL_CLA1FETCH - Non-master CLA1 fetch access

        - MEMCFG_MVIOL_CPUFETCH - Master CPU fetch access

        - MEMCFG_MVIOL_CPUWRITE - Master CPU write access

        - MEMCFG_MVIOL_DMAWRITE - Master DMA write access

  void `MemCfg_setCorrErrorThreshold`(uint32_t threshold)

    Sets the correctable error threshold value.

    This value sets the error-count threshold at which a correctable error interrupt is generated. That is when the error count register reaches the value specified by the

    threshold parameter, an interrupt is generated if it is enabled.
    Parameters

      - `threshold`: is the correctable error threshold.

    Return

      None.

  uint32_t `MemCfg_getCorrErrorCount`(void)

    Gets the correctable error count.

    Return

      Returns the number of correctable error have occurred.

  void `MemCfg_enableCorrErrorInterrupt`(uint32_t intFlags)

    Enables individual RAM correctable error interrupt sources.

    This function enables the indicated RAM correctable error interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

    Parameters

      - `intFlags`: is a bit mask of the interrupt sources to be enabled. Can take the value MEMCFG_CERR_CPUREAD only. Other values are reserved.

    Note

      Note that only correctable errors may generate interrupts.

    Return

      None.

  void `MemCfg_disableCorrErrorInterrupt`(uint32_t intFlags)

    Disables individual RAM correctable error interrupt sources.

    This function disables the indicated RAM correctable error interrupt sources. Only the sources that are enabled can be reflected to the processor interrupt; disabled sources have no effect on the processor.

    Parameters

      - `intFlags`: is a bit mask of the interrupt sources to be disabled. Can take the value MEMCFG_CERR_CPUREAD only. Other values are reserved.

    Note

      Note that only correctable errors may generate interrupts.

    Return

      None.

  uint32_t `MemCfg_getCorrErrorInterruptStatus`(void)

    Gets the current RAM correctable error interrupt status.

    Return

      Returns the current error interrupt status. Will return a value of MEMCFG_CERR_CPUREAD if an interrupt has been generated. If not, the function will return 0.

  void `MemCfg_forceCorrErrorInterrupt`(uint32_t intFlags)

    Sets the RAM correctable error interrupt status.

    This function sets the correctable error interrupt flag.

    Parameters

      - `intFlags`: is a bit mask of the interrupt sources to be set. Can take the value MEMCFG_CERR_CPUREAD only. Other values are reserved.

    Note

      Note that only correctable errors may generate interrupts.

    Return

      None.

  void `MemCfg_clearCorrErrorInterruptStatus`(uint32_t intFlags)

    Clears the RAM correctable error interrupt status.

    This function clears the correctable error interrupt flag.

    Parameters

      - `intFlags`: is a bit mask of the interrupt sources to be cleared. Can take the value MEMCFG_CERR_CPUREAD only. Other values are reserved.

    Note

      Note that only correctable errors may generate interrupts.

    Return

      None.

  uint32_t `MemCfg_getCorrErrorStatus`(void)

    Gets the current correctable RAM error status.

    Return

      Returns the current error status, enumerated as a bit field of MEMCFG_CERR_CPUREAD, MEMCFG_CERR_DMAREAD, or MEMCFG_CERR_CLA1READ

  uint32_t `MemCfg_getUncorrErrorStatus`(void)

    Gets the current uncorrectable RAM error status.

    Return

      Returns the current error status, enumerated as a bit field of MEMCFG_UCERR_CPUREAD, MEMCFG_UCERR_DMAREAD, MEMCFG_UCERR_CLA1READ, or MEMCFG_UCERR_ECATMEMREAD.

  void `MemCfg_forceCorrErrorStatus`(uint32_t stsFlags)

    Sets the specified correctable RAM error status flag.

    This function sets the specified correctable RAM error status flag.

    Parameters

      - `stsFlags`: is a bit mask of the error sources. This parameter can be any of the following values: MEMCFG_CERR_CPUREAD, MEMCFG_CERR_DMAREAD, or MEMCFG_CERR_CLA1READ

    Return

      None.

  void `MemCfg_forceUncorrErrorStatus`(uint32_t stsFlags)

    Sets the specified uncorrectable RAM error status flag.

    This function sets the specified uncorrectable RAM error status flag.

    Parameters

      - `stsFlags`: is a bit mask of the error sources. This parameter can be any of the following values: MEMCFG_UCERR_CPUREAD, MEMCFG_UCERR_DMAREAD, MEMCFG_UCERR_CLA1READ, or MEMCFG_UCERR_ECATMEMREAD.

    Return

      None.

  void `MemCfg_clearCorrErrorStatus`(uint32_t stsFlags)

    Clears correctable RAM error flags.

    This function clears the specified correctable RAM error flags.

    Parameters

      - `stsFlags`: is a bit mask of the status flags to be cleared. This parameter can be any of the following : MEMCFG_CERR_CPUREAD, MEMCFG_CERR_DMAREAD, or MEMCFG_CERR_CLA1READ

    Return

      None.

  void `MemCfg_clearUncorrErrorStatus`(uint32_t stsFlags)

    Clears uncorrectable RAM error flags.

    This function clears the specified uncorrectable RAM error flags.

    Parameters

      - `stsFlags`: is a bit mask of the status flags to be cleared. This parameter can be any of the following : MEMCFG_UCERR_CPUREAD, MEMCFG_UCERR_DMAREAD, MEMCFG_UCERR_CLA1READ, or MEMCFG_UCERR_ECATMEMREAD.

    Return

      None.

  void `MemCfg_lockConfig`(uint32_t memSections)

    Locks the writes to the configuration of specified memory sections.

    This function locks writes to the access protection and master select configuration of a memory section.That means calling

    MemCfg_setProtection() or MemCfg_setLSRAMMasterSel() for a locked memory section will have no effect until MemCfg_unlockConfig() is called.
    Parameters

      - `memSections`: is the logical OR of the sections to be configured.

    The memSections parameter is an OR of one of the following sets of indicators:

    - MEMCFG_SECT_M0 and MEMCFG_SECT_M1 or MEMCFG_SECT_DX_ALL

    - MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx or MEMCFG_SECT_LSX_ALL

    - MEMCFG_SECT_GS0 through MEMCFG_SECT_GSx or MEMCFG_SECT_GSX_ALL

    - MEMCFG_SECT_MSGCLA1TOCPU, MEMCFG_SECT_MSGCPUTOCLA1 or use MEMCFG_SECT_MSGX_ALL to configure all message RAM sections.

    - OR use MEMCFG_SECT_ALL to configure all possible sections.

    Return

      None.

  void `MemCfg_unlockConfig`(uint32_t memSections)

    Unlocks the writes to the configuration of a memory section.

    This function unlocks writes to the access protection and master select configuration of a memory section that has been locked using

    MemCfg_lockConfig().
    Parameters

      - `memSections`: is the logical OR of the sections to be configured.

    The memSections parameter is an OR of one of the following sets of indicators:

    - MEMCFG_SECT_M0 and MEMCFG_SECT_M1 or MEMCFG_SECT_DX_ALL

    - MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx or MEMCFG_SECT_LSX_ALL

    - MEMCFG_SECT_GS0 through MEMCFG_SECT_GSx or MEMCFG_SECT_GSX_ALL

    - MEMCFG_SECT_MSGCLA1TOCPU, MEMCFG_SECT_MSGCPUTOCLA1 or use MEMCFG_SECT_MSGX_ALL to configure all message RAM sections.

    - OR use MEMCFG_SECT_ALL to configure all possible sections.

    Return

      None.

  void `MemCfg_commitConfig`(uint32_t memSections)

    Permanently locks writes to the configuration of a memory section.

    This function permanently locks writes to the access protection and master select configuration of a memory section. That means calling

    MemCfg_setProtection() or MemCfg_setLSRAMMasterSel() for a locked memory section will have no effect. To lock the configuration in a nonpermanent way, use MemCfg_lockConfig().
    Parameters

      - `memSections`: is the logical OR of the sections to be configured.

    The memSections parameter is an OR of one of the following sets of indicators:

    - MEMCFG_SECT_M0 and MEMCFG_SECT_M1 or MEMCFG_SECT_DX_ALL

    - MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx or MEMCFG_SECT_LSX_ALL

    - MEMCFG_SECT_GS0 through MEMCFG_SECT_GSx or MEMCFG_SECT_GSX_ALL

    - MEMCFG_SECT_MSGCLA1TOCPU, MEMCFG_SECT_MSGCPUTOCLA1 or use MEMCFG_SECT_MSGX_ALL to configure all message RAM sections.

    - OR use MEMCFG_SECT_ALL to configure all possible sections.

    Return

      None.

  void `MemCfg_setProtection`(uint32_t memSection, uint32_t protectMode)

    Sets the access protection mode of a single memory section.

    This function sets the access protection mode of a specified memory section. The mode is passed into the

    protectMode parameter as the logical OR of the following values:

    - MEMCFG_PROT_ALLOWCPUFETCH or MEMCFG_PROT_BLOCKCPUFETCH - CPU fetch

    - MEMCFG_PROT_ALLOWCPUWRITE or MEMCFG_PROT_BLOCKCPUWRITE - CPU write

    - MEMCFG_PROT_ALLOWDMAWRITE or MEMCFG_PROT_BLOCKDMAWRITE - DMA write

    Parameters

      - `memSection`: is the memory section to be configured.

      - `protectMode`: is the logical OR of the settings to be applied.

    The memSection parameter is one of the following indicators:

    - MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx

    - MEMCFG_SECT_GS0 through MEMCFG_SECT_GSx

    This function will have no effect if the associated registers have been locked by MemCfg_lockConfig() or MemCfg_commitConfig() or if the memory is configured as CLA program memory.

    Return

      None.

  void `MemCfg_setLSRAMMasterSel`(uint32_t ramSection, MemCfg_LSRAMMasterSel masterSel)

    Sets the master of the specified LSxRAM section.

    This function sets the master select configuration of the LSxRAM section.If the

    masterSel parameter is MEMCFG_LSRAMMASTER_CPU_ONLY, the LSxRAM section passed into the ramSection parameter will be dedicated to the CPU. If MEMCFG_LSRAMMASTER_CPU_CLA1, the memory section will be shared between the CPU and the CLA.
    Parameters

      - `ramSection`: is the LSxRAM section to be configured.

      - `masterSel`: is the sharing selection.

    The ramSection parameter should be a value from MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx.

    This function will have no effect if the associated registers have been locked by MemCfg_lockConfig() or MemCfg_commitConfig().

    Note

      This API only applies to LSxRAM.

    Return

      None.

  void `MemCfg_setTestMode`(uint32_t memSection, MemCfg_TestMode testMode)

    Sets the test mode of the specified memory section.

    This function sets the test mode configuration of the RAM section. The

    testMode parameter can take one of the following values:

    - MEMCFG_TEST_FUNCTIONAL

    - MEMCFG_TEST_WRITE_DATA

    - MEMCFG_TEST_WRITE_ECC

    - MEMCFG_TEST_WRITE_PARITY

    Parameters

      - `memSection`: is the memory section to be configured.

      - `testMode`: is the test mode selected.

    The memSection parameter is one of the following indicators:

    - MEMCFG_SECT_M0, MEMCFG_SECT_M1

    - MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx

    - MEMCFG_SECT_GS0 through MEMCFG_SECT_GSx

    - MEMCFG_SECT_MSGCPUTOCLA1, or MEMCFG_SECT_MSGCLA1TOCPU

    Return

      None.

  void `MemCfg_initSections`(uint32_t ramSections)

    Starts the initialization the specified RAM sections.

    This function starts the initialization of the specified RAM sections. Use

    MemCfg_getInitStatus() to check if the initialization is done.
    Parameters

      - `ramSections`: is the logical OR of the sections to be initialized.

    The ramSections parameter is an OR of one of the following sets of indicators:

    - MEMCFG_SECT_M0, MEMCFG_SECT_M1, or MEMCFG_SECT_DX_ALL

    - MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx, or MEMCFG_SECT_LSX_ALL

    - MEMCFG_SECT_GS0 through MEMCFG_SECT_GSx, or MEMCFG_SECT_GSX_ALL

    - MEMCFG_SECT_MSGCPUTOCLA1, or MEMCFG_SECT_MSGCLA1TOCPU, or MEMCFG_SECT_MSGX_ALL

    - OR use MEMCFG_SECT_ALL to configure all possible sections.

    Return

      None.

  bool `MemCfg_getInitStatus`(uint32_t ramSections)

    Get the status of initialized RAM sections.

    This function gets the initialization status of the RAM sections specified by the

    ramSections parameter.
    Parameters

      - `ramSections`: is the logical OR of the sections to be checked.

    The ramSections parameter is an OR of one of the following sets of indicators:

    - MEMCFG_SECT_M0, MEMCFG_SECT_M1, or MEMCFG_SECT_DX_ALL

    - MEMCFG_SECT_LS0 through MEMCFG_SECT_LSx, or MEMCFG_SECT_LSX_ALL

    - MEMCFG_SECT_GS0 through MEMCFG_SECT_GSx, or MEMCFG_SECT_GSX_ALL

    - MEMCFG_SECT_MSGCPUTOCLA1, or MEMCFG_SECT_MSGCLA1TOCPU, or MEMCFG_SECT_MSGX_ALL

    - OR use MEMCFG_SECT_ALL to get status of all possible sections.

    Note

      Use MemCfg_initSections() to start the initialization.

    Return

      Returns true if all the sections specified by ramSections have been initialized and false if not.

  uint32_t `MemCfg_getViolationAddress`(uint32_t intFlag)

    Get the violation address associated with a intFlag.

    Return

      Returns the violation address associated with the intFlag.

    Parameters

      - `intFlag`: is the type of access violation as indicated by ONE of these values:

        - MEMCFG_NMVIOL_CPUREAD - Non-master CPU read access

        - MEMCFG_NMVIOL_CPUWRITE - Non-master CPU write access

        - MEMCFG_NMVIOL_CPUFETCH - Non-master CPU fetch access

        - MEMCFG_NMVIOL_DMAWRITE - Non-master DMA write access

        - MEMCFG_NMVIOL_CLA1READ - Non-master CLA1 read access

        - MEMCFG_NMVIOL_CLA1WRITE - Non-master CLA1 write access

        - MEMCFG_NMVIOL_CLA1FETCH - Non-master CLA1 fetch access

        - MEMCFG_MVIOL_CPUFETCH - Master CPU fetch access

        - MEMCFG_MVIOL_CPUWRITE - Master CPU write access

        - MEMCFG_MVIOL_DMAWRITE - Master DMA write access

  uint32_t `MemCfg_getCorrErrorAddress`(uint32_t stsFlag)

    Get the correctable error address associated with a stsFlag.

    Return

      Returns the error address associated with the stsFlag.

    Parameters

      - `stsFlag`: is the type of error to which the returned address will correspond. Can currently take the value MEMCFG_CERR_CPUREAD only. Other values are reserved.

  uint32_t `MemCfg_getUncorrErrorAddress`(uint32_t stsFlag)

    Get the uncorrectable error address associated with a stsFlag.

    Return

      Returns the error address associated with the stsFlag.

    Parameters

      - `stsFlag`: is the type of error to which the returned address will correspond. It may be passed one of these values: MEMCFG_UCERR_CPUREAD, MEMCFG_UCERR_DMAREAD, or MEMCFG_UCERR_CLA1READ values

Many of the functions provided by this API to configure RAM sections’ settings will take a RAM section identifier or an OR of several identifiers as a parameter. These are #defines with names in the format MEMCFG_SECT_X. Take care to read the function description to learn which functions can operate on multiple sections of the same type at a time and which ones can only configure one section at a time. A quick way to check this is to see if the parameter says e ramSection or the plural e ramSections. Some functions may also be able to take a MEMCFG_SECT_ALL value to indicate that all RAM sections should be operated on at the same time. Again, read the function’s detailed description to be sure.

The code for this module is contained in driverlib/memcfg.c, with driverlib/memcfg.h containing the API declarations for use by applications.