Change the Endian

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Change the Endian

2,433 Views
himanshudoshi
Contributor III

Hello to all,

I am using NXPLPCXpresso 54114 board. I am working on ARM Cortex-M4. I need to change the ENDIANNESS from Little to Big and again Big to Little. Can anybody help me with the scripting part? I have gone through the ARM documentation and found this:

Capture.JPG

Can anybody help me with how to change the register value to convert the endianness ??

An example script will be a great help to convert Little-endian to Big-endian and Big-endian to Little-endian.

Thanking you in advance,

Regards,

Himanshu

0 Kudos
1 Reply

1,899 Views
jeremyzhou
NXP Employee
NXP Employee

Hi HIMANSHU DOSHI ,

Thank you for your interest in NXP Semiconductor products and 
for the opportunity to serve you.

The LPC54114 only support the little endian mode and the endian mode can't be changed afterward.(There is no dynamic endian switching, and the SETEND instruction is not supported.). however, you can easily convert the data between little endian and big endian using some of the new instructions in the Cortex-M3. For example, REV and REVH are very useful for this kind of conversion.

pastedImage_1.png


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos