Set the FAULTMASK bit and then execute a command that triggers a HardFault
I set the Faultmask bit to 1 with the following code snippet and then write 0x5A to an area outside of RAM and read it back.
Since the Faultmask is set to 1, a HardFault does not occur, but the command line I have highlighted is also not being executed.
The processor is not responding at all; I am executing these commands step by step in the debug menu or I want to pause the processor by setting a breakpoint
What could be the cause of the problem? What state might the processor have entered?
MOV R0, #1
MSR FAULTMASK, R0
LDR R0, =0x20002800 ; The address 0x20002800 is outside the RAM area.
MOV R1, #0x5A
STRB R1, [R0]
LDRB R1, [R0] ; !!! PRODUCE HARD FAULT !!! But FAULTMASK BIT=1
MOV R0, #0
MSR FAULTMASK, R0
