CORTEX M4 background region (region -1) when running in privileged access level 00 (nPRIV=0, SPSEL=0)

Hi,

The documentation seems to suggest that enabling the MPU with PRIVDEFENA field set (MPU->CTRL) will enable the porivileged default memory when running in privileged access level.

Our code works with the default CONTROL nPRIV=0,  SPSEL=0.

We are attempting to configure a single specific MPU region expecting the rest to be covcered by the porivileged default map, we do not see that is the case.

On the other hand once we move to work with CONTROL =0x2 (nPRIV=0,  SPSEL=1) the behaviour indeed matces expected, i.e. we do not get exceptions on activity outside the one region we have defined.

This is the documentation of MPU->CTRL.PRIVDEFENA

"Privileged default memory map enable.
When set to 1 and if the MPU is enabled,
the default memory map will be used for
privileged accesses as a background
region. If this bit is not set, the
background region is disabled and any
access not covered by any enabled
region will cause a fault"

While This is the do of CONTROL nPRIV, SPSEL 0x00:

" Simple applications – the whole application is running in
privileged access level. Only one stack is used by the main
program and interrupt handlers. Only the Main Stack
Pointer (MSP) is used."

Is this expected behaviour or are we missing some step?