This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LS1227: Can the register header file of RM46L852 and 570LS1227 be common?

Part Number: TMS570LS1227
Other Parts Discussed in Thread: RM46L852

Hello,

I want to transplant the program of TMS570LS1227 to RM46L852, but encounter the following problems:

Comparing the "Enhanced Capture (eCAP) Module" chapter of RM46L852 and TMS570LS1227, the register addresses are different.
1. Can the register header files of RM46L852 and TMS570LS1227 be common? If not common, where can I get the header files for RM46L852?
2. What other modules of RM46L852 and TMS570LS1227 have this problem? Please elaborate.

  • Hi,

    1. Can the register header files of RM46L852 and TMS570LS1227 be common? If not common, where can I get the header files for RM46L852?

    RM46Lx and TMS570LS12x use a same header file: reg_ecap.h. The header file has a option for little endian device (RM46) and big endian device (TMS570):

    #if ((__little_endian__ == 1) || (__LITTLE_ENDIAN__ == 1)) 

    ...

    #else

    ...

    #endif

    2. What other modules of RM46L852 and TMS570LS1227 have this problem? Please elaborate.

    It is not a problem.  is the way we normally handle the endianess in header file. The header files of ADC, EQEP, ePWM, CAN, I2C etc use the same way.

  • In your code, you can use ARM Compiler Intrinsics to convert data from big endianness to little endianness, or from little to big:

    int dst = _ _rev(int src );

  • Hi QJ Wang,

    Thank you for your reply!