|ARM Technical Support Knowledge Articles|
Applies to: ARM1176
The U bit (bit) in the cp15 c1 Control Register determines whether the ARM1176 can handle unaligned accesses properly, or not.
The default value is zero (or the value of the UBITINIT input) which is ARMv5 Legacy Mode. With the U bit defaulting to zero it allows the ARM1176JZF-S to run code originally intended to run on an Architecture v5 core, such as the ARM926EJ-S, with little or no modification. In v5 cores, unaligned accesses are not allowed. You might expect a data abort to occur when an unaligned access is attempted in Legacy Mode; this only happens if strict alignment checking is turned on by setting the A bit (bit) in the same cp15 c1 register. The default for the A bit is zero; hence unaligned accesses causing incorrect data to be stored/reported but not signalled by an abort.
To get unaligned accesses to work, all you should need to do is set the U bit in the cp15 c1 register. This you will have to do with some assembler code
since there is no way to access cp15 from C.
Did you find this article helpful? Yes No
How can we improve this article?