Forum : ARM
Original Post
Post Information | Post |
---|---|
May 7, 2008 - 7:37am
|
Hi Friends. Using RIDE with STR912 board... I worked a lot with ARM920T (from Atmel) in the past and used to deal with misaligned memory access due to bad coding (unaligned structures and data types). typedef struct TestAbort { char a[8]; } TestAbort; TestAbort T; long *ptr; int i; T.a[0]=0x10;T.a[1]=0x11;T.a[2]=0x12;T.a[3]=0x13; T.a[4]=0x14;T.a[5]=0x15;T.a[6]=0x16;T.a[7]=0x17; for(i=0;i<4;i++) { OutString("Trying pointer... "); ptr=(long*)&T.a[i]; OutHex(8,*ptr);OutString(" Ok.rn"); } I trapped all exceptions on another part of the code (91x_it.c). Running on the hardware, here are the results... Trying pointer... 0x13121110 Ok. Trying pointer... 0x10131211 Ok. Trying pointer... 0x11101312 Ok. Trying pointer... 0x12111013 Ok. Ok... the data is not crossing the dword boundary, but where, god damned :mad: , is my favorite data abort exception ? I was expecting to halt the system or so... Thanks a lot for your patience. |
Hi
I found the following bit in CP15:
Bit 1 register 1 : Alignment fault check enable
It might helps.
Matloub