Hi,
in my program for a TM4C1294XL there is an instruction
0xF8420021: str.w r0, [r2, r1, lsl #2]
with
r0 = 0x00000001
r1 = 0x00000000
r2 = 0x20012AD1
This instruction is assembled from the C line
grantedQoSs[(*count)++] = readChar(&curdata);
and probably forms the store process of the array element. However executing this instruction immediately causes a Hardfault The fault type is unaligned memory access, which I can see because UFSR = 0x0100.
Now my question is what exactly does the instruction do? Does it calculate r2+r1 and shift the result left by 2 bits? Then in my opinion an unaligned memory access would not occure.
Best regards