Looking at the ARM docs it appears ARM M0+ could be implemented as either big endian or little endian. Which endianness for a particular implementation is left as an exercise for the silicone vendor.
I've searched high and low and cannot find a definitive answer on the endianness of NXP LPC MCUs.
I suspect the answer is little endian but I would like to see in a data book / user manual a definitive answer to the question, is the LPC804 a little endian or big endian format?
If I examine the LPC804 flash is the memory stored little or big endian?
And where do I find the explicit answer for the LPC804?
Thank you, this fully answered my question. I did not see the answer in the LPC804 datasheet or manual. Thank you for this answer and additional user guide.
Hi,
For the cortex-M0 core, Instruction memory and Private Peripheral Bus (PPB) accesses are always little-endian.
For the data memory, it is dependent on the implementation, but the AIRCR[ENDIANESS] Read-Only bit defines the endian format. For the LPC8xx, the bit is zero, so the data memory is little-endian.
In conclusion, the LPC804 uses little-endian format for both instruction and data memory.
I attach the UG of cortex-M0
2.1.5 Data types
The processor:
• supports the following data types:
— 32-bit words
— 16-bit halfwords
— 8-bit bytes
• manages all data memory accesses as either little-endian or big-endian,depending on the device implementation. Instruction memory and Private
Peripheral Bus (PPB) accesses are always little-endian. See Memory regions,
types and attributes on page 2-13 for more information.
Hope it can help you
BR
XiangJUn Rong