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.

Interpreation of the MPU default settings in HalCoGen

Other Parts Discussed in Thread: HALCOGEN

Hello

I did not find an interpretation of the MPU default settings in HalCoGen in any of the documents. So I started reverse engineering the pre-configured memory regions. The first memory regions are straight forward (RAM, Flash) but starting from Region 4 the intention of the already configured regions is not clear:

Region 1:
Region 1 is enabled, however all sub-regions are disabled. Does this disable the whole region in the same way as unchecking the "enable MPU region" would do?

Region 3:
Region 3 is mapped to the RAM. However, all sub-regions are disabled and no other region is mapped to the RAM. How come, that the processor runs? To my understanding, accesses to the RAM are illegal using this setting.

Region 4:
Same problem as in region 3.

Gest Regards

Flurin Bühler

  • Hello Flurin,

    The CPU TRM shows that in case the MPU is enabled but an access to an invalid region occurs, a background fault is generated...

    I am checking with the HalCoGen experts to further answer your questions and worries on the MPU tab and will get back to you as soon as I reach a good understanding.

    Best regards,

    Luc

  • Hi Flurin,

    I cannot speak for the HALCoGen team, but for the ARM MPU in general the subregion enable/disable is optional.  A region can be enabled without enabling subregion support.  This is an area where ARM's documents could be more clear.  Rather than place the full details in the R4 TRM, ARM elected to put the full details in the ARM v7A/R architecture manual.  You can download this manual from ARM here, but registration is required:  https://silver.arm.com/download/download.tm?pv=1199569.

    Best Regards,

    Karl Greb

  • Closing this thread as this question was answered on the RM forum.