XMC1400: How to turn off Unaligned Trap?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Not applicable
2042.attach

Coming from XMC4500 I was a bit surprised that I couldn't turn of the Unaligned Access Trap which I had previously done there.

Is there any way to avoid getting HardFault for simple things such as access to a misaligned memory address? Or does everything need to be 4 byte aligned? That would gobble up my flash in no time.
0 Likes
2 Replies
chismo
Employee
Employee
First like received
Hello,

From the ARM infocenter, it is stated:
There is no support for unaligned accesses on the Cortex-M0 processor. Any attempt to perform an unaligned memory access operation results in a HardFault exception.


Link:
(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/BABFAIGG.html)

Therefore, I don't think it is possible to remove the unaligned trap.

Regards,
Min Wei
0 Likes
Not applicable
chismo wrote:
Hello,

From the ARM infocenter, it is stated:


Link:
(http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0497a/BABFAIGG.html)

Therefore, I don't think it is possible to remove the unaligned trap.

Regards,
Min Wei


Thank you Min Wei! Then at least I know.
0 Likes