2020-04-27 01:59 AM
HI. I'm trying to understand what is Stack aligment and what is it for.
Cortex-M3 has a special bit STKALIGN in SCB->CCR register. Theoretically this bit is set to 1 in new revision of core, but when i look through debugger this bit is clear.
I've read that there is a sepcial attribute for GCC ARM :
__attribute__((interrupt))
and it should be used with old revision r0p0 to align the stack by compiler, but when i make the code i do not know what is the revision of core in uC so do i need to use this attribute or not?
And what happen when do not make aligment?