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.

Compiler/TMS570LC4357: TMS570

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Tool/software: TI C/C++ Compiler

Hello Community,

I've got the same "problem" I think. Can anyone help to give a hint how to configure the MPU RAM region for ramfunc usage? We're using a freeRTOS config with HalCoGen. The Debugger halts at prefetchEntry.

Kind regards

Dennis

  • Hello Dennis,

    Can I have the details of the problem?

    Please check the CPU fault status and address registers to identify the address being accessed that causes the abort.

    Instruction Fault Address Register (IFAR) and Status:

  • Hello Mr. Wang,

    thank you for your fast reply. I've attached some screenshots from the registers and the memory configuration in HalCoGen:

  • Hello,

    The IFSR is 0x0000000D. The status bit field is 0xD which is permission fault.

    A permission fault is generated when a memory access does not meet the requirements of the permissions defined for the memory region that it accesses

  • Hello Mr. Wang,

    thank you for your help. Last week i've tried to set the MPU configuration probably, but i failed. So I decided to set up a new project with only one function to understand whats going on.

    I've changed the permission for the RAM-section (0x08.... to 0x0807FFFF) in Halcogen to: MPU_PRIV_RW_USER_RW_EXEC   : Alias no read/write in privileged mode, read/write in user mode and execute. According to www.ti.com/lit/an/spna238/spna238.pdf page 6 the executable RAM needs read/write and exec. permission,

    I hope anyone can help getting the correct configuration for this "easy" problem. I've attached some Debugger files for better understanding:

    thank you and

    kind regards.

  • Hello,

    Please refer to the MPU settings in freeRTOS.

    www.freertos.org/xTaskCreateRestricted.html
  • Hello,

    thank you for the reply, but the code shall be processed direct in the isr for timing reasons, the switch to a task takes too long.
    May be it's a workaraound to run the function in the sdram section 0x80000000 instead of the protected ram 0x08000000.

    Kind regards.