Hi there,
I am getting a hard fault for accessing an unaligned memory address with STR single word access on a cortex M4 processor (Infineon XMC4500 F100k1024). Cortex M4 manual says that:
What could be the possible reason of this fault?
My code is as follows. It throws an exception at STR.
PRESERVE8 THUMB Stack EQU 0x00000100 AREA STACK,NOINIT,READWRITE,ALIGN=3 StackMem SPACE Stack AREA RESET,DATA ,READONLY EXPORT __Vectors __Vectors DCD StackMem + Stack DCD Reset_Handler ALIGN AREA |.text|,CODE,READONLY, ALIGN=2 ENTRY EXPORT Reset_Handler Reset_Handler MOV R5 , #0x3c94 MOVT R5 , #0x2000 MOV R4 , #0x123 STR R4 , [R5] STOP B STOP END