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.

Compiler/AWR1243: AWR1243

Part Number: AWR1243

Tool/software: TI C/C++ Compiler

Hello,

   I am debugging the  AWR1243BOOST,   I want to know how to computer the CRC,

       in the datasheet AWR1xxx_Radar_Interface_Control, in 2.3.4 section,I see "The CRC is computed on all the bytes in the MSGHDR and MSGDATA. Note that SYNC is not
included in CRC calculation" , and I choose 16 bit  x16 + x12 + x5 + 1    16-bit CRC-CCITT, I collected a complete set of data, as below, 

12 34 43 21 02 81 00 16 10 00 00 00 00 01 ED 67 01 40 00 08 00 01 00 00 C1 05

the 12 34 43 21 is the SYNC, and the last two bytes(C1 05) is the CRC,  I have verified the CRC is correct.

Except the SYNC(12 34 43 21), I should compute 02 81 00 16 10 00 00 00 00 01 ED 67 01 40 00 08 00 01 00 00, I use all of the 16-bit CRC-CCITT algorithm and all the way,but all the result is not equal to "C1 05"

I also use  C:\ti\mmwave_dfp_01_02_00_01\ti\example\mmwavelink_example  crc_compute.c and the result is "97 B2" and not equal to "C1 05", 

can you provide me a C code or verilog code better to computer the CRC? thanks very much

  • Hi,

    mmWave DFP example provides C source file (crc_compute.c) which is used by the application to compute 16Bit CRC for all the Rx/Tx SPI messages.

    Please refer the same source file.

    Regards,

    Jitendra

  • I am sorry, but I  have used  C:\ti\mmwave_dfp_01_02_00_01\ti\example\mmwavelink_example  crc_compute.c and the result is "97 B2" and not equal to "C1 05", I don't know how to computer,

  • Hi,

    You need to swap each byte to calculate the CRC and as on device it will be stored in that form only.

    And you need to select the Hex option in the online CRC tool.

    This is your byte sequence (swapped) 

    8102160000100000010067ED4001080001000000

    On top of that, crc_ompute.c is the file used for all the commands to generate crc for command byte sequence and same is being used to generate crc for received response message as well.

    Regards,

    Jitendra