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.

Enable MPU on OMAP-L138 DSP

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

I am trying to use MPU2 on the OMAP-L138 to prevent the DSP from accessing external DDR memory that is used by the ARM.  It does not seem to be enabled, because memory does not get protected when I set up the address ranges.  I downloaded some sample code that was posted by Daniel Allred as C6748_mpuTest.zip from:

http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/158135.aspx

I can run the code on my target using a Blackhawk emulator, but it does not protect the memory.  I did make a few minor modifications to match our target.  I changed the linker command file to put the code in external memory at 0xc6000000, and I set the test start address in main.c to 0xc8000000.  I also commented out the MPU1 test.

When I execute the test on our target, all the writes and reads work, and no MPU access interrupt is generated.  Is MPU2 somehow disabled?  On our target, the ARM runs and does some initialization prior to me connecting the JTAG debugger.

I zipped up my test project along with results.  Can I send it to someone?

Thanks,  -Bob

  • I got the memory protection working by disabling the corresponding memory in the MAR.  So it was the cache.

  • Hi Robert,

    Thanks for your post.

    I have few suggestions as below:

    1. Please check for the appropriate values of fixed and programmable memory address ranges to be configured for MPU2 in the configuration register (CONFIG). Please refer Section 6.3.2 in the TRM and also, enable ASSUME_ALLOWED bit field, sothat, this bit determines whether the transfer is assumed to be allowed or not allowed if when an address is not covered by any MPU protection range.

    Please check Table 6-2. for the MPU Default Configuration in the OMAPL138 TRM

    2. Please enable the PROTERR_EN and ADDRERR_EN bits in the Interrupt Enable Set Register (IENSET)to be set for protection violation ((MPU_PROT_ERR_INT) or address violation (MPU_ADDR_ERR_INT) error interrupts if any. By this, the MPU can record a detected fault for any protection violation  or invalid access, and notify the system through an interrupt.

    3. Please ensure the page size for MPU2 to be 64KB and the start address must be aligned on a page boundary, because the size of the page determines the width of the address field in PROGn_MPSAR and the programmable range n end address register (PROGn_MPEAR)

     4. You can also check the value of Fault Address register (FLTADDRR) holds the address of the first protection fault transfer and also, you can check the fault type and fault status attributes of the first protection fault transfer by reading the values of Fault Status register (FLTSTAT)

    Kindly validate the issue with the above suggestions.

    Thanks & regards,

    Sivaraj K

    -------------------------------------------------------------------------------------------------------
    Please click the Verify Answer button on this post if it answers your question.
    --------------------------------------------------------------------------------------------------------