Hi,
I'm using cortex-m7,
Then with following assembly code
__asm( "push {r0, r1} \t\n" "mov r0, #0x0 \t\n" "mov r1, #0x10 \t\n" "udiv r1, r1, r0 \t\n" "pop {r0, r1}" );
It can enter UsageFaultHandler successfully.
In UsageFaultHandler(), I tried to read and clear the fault status register(0xE000ED28)
int reg_val; reg_val = *REG_FSR; printf("REG_FSR = %0x\n", reg_val); *REG_FSR = reg_val; reg_val = *REG_FSR; printf("read REG_FSR again = %0x\n", *REG_FSR);
Looks that can't clear the fault status. It keep execute the UsageFaultHandler() again and again. Could you help to check?