Other Parts Discussed in Thread: AWR1243, MMWAVE-DFP
Hello,
According to the AWR1xx_Radar_Interface_Control.pdf (mmwave_dfp_01_00_00_01) I try to calculate CRC of ENVELOPE to use AWR1243BOOST with external SPI controller. But I cant find suitable algorythm to calculate CRC of entire message.
I have AWR1243 and DCA1000EMV. Together with mmwave_studio evrything works fine. I am able to controll radar and recieve data from radar.
But my task is to use external SPI controller to configure AWR1243. So I need to form data sequence and send it through SPI interface.
AWR1xx_Radar_Interface_Control.pdf describre the data sequence. I have an SPI Interface analyzer and the data I see on MISO,MOSI,CS,CLK when using mmwave_studio is correct.
I understand how to fill evry field of message except CRC.(page xxv of AWR1xx_Radar_Interface_Control.pdf - Radar Message Structure)
Help me please to calculate CRC.
I Have an example: Frame start message. AWR_RF_FRAME_TRIG_MSG
Message that I see is:
0x12 | SYNC | |||
0x34 | ||||
0x43 | ||||
0x21 | ||||
0x02 | OPCODE | |||
0x81 | ||||
0x00 | LENGTH | DIRECTION =0b0001 | MSGTYPE=0b00 | MSGID = 0x0A (AWR_RF_FRAME_TRIG_MSG) |
0x16 | ||||
0x90 | FLAGS | SEQNUM = 0b1001 | CRCLEN = 0b00 (16-bit CRC) | CRCREQ = 0b00 (CRC is appended to the message) |
0x00 | ||||
0x00 | REMCHUNKS | |||
0x00 | ||||
0x00 | NSBC | |||
0x01 | ||||
0x6D | CHKSUM | ~(0x0281+0x0016+0x9000 | +0x0000+0x0001)=0x6D67 | |
0x67 | ||||
0x01 | SBLKID | |||
0x40 | ||||
0x00 | SBLKLEN | |||
0x08 | ||||
0x00 | SBLKDATA, START_STOP_CMD | |||
0x01 | ||||
0x00 | SBLKDATA, RESERVED | |||
0x00 | ||||
0x2A | CRC | |||
0xA5 |
How to get this CRC ?
Interface_Control documet contains that CRC is 16-bit CRC-CCITT and has Polynomial x16 + x12 + x5 + 1.
But Im not able to obtain this (0x2A 0xA5) CRC.
I see that CRC-CCITT may be different kinds. With different initial valuses and so on. Help me to understand how do I need to calculate CRC exactly to match requaired CRC. Maybe you have some examples.
Looking forward for your answer.