Hi,
As per the title says, I'm getting an unaligned memory access fault with an STRH instruction. I know the memory referenced in the instruction is unaligned, but I only expected a performance penalty, not a hard fault. Instruction that causes the error:
strh r7, [r0, #4]
Register values:
Have added before/after register values for SCB.
After:
Register Address ValueSystemControl 0xe000e000 SCB-ACTLR 0xe000e008 0x1000 SCB-CPUID 0xe000ed00 0x411fc271 SCB-ICSR 0xe000ed04 0x481803 SCB-VTOR 0xe000ed08 0x0 SCB-AIRCR 0xe000ed0c 0xfa050000 SCB-SCR 0xe000ed10 0x0 SCB-CCR 0xe000ed14 0x70200 SCB-SHPR1 0xe000ed18 0x0 SCB-SHPR2 0xe000ed1c 0x0 SCB-SHPR3 0xe000ed20 0xf0000000 SCB-SHCSR 0xe000ed24 0x10000 SCB-CFSR 0xe000ed28 0x1000000IACCVIOL [0] IACCVIOL_0DACCVIOL [1] DACCVIOL_0MUNSTKERR [3] MUNSTKERR_0MSTKERR [4] MSTKERR_0MLSPERR [5] MLSPERR_0MMARVALID [7] MMARVALID_0IBUSERR [8] IBUSERR_0PRECISERR [9] PRECISERR_0IMPRECISERR [10] IMPRECISERR_0UNSTKERR [11] UNSTKERR_0STKERR [12] STKERR_0LSPERR [13] LSPERR_0BFARVALID [15] BFARVALID_0UNDEFINSTR [16] UNDEFINSTR_0INVSTATE [17] INVSTATE_0INVPC [18] INVPC_0NOCP [19] NOCP_0UNALIGNED [24] UNALIGNED_1DIVBYZERO [25] DIVBYZERO_0SCB-HFSR 0xe000ed2c 0x40000000VECTTBL [1] VECTTBL_0FORCED [30] FORCED_1DEBUGEVT [31] DEBUGEVT_0SCB-DFSR 0xe000ed30 0x0 SCB-MMFAR 0xe000ed34 0x0 SCB-BFAR 0xe000ed38 0x0