Dereferencing NULL, in a C program, is ALWAYS undefined behavior. The fact that you are using a Cortex-M processor does not change this fact. It is spelled out very clearly in the C standard.
1. you're not required to use C
2. an extension to the C standard can decide to define that behaviour
(void*)(intptr_t)0
can in principle be more involved than a noop.