Hi all,
I would love to have some help with the CRC functions, I'm new with them and with Texas, and I'm having problems trying to compile the code.
I have a working project in CCS(6.0.1.00040) with a TMS320F28069PNT that make use of ADC, FIR and SCI. But now I need to run a CRC-CCITT to 22 bytes of data before sending them.
Taking a look to "TMS320x2806x Piccolo Technical Reference Manual" I found VCRC16P2L_1 and VCRC16P2H_1 as part of the instruction set, so I create a new .asm source with the example code:
; ------------------- ; Calculate the CRC of a block of data ; This function assumes the block is a multiple of 2 16-bit words ; .global _CRC16P2 _CRC16P2 VCRCCLR ; Clear the result register MOV AL, *+XAR4[4] ; AL = CRCLen ASR AL, 2 ; AL = CRCLen/4 SUBB AL, #1 ; AL = CRCLen/4 - 1 MOVL XAR7, *+XAR4[2] ; XAR7 = &CRCData .align 2 NOP ; Align RPTB to an odd address RPTB _CRC16P2_done, AL ; Execute block of code AL + 1 times VCRC16P2L_1 *XAR7 ; Calculate CRC for 4 bytes VCRC16P2H_1 *XAR7++ ; ... VCRC16P2L_1 *XAR7 ; ... VCRC16P2H_1 *XAR7++ ; ... _CRC16P2_done MOVL XAR7, *_+XAR4[0] ; XAR7 = &CRCResult MOV32 *+XAR7[0], VCRC ; Store the result LRETR ; return to caller
and get a lot of errors... E0002, E0003, E0004:
Any help would be appreciated, thanks !!