Please check that the endian setting of the program matches the endian set in the endian select register (MDES).
The endian setting of the program can be checked in the High-performance Embedded Workshop (HEW) integrated development environment from the menu: Build > RX Standard Toolchain > CPU.
In the CubeSuite+ integrated development environment, the endian setting can be checked from the project tree panel by selecting Build Tool Node or File > Category Node, and then selecting Display > Properties or from the context menu Properties > Common Options > Data Endian.
For more about the endian select register, please see the Option-Setting Memory chapter of the User's Manual: Hardware.
For the difference in access operation between endians, see Endian in the CPU chapter of the User's Manual: Hardware.