How to change TVII from Little Endian to Big Endian in IAR

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
TrLi_333676
Level 1
Level 1
Distributor - Future(GC)
5 sign-ins First question asked Welcome!

Dear,

 

How to change TVII from Little Endian to Big Endian in IAR?  This configuration is not available in the project template .

2022-03-31 165918.png

0 Likes
1 Solution
JJack
Level 5
Level 5
Associated Partner - Distributor Rutronik
5 questions asked 25 likes received 100 sign-ins

Hi TrLi_333676,

Infineon's implementation of the ARM IP for Traveo2 is little endian. You cannot change this in IAR. However ARM and IAR support the handling of big endian data.

ARM provides C Language Extensions (ACLE) that are documented in their literature, document Nr. IHI 0053D. If you include arm_acle.h in your c module you can use these extensions.

In ARM's document IHI 0053D, chapter 9.2, you can find their intrinsic functions for miscellaneous data-processing. These intrinsic functions include operations for the rearrangement of the byte order in words or doublewords:

Example:

#include <arm_acle.h>

ui32_variable =  __rev(ui32_variable); // reverses byte order in ui32_variable

Hope that helps.

Best regards

JJack

View solution in original post

1 Reply
JJack
Level 5
Level 5
Associated Partner - Distributor Rutronik
5 questions asked 25 likes received 100 sign-ins

Hi TrLi_333676,

Infineon's implementation of the ARM IP for Traveo2 is little endian. You cannot change this in IAR. However ARM and IAR support the handling of big endian data.

ARM provides C Language Extensions (ACLE) that are documented in their literature, document Nr. IHI 0053D. If you include arm_acle.h in your c module you can use these extensions.

In ARM's document IHI 0053D, chapter 9.2, you can find their intrinsic functions for miscellaneous data-processing. These intrinsic functions include operations for the rearrangement of the byte order in words or doublewords:

Example:

#include <arm_acle.h>

ui32_variable =  __rev(ui32_variable); // reverses byte order in ui32_variable

Hope that helps.

Best regards

JJack