Writing into 0x0 is creating System Exception in m33 whereas in m4 it is not

Hi 

We are using one of the m4-based microcontrollers. Unfortunately, it is reaching the End of life. Our Team decided to go with a cortex  m33-based microcontroller.

In that, I found that 

int *ptr;
ptr=0;
*ptr=100;

This piece of code is not creating any Exceptions in m4 but in m-33 it is creating. Is this expected from the m-33 processor? 

If we migrate from m4-based controller to m33 what are thing we need to take care of?

Thanks in Advance

  • Cortex-M4 is Armv7-M architecture processor while Cortex-M33 is Armv8-M architecture processor. Cortex-M33 implements the Armv8‑M architecture with the Main Extension. Cortex-M33 is based on the Armv8‑M architecture and is primarily for use in environments where security is an important consideration.

    In your example code, re-assign a value to a NULL pointer may trigger Security Check or Memory Access Check.   You can check the disassembly code further.

    Cortex-M33 will have stricter exception check than v7-M processors.