This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/PROCESSOR-SDK-AM437X: What's the difference in using MMU of example?

Part Number: PROCESSOR-SDK-AM437X
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

I'm studying to access a asynchronous SRAM(16bits,1MByte) on AM437x GPMC.Two examples are used :enet_app_tcpecho, and Nimu_BasicExample_skAM437x_armExampleproject. and its use the same GPMC init function as follow:

void SDKGPMCInit(void)
{
    gpmcChipSelTimingParams_t csTimingParams;
    gpmcAdvSignalTimingParams_t advSignalTimingParams;
    gpmcOeWeSignalTimingParams_t oeWeSignalTimingParams;
    gpmcReadAccessTime_t readAccesParams;
    gpmcCycle2CycleDelay_t cycleDelayParams;
    int32_t status = S_PASS;
    // configure the SRAM
    GPMCModuleReset(SOC_GPMC_CONFIG_REG);
    status = GPMCIsModuleResetDone(SOC_GPMC_CONFIG_REG);
    NIMU_log("Board_GPMC reset status [0x%x]\n", status);
    status = GPMCGetRevision(SOC_GPMC_CONFIG_REG);
    NIMU_log("Board_GPMC version [0x%x]\n", status);

    GPMCSetIdleMode(SOC_GPMC_CONFIG_REG, GPMC_IDLE_MODE_NO_IDLE);                           // no idle
    GPMCIntrDisable(SOC_GPMC_CONFIG_REG, GPMC_INTR_MASK_ALL);                               // disable interrupt
    GPMCTimeoutEnable(SOC_GPMC_CONFIG_REG, FALSE);                                          // timout disable
    GPMCChipSelEnable(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, FALSE);                         // CS disable
    GPMCSetDevType(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_DEV_TYPE_NOR);                // Nor Type
    GPMCSetAddrDataMuxType(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_MUX_TYPE_NONE);       // none mux
    GPMCSetDevSize(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_DEV_SIZE_16BIT);               // 16bits
    GPMCSetAccessMode(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_OPER_MODE_READ, GPMC_ACCESS_MODE_SINGLE);   // single read
    GPMCSetAccessMode(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_OPER_MODE_WRITE, GPMC_ACCESS_MODE_SINGLE);  // single write
    GPMCSetAccessType(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_ACCESS_TYPE_ASYNC_READ);                    // async read
    GPMCSetAccessType(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_ACCESS_TYPE_ASYNC_WRITE);                   // async write
    GPMCSetChipSelBaseAddr(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, 0x1000000>>24);                             // base address=0x1000000
    GPMCSetChipSelMaskAddr(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_MASK_ADDR_16MB);                       // mask address=0xf, 16MBytes
    GPMCSetFclkDivider(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_FCLK_DIVIDER_1);
    GPMCSetTimeParaGranularity(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, GPMC_TIME_GRANULARITY_X1);
    csTimingParams.chipSelOnTime = 0x00;
    csTimingParams.chipSelRdOffTime = 0x07;
    csTimingParams.chipSelWrOffTime = 0x07;
    csTimingParams.addExtDelay = 0x01;
    GPMCChipSelectTimingConfig(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, &csTimingParams);
    advSignalTimingParams.advOnTime = 0x01;
    advSignalTimingParams.advRdOffTime = 0x02;
    advSignalTimingParams.advWrOffTime = 0x02;
    advSignalTimingParams.addExtDelay = 0x01;
    advSignalTimingParams.advAadMuxOnTime = 0x01;
    advSignalTimingParams.advAadMuxRdOffTime = 0x02;
    advSignalTimingParams.advAadMuxWrOffTime = 0x02;
    GPMCAdvSignalTimingConfig(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, &advSignalTimingParams);
    oeWeSignalTimingParams.oeOnTime = 0x01;
    oeWeSignalTimingParams.oeOffTime = 0x06;
    oeWeSignalTimingParams.addExtDelay = 0x01;
    oeWeSignalTimingParams.writeEnableOnTime = 0x00;
    oeWeSignalTimingParams.writeEnableOffTime = 0x06;
    oeWeSignalTimingParams.oeAadMuxOffTime = 0x00;
    oeWeSignalTimingParams.oeAadMuxOnTime = 0x00;
    GPMCWeOeSignalTimingConfig(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, &oeWeSignalTimingParams);
    readAccesParams.readAccessTime = 0x06;
    readAccesParams.readCycleTime = 0x07;
    readAccesParams.writeCycleTime = 0x07;
    readAccesParams.pageBurstAccessTime = 0x07;
    GPMCReadAccessTimingConfig(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, &readAccesParams);
    GPMCWriteAccessTimingConfig(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, 0x06, 0x00);
    cycleDelayParams.cycle2CycleDelay = 0x01;
    cycleDelayParams.cycleDelayDiffChipSel = 0x01;
    cycleDelayParams.cycleDelaySameChipSel = 0x01;
    cycleDelayParams.busTurnAroundTime = 0x01;
    GPMCCycleDelayTimingConfig(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1,  &cycleDelayParams);

    GPMCChipSelEnable(SOC_GPMC_CONFIG_REG, GPMC_CHIP_SEL_1, TRUE);                         // CS enable

    return;
}

and I use a type uint64_t variable to perform continuous read and write operations.

but I find that there is no time delay between two read or write operations in the example enet_app_tcpecho, while there is about 300ns time delay between two read or write operations in the example Nimu_BasicExample_skAM437x_armExampleproject. ,

I wonder if it's because these two examples call different MMU initializing function.(MMUConfigAndEnable() and CACHEEnable(CACHE_IDCACHE, CACHE_INNER_OUTER) in the enet_app_tcpecho,SDKMMUInit(applMmuEntries) in the Nimu_BasicExample_skAM437x_armExampleproject)

pdk_am437x_1_0_10, sysbios_ind_sdk_2.1.0.1

CCS7

What's the difference between MMU and cache initialization in these two examples? Why do SRAM access timing differ?

  • Hi,

    Could you use the GPMC driver from Processor SDK RTOS on AM437x?

    The SW is available: software-dl.ti.com/.../index_FDS.html .
    The user guide: software-dl.ti.com/.../index_device_drv.html

    The MMU setup is under ti\pdk_am437x_1_0_13\packages\ti\drv\gpmc\test\am437x\armv7\bios\gpmc_arm_evmam437x.cfg. If you want to use your own GPMC test code, you can create a SYSBIOS task and run it and measure the SRAM access timing.

    Regards, Eric
  • Hi Eric,
    I looked though the examples, I think that it is for the FLASH chip, not for the SRAM, the read and write operation will be big different. so I refered to the example "nand_app_read_write" in the sysbios_ind_sdk_2.1.0.1, and transplanted its hardware driver. now the code can work orderly. but when I transplanted this code to TI-RTOS( example Nimu_BasicExample_skAM437x_armExampleproject), I found the delay.
    do you the code for SRAM operation in SDK RTOS? or any advice?
    can you tell me the different between the function SDKMMUInit() and the function MMUConfigAndEnable() and CACHEEnable()?
  • zhuangbin,

    sysbios_ind_sdk_2.1.0.1 was migrated into Processor SDK RTOS. In Processor SDK RTOS, the GPMC interface for AM335x or AM437x are for flash devices, sorry we don't have any code examples for SRAM. But as you already developed the GMPC to SRAM code and proved working, the only thing you need to do is get the correct cache and MMU setting.

    As mentioned earlier, you can refer to ti\pdk_am437x_1_0_13\packages\ti\drv\gpmc\test\am437x\armv7\bios\gpmc_arm_evmam437x.cfg:

    * ================ Cache and MMU configuration ================ */

    var Cache = xdc.useModule('ti.sysbios.family.arm.a9.Cache');
    Cache.enableCache = true;
    Cache.configureL2Sram = false;//DDR build

    var Mmu = xdc.useModule('ti.sysbios.family.arm.a8.Mmu');
    Mmu.enableMMU = true;

    /* Force peripheral section to be NON cacheable strongly-ordered memory */
    var peripheralAttrs = {
    type : Mmu.FirstLevelDesc_SECTION, // SECTION descriptor
    tex: 0,
    bufferable : false, // bufferable
    cacheable : false, // cacheable
    shareable : false, // shareable
    noexecute : true, // not executable
    };

    /* Define the base address of the 1 Meg page the peripheral resides in. */
    var prcmBaseAddr = 0x44df2800;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(prcmBaseAddr,
    prcmBaseAddr,
    peripheralAttrs);

    var i2c0BaseAddr = 0x44e0b000;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(i2c0BaseAddr,
    i2c0BaseAddr,
    peripheralAttrs);

    /* Define the base address of the 1 Meg page the peripheral resides in. */
    var uart3BaseAddr = 0x481a6000;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(uart3BaseAddr,
    uart3BaseAddr,
    peripheralAttrs);

    /* Define the base address of the 1 Meg page the peripheral resides in. */
    var gpmcBaseAddr = 0x50000000;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(gpmcBaseAddr,
    gpmcBaseAddr,
    peripheralAttrs);

    /* Define the base address of the 1 Meg page the peripheral resides in. */
    var elmBaseAddr = 0x48080000;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(elmBaseAddr,
    elmBaseAddr,
    peripheralAttrs);


    Also, create a task function, and add all your main functions as a task. Then test it.

    Regards, Eric
  • Hi Eric,

    I compared the gpmc_arm_evmam437x.cfg with the .cfg and MMU init code(the function SDKMMUInit()) of NIMU_BasicExample_skAM437x_armExampleproject, I thank that they perform the same functions.

    and I want you to notice the different initialization parameters of the MMU in the example tcpecho of sysbios_ind_sdk_2.1.0.1,it call the mmu init function in the example_utils_mmu.c with the parameter as follow:

    mmuMemRegionConfig_t regionSRAM =
                {
                    0x1000000,
                    1,
                    1*MEM_SIZE_MB,
                    MMU_MEM_ATTR_DEVICE_NON_SHAREABLE,
                    MMU_CACHE_POLICY_WT_NOWA,
                    MMU_CACHE_POLICY_WT_NOWA,
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE
                };

    these parameter may not be used in the Processor SDK RTOS init codes.

    I understand what you mean. I will use the API to initialize the GPMC, and write my own program to read and write SRAM.

    but I  researched the GPMC setting parameters GPMC_v1_HwAttrs_s in the GPMC_v1.h, many of these parameters are not well understood.

    As I mentioned earlier in the init code, the SRAM CS is connected to the gpmc_csn1, physical base address is 0x1000000, address space is 16MBytes, 

    How to set these parameters of GPMC_v1_HwAttrs_s?

  • Hi,

    What I meant is: You create a SYSBIOS project. Inside this project you have:
    - .cfg file, that comes from ti\pdk_am437x_1_0_13\packages\ti\drv\gpmc\test\am437x\armv7\bios\gpmc_arm_evmam437x.cfg
    - main.c file,

    int main(void)
    {
    Task_Handle task;
    Error_Block eb;

    Error_init(&eb);

    task = Task_create(SDKGPMCInit, NULL, &eb);
    if (task == NULL) {
    System_printf("Task_create() failed!\n");
    BIOS_exit(0);
    }

    /* Start BIOS */
    BIOS_start();
    return (0);
    }

    Where SDKGPMCInit() is your own bare metal GPMC initialization and test code before, no need to change. In this way you can use the SYSBIOS to setup the MMU and calls your original test code. You don't need to use any GPMC libraries from pdk_am437x_1_0_13\packages\ti\drv\gpmc\lib and you don't need to use anything like GPMC_v1_HwAttrs_s.

    You can look at a simple "hello world" in SYSBIOS. software-dl.ti.com/.../index_examples_demos.html

    Regards, Eric
  • Hi Eric,
    In the cfg, do I need to setup MMU for the SRAM baseaddress( 0x100000)?
  • Hi,

    My SRAM baseaddress is 0x1000000. in the .cfg file, do I need to add the codes as follow:

    var peripheralBaseAddr = 0x1000000;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(peripheralBaseAddr,   peripheralBaseAddr,  peripheralAttrs);

    I do it, and the results is same as the one of NIMU_BasicExample_skAM437x_armExampleproject, there is a about 260ns delay after each access.

  • Hi,

    >>>var peripheralBaseAddr = 0x1000000;

    /* Configure the corresponding MMU page descriptor accordingly */
    Mmu.setFirstLevelDescMeta(peripheralBaseAddr, peripheralBaseAddr, peripheralAttrs);
    >>>>

    What is the peripheralAttrs for this?

    Regards, Eric
  • Hi,

    You wanted this setup using SYSBIOS
    mmuMemRegionConfig_t regionSRAM =
    {
    0x1000000,
    1,
    1*MEM_SIZE_MB,
    MMU_MEM_ATTR_DEVICE_NON_SHAREABLE,
    MMU_CACHE_POLICY_WT_NOWA,
    MMU_CACHE_POLICY_WT_NOWA,
    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
    FALSE
    };

    I found this E2E: e2e.ti.com/.../1395492

    In order to mark a memory page as write-through cacheable, you will need to update that page's corresponding MMU entry. To change the cacheability of a page to outer and inner write-through no write-allocated, set the TEX[2:0] attribute for the page to 0, cacheable to true and bufferable to false. Here's some untested code showing how to do this using SYS/BIOS APIs:

    Mmu_FirstLevelDescAttrs attrs;
    Mmu_initDescAttrs(&attrs);

    attrs.type = Mmu_FirstLevelDescType_SECTION;
    attrs.tex = 0;
    attrs.cacheable = true;
    attrs.bufferable = false;

    attrs.shareable = false;

    You can refer to ARM architecture document static.docs.arm.com/.../DDI0406C_C_arm_architecture_reference_manual.pdf. B3.8.2 Short-descriptor format memory region attributes, without TEX remap for the combination of TEX, B-bit and C-bit to achieve Outer and Inner Write-Through, no Write-Allocate.

    Regards, Eric
  • Hi Eric,

    I change the settings as what you tell me. now it is ok.

    Thank you very much!

    I'd like to know the relationship of structural parameter settings between mmuMemRegionConfig_t and Mmu_FirstLevelDescAttrs.

    as follow:

    /** \brief  Define DDR memory region. DDR can be configured as Normal memory  with R/W access in user/privileged modes. */
    mmuMemRegionConfig_t regionDdr =
                {   
                    START_ADDR_DDR,
                    NUM_SECTIONS_DDR,                            /* Number of pages */
                    1U*MEM_SIZE_MB,                                   /* Page size - 1MB */
                    MMU_MEM_ATTR_NORMAL_NON_SHAREABLE,
                    MMU_CACHE_POLICY_WB_WA,            /* Inner */
                    MMU_CACHE_POLICY_WB_WA,            /* Outer */
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE /* Non Secure memory */
                };

    /** \brief Define OCMC RAM region. */
    mmuMemRegionConfig_t regionOcmc =
                {   
                    0,
                    NUM_SECTIONS_OCMC, /* Number of pages */
                    1U*MEM_SIZE_MB, /* Page size - Min 1MB */
                    MMU_MEM_ATTR_NORMAL_NON_SHAREABLE,
                    MMU_CACHE_POLICY_WT_NOWA, /* Inner */
                    MMU_CACHE_POLICY_WB_WA, /* Outer */
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE /* Non Secure memory */
                };

    /** \brief Define Device Memory Region. The region between OCMC and DDR is  configured as device memory, with R/W access in user/privileged  modes. Also, the region is marked 'Execute Never'.
     */
    mmuMemRegionConfig_t regionDev =
                {   
                    START_ADDR_DEV,
                    NUM_SECTIONS_DEV,                    /* Number of pages */
                    1U*MEM_SIZE_MB,                          /* Page size - 1MB */
                    MMU_MEM_ATTR_DEVICE_SHAREABLE,
                    MMU_CACHE_POLICY_WB_WA,     /* Inner - Invalid here */
                    MMU_CACHE_POLICY_WB_WA,     /* Outer - Invalid here */
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE                                                /* Non Secure memory */
                };

    mmuMemRegionConfig_t regionQspi =
                {
                    START_ADDR_QSPI,
                    NUM_SECTIONS_QSPI,                      /* Number of Pages */
                    1U*MEM_SIZE_MB,                             /* Page size - 1MB */
                    MMU_MEM_ATTR_DEVICE_NON_SHAREABLE,
                    MMU_CACHE_POLICY_WB_WA,       /* Inner - Irrelevant here */
                    MMU_CACHE_POLICY_WB_WA,       /* Outer - Irrelevant here */
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE                                                  /* Non Secure memory */
                };

    How should I set relevant parameters of the Mmu_FirstLevelDescAttrs  in response to the above parameter settings?

  • Hi,

    For the structure defined inside mmuMemRegionConfig_t:

    typedef struct region {
    uint32_t startAddr; /**< Start Address of the page */
    uint32_t numPages; /**< Number of Pages in the region */
    uint32_t pgSize; /**< Size of the Page (in bytes) */
    mmuMemAttr_t memAttrib; /**< SO, Device, Normal (shareable ?) */
    mmuCachePolicy_t innerCachePolicy; /**< Applicable for normal mem only */
    mmuCachePolicy_t outerCachePolicy; /**< Applicable for normal mem only */
    mmuAccessCtrl_t accessCtrl; /**< Access Permissions for the page */
    uint32_t isMemSecure; /**< Secure or non secure (TRUE or FALSE) */
    }

    startAddr is where it starts, numPages*pgSize determine the length. In the SYSBIOS, the first Level descriptor size is 1GB, the second level descriptor size is 4MB.

    For the rest fields, please read the ARM architecture document section B3.7 and B3.8 for the relationship.

    Regards, Eric
  • Hi,
    I want to know how to set the parameters of Mmu_FirstLevelDescAttrs to achieve the setting effect of the parameters of mmuMemRegionConfig_t.
    now I had known that if we set the parameters of Mmu_FirstLevelDescAttrs:
    attrs.type = Mmu_FirstLevelDescType_SECTION;
    attrs.tex = 0;
    attrs.cacheable = true;
    attrs.bufferable = false;
    attrs.shareable = false;

    it is same as the parameters setting of mmuMemRegionConfig_t:
    1*MEM_SIZE_MB,
    MMU_MEM_ATTR_DEVICE_NON_SHAREABLE,
    MMU_CACHE_POLICY_WT_NOWA,
    MMU_CACHE_POLICY_WT_NOWA,
    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
    FALSE


    I don't know the relationship between the two sets of parameters.
    if the changing the parameters setting of mmuMemRegionConfig_t, I do not know how to set the parameters of Mmu_FirstLevelDescAttrs, like as follow:
    mmuMemRegionConfig_t regionDdr =
                {   
                    START_ADDR_DDR,
                    NUM_SECTIONS_DDR,                            /* Number of pages */
                    1U*MEM_SIZE_MB,                                   /* Page size - 1MB */
                    MMU_MEM_ATTR_NORMAL_NON_SHAREABLE,
                    MMU_CACHE_POLICY_WB_WA,            /* Inner */
                    MMU_CACHE_POLICY_WB_WA,            /* Outer */
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE /* Non Secure memory */
                };

    or
    mmuMemRegionConfig_t regionOcmc =
                {   
                    0,
                    NUM_SECTIONS_OCMC, /* Number of pages */
                    1U*MEM_SIZE_MB, /* Page size - Min 1MB */
                    MMU_MEM_ATTR_NORMAL_NON_SHAREABLE,
                    MMU_CACHE_POLICY_WT_NOWA, /* Inner */
                    MMU_CACHE_POLICY_WB_WA, /* Outer */
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE /* Non Secure memory */
                };

    or
    mmuMemRegionConfig_t regionDev =
                {   
                    START_ADDR_DEV,
                    NUM_SECTIONS_DEV,                    /* Number of pages */
                    1U*MEM_SIZE_MB,                          /* Page size - 1MB */
                    MMU_MEM_ATTR_DEVICE_SHAREABLE,
                    MMU_CACHE_POLICY_WB_WA,     /* Inner - Invalid here */
                    MMU_CACHE_POLICY_WB_WA,     /* Outer - Invalid here */
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE                                                /* Non Secure memory */
                };
    or
    mmuMemRegionConfig_t regionQspi =
                {
                    START_ADDR_QSPI,
                    NUM_SECTIONS_QSPI,                      /* Number of Pages */
                    1U*MEM_SIZE_MB,                             /* Page size - 1MB */
                    MMU_MEM_ATTR_DEVICE_NON_SHAREABLE,
                    MMU_CACHE_POLICY_WB_WA,       /* Inner - Irrelevant here */
                    MMU_CACHE_POLICY_WB_WA,       /* Outer - Irrelevant here */
                    MMU_ACCESS_CTRL_PRV_RW_USR_RW,
                    FALSE                                                  /* Non Secure memory */
                };
    I want to know how to set the corresponding parameters of Mmu_FirstLevelDescAttrs.

  • Hi,

    That is I suggest you to find it out from ARM document sections I mentioned. I copy the table here:

    MMU_MEM_ATTR_NORMAL_NON_SHAREABLE

    MMU_CACHE_POLICY_WB_WA

    is:

    attrs.tex = b'001;

    attrs.cacheable = true;

    attrs.bufferable = true;

    attrs.shareable = false;

          MMU_MEM_ATTR_NORMAL_NON_SHAREABLE,

                   MMU_CACHE_POLICY_WT_NOWA, /* Inner */

                   MMU_CACHE_POLICY_WB_WA, /* Outer */

    is

    attrs.tex = b'111;

    attrs.cacheable = true;

    attrs.bufferable = false;

    attrs.shareable = false;

    MU_MEM_ATTR_DEVICE_SHAREABLE,

                   MMU_CACHE_POLICY_WB_WA,     /* Inner - Invalid here */

                   MMU_CACHE_POLICY_WB_WA,     /* Outer - Invalid here */

    is

    attrs.tex = b'001;

    attrs.cacheable = true;

    attrs.bufferable = true;

    attrs.shareable = true;

    Regards, Eric

  • Yes,I see.

    Thank you very much!!

    I  had tried the 

    MU_MEM_ATTR_DEVICE_SHAREABLE,

    MMU_CACHE_POLICY_WB_WA,     /* Inner - Invalid here */

    MMU_CACHE_POLICY_WB_WA,     /* Outer - Invalid here */

    with 

    attrs.tex = b'001;

    attrs.cacheable = true;

    attrs.bufferable = true;

    attrs.shareable = true;

    its codes as follow:

    SYS_MMU_ENTRY applMmuEntries[] = {
        {(void*)0x40300000,0},  //OCMCRAM  - Cacheable
        {(void*)0x44D00000, SYS_MMU_BUFFERABLE},  //PRCM - Non bufferable| Non Cacheable
        {(void*)0x44E00000, SYS_MMU_BUFFERABLE},  //Clock Module, PRM, GPIO0, UART0, I2C0, - Non bufferable| Non Cacheable
        {(void*)0x47900000,0},  //QSPI MMR Maddr0space
        {(void*)0x48000000, SYS_MMU_BUFFERABLE},  //UART1,UART2,I2C1,McSPI0,McASP0 CFG,McASP1 CFG,DMTIMER,GPIO1 -Non bufferable| Non Cacheable
        {(void*)0x48100000,0},  //I2C2,McSPI1,UART3,UART4,UART5, GPIO2,GPIO3,MMC1 - Non bufferable| Non Cacheable
        {(void*)0x48200000, SYS_MMU_BUFFERABLE},  //
        {(void*)0x48300000, SYS_MMU_BUFFERABLE},  //PWM - Non bufferable| Non Cacheable
        {(void*)0x49000000, SYS_MMU_BUFFERABLE},   //EDMA3CC - Non bufferable| Non Cacheable
        {(void*)0x4A000000, SYS_MMU_BUFFERABLE},  //L4 FAST CFG- Non bufferable| Non Cacheable
        {(void*)0x4A100000, SYS_MMU_BUFFERABLE},  //CPSW - Non bufferable| Non Cacheable
        {(void*)0x50000000, 0},  //GPMC Configure -Bufferable| Non Cacheable | Shareable
        {(void*)0x54400000, 0},  //PRU-ICSS0/1 -Bufferable| Non Cacheable | Shareable

        {(void*)0xFFFFFFFF,0xFFFFFFFF}
    };

        Mmu_disable();
        Mmu_initDescAttrs(&attrs);
        attrs.type = Mmu_FirstLevelDesc_SECTION;
        attrs.domain = 0;
        attrs.imp = 1;
        attrs.accPerm = 3;
        attrs.tex = 1;
        attrs.bufferable = 1;
        attrs.cacheable  = 1;
        attrs.shareable  = 1;
        attrs.noexecute  = 1;

        for(itr = 0 ; mmuEntries[itr].address != (void*)0xFFFFFFFF ; itr++)
        {
            Mmu_setFirstLevelDesc((Ptr)(mmuEntries[itr].address), (Ptr)(mmuEntries[itr].address) , &attrs);  // PWM
        }

    for the device. and I found that it did not work orderly. if It changed as follow:

        attrs.tex = 0;
        attrs.bufferable = 0;
        attrs.cacheable  = 0;
        attrs.shareable  = 0;
        attrs.noexecute  = 1;

    it is ok.

    any advice?