PIC32MX Endianness

Last modified by Microchip on 2023/11/09 09:00

Bytes within larger Central Processing Unit (CPU) data formats—halfword, word, and doubleword—can be configured in either big-endian or little-endian order. Endianness defines the location of byte 0 within a larger data structure (in this tutorial, bits are always numbered with 0 on the right). Figures 50.15 and 50.16 (from Section 50 of the PIC32 MZ Family Reference Manual DS61192A) show the ordering of bytes within words and the ordering of words within multiple-word structures for both big-endian and little-endian configurations.

Big and Little Endian Byte Ordering

​Endianness in MIPS CPUs is configurable at design. Byte ordering in PIC32MX MCUs is set as little-endian.

​Endianness can vary between different computing systems. Make sure that multi-byte quantities are converted to the correct endianness before transmission and/or consumption via appropriate PIC32 peripheral configuration (DMA, for example), or via software routines.