Not only writing and reading the 0x0 address will not lead to a crash or reboot, it is actually a completely legitimate operation that is often used by MSP430 applications.
The initial portion or memory card of the MSP430 is reserved for I / O ports and control registers: http://en.wikipedia.org/wiki/TI_MSP430#MSP430_address_space
In particular, the control registers at 0x0 and the following addresses:
#define IE1_ 0x0000 #define IE2_ 0x0001 #define IFG1_ 0x0002 #define IFG2_ 0x0003
So, for example, writing zero to the address of this memory by dereferencing the uint8_t * or uint16_t * will disable interrupts. By writing zero by dereferencing uint32_t * , it will also clear the flags. Increasing the value of these registers does not make much sense, but should be completely legal.
At least this applies to the msp430 Series 1, Series 2, and Series 4 protocols. While checking the header files, I could not find anything matching 0x0 on Series 5 (interrupt control registers are displayed in the area starting with 0x0100).
So, if you want to catch places in the code where the NULL pointer is dereferenced, you are completely at your discretion.
source share