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.

Enabling cache in OMAP5432

Other Parts Discussed in Thread: SYSBIOS

Hi,

I'm working with OMAP5432 and CCS version I'm using is 5.5.0.00077.

I'm facing some problem in enabling cache for the target OMAP5432. If I enable the cache in the cfg_script ;the program loaded never hits the main function though it shows its in running state.

With cache disabled I can run my program properly.

Is there any problem in the way I'm enabling cache in cfg_script. 

Screenshot of my cfg_script is given below.

Regards,

Thushara.

  • Hi Thushara,

    If you enable the M4 cache on OMAP5, you need to ensure that all the memory regions that are used are mapped in the AMMU as either cached or non-cached.

    Here's the link to AMMU cdoc:

    http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/bios/sysbios/6_35_04_50/exports/bios_6_35_04_50/docs/cdoc/index.html#ti/sysbios/hal/ammu/AMMU.html

    And here's some example AMMU config code:

    var AMMU = xdc.useModule('ti.sysbios.hal.ammu.AMMU');
    /*********************** Small Pages *************************/
    AMMU.smallPages[2].pageEnabled = AMMU.Enable_YES;
    AMMU.smallPages[2].logicalAddress = 0x20000000;
    AMMU.smallPages[2].translatedAddress = 0x55020000;
    AMMU.smallPages[2].translationEnabled = AMMU.Enable_YES;
    AMMU.smallPages[2].L1_writePolicy = AMMU.WritePolicy_WRITE_BACK;
    AMMU.smallPages[2].L1_allocate = AMMU.AllocatePolicy_ALLOCATE;
    AMMU.smallPages[2].L1_posted = AMMU.PostedPolicy_POSTED;
    AMMU.smallPages[2].L1_cacheable = AMMU.CachePolicy_CACHEABLE;
    AMMU.smallPages[2].size = AMMU.Small_16K;


    AMMU.largePages[0].pageEnabled = AMMU.Enable_YES;
    AMMU.largePages[0].logicalAddress = 0x80000000;
    AMMU.largePages[0].translationEnabled = AMMU.Enable_NO;
    AMMU.largePages[0].size = AMMU.Large_512M;
    AMMU.largePages[0].L1_cacheable = AMMU.CachePolicy_CACHEABLE;
    AMMU.largePages[0].L1_posted = AMMU.PostedPolicy_POSTED;

    Make sure to disbale the cache before loading an executable. If the cache is enabled and the AMMU is not configured correctly, the executable may not load correctly.

    Best,

    Ashish

  • Hi Ashish,

    I want to enable the DSP cache(c64Tesla) on OMAP5432. Is it possible to configure  AMMU module from DSP core?

    Regards

    Thushara. 

  • Hi Ashish,

    I have tried with the AMMU configuration you have given and it worked for me :) 

    Thanks a lot for your support. We have been struggling with cache for a long time.

    Regards

    Thushara.