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.

DRAxx: C674x memory protection

Tool/software: TI C/C++ Compiler

Hi,I get the introduction of memory protection  from the section 2.9.2 of TRM :sprufk5a-TMS320C674x DSP Megamodule, I set the memory protection register value  as follow:

1、Enable L1P、L1D Cache 32K

2、MPPA

L1PMPPA0-31: 0,all access dennied。

L1DMPPA0-31: 0,all access dennied。

 when I debug it,I found that write to L1P、L1D memory can trigger an exception PMC_CMPA /DMC_CMPA event ,but read from L1P 、L1D memory,there is no exception。

Is this right?

  • Hi,

    I've notified the C674x team. Their feedback will be posted here.

    Best Regards,
    Yordan
  • Ray,

    In memory protection registers, Have you configured MPSAR, MPEAR, and MPPA to match your expected configuration.

    There is a good discussion on this topic with an example on the e2e post here:

     

    Based on that discussion, I think you need to set the AIDs to 1 for the memory protection to apply. Please review the information shared there and let us know if you have any follow up questions.

    Regards.

    Rahul

  • Hi,Rahul,

    Thank you for your answer.I have read the discussion,I think there is some diffrences.

    1、I set the AIDs to 0,at least there is an exception when write to L1P、L1D memory,but no excption is generated when read from L1P、L1D memory。

    2、I have tried to set the AIDx to 1 for your sugggestion,but no excption for read from L1P、L1D memory。

    3、My DSP type: DRA624, ARM cortex-A8 + C674x DSP, I can't find out the MPSAR/MPEAR from the MPU module .From the  TRM  setion 2.9.2 of sprufk5a-TMS320C674x DSP Megamodule, the MPU register is as follow:

    Thanks,

    Ray

  • Ray,

    Since this is Automotive Infotainment part, I will move this to the relevant forum so that the device experts can answer the question.

    Regards,
    Rahul
  • Ray,

    What addresses are you attempting to read from? You may get a CPU exception instead of a MPPA exception in the case of CPU reading from L1P or L1D.

    Alternatively, can you try to set up an IDMA to read or write from L1D/L1P - I expect that would give a direct exception from the L1PMPF* and L1DMPF* registers.

    Regards
    Kyle