Tool/software: Code Composer Studio
I am studying CRC operation using AWR1843 and mmwave_sdk_03_04_00_03.
I'm using
Board: AWR1843
version
CCS: 9.3.0
mmwave: 03_04_00_03
I succeeded in hardware calculation of CRC-16/CRC-32/CRC64.
Using mmwave_sdk_03_04_00_03 test software.
(mmwave_sdk_03_04_00_03\packages\ti\drivers\crc\test)
However, the CRC hardware calculation of AUTOSAR E2E Profile04 fails.
The test software does not support AUTOSAR E2E Profile04, so I changed the software.
Is this change correct?
Or is it not supporting AUTOSAR E2E Profile 04?
I am changing the test software to the CRC hardware calculation of AUTOSAR E2E Profile04.
Changed CRC_getCRCTypeBitValue function in crc.c.
To set the value of CH1_CRC_SEL in CRC_CTRL0 to 3 (AUTOSAR E2E Profile 04)
See below.
AWR18xx/16xx/14xx/68xx Technical Reference Manual
29.3.4.1 CRC_CTRL0 Register (Offset = 0h) [reset = 0h]
The changes are as follows.
Added the CRC_Type_32BIT_Profile4 label and processing to the CRC_getCRCTypeBitValue function.
static uint32_t CRC_getCRCTypeBitValue (CRC_Type crcType)
{
uint32_t crcTypeValue = 0;
switch (crcType)
{
case CRC_Type_16BIT:
{
crcTypeValue = 1U;
break;
}
case CRC_Type_32BIT:
{
crcTypeValue = 2U;
break;
}
case CRC_Type_32BIT_Profile4:
{
crcTypeValue = 3U;
break;
}
case CRC_Type_64BIT:
{
crcTypeValue = 0U;
break;
}
default:
{
/* Error: Bad Value */
DebugP_assert (0);
break;
}
}
return crcTypeValue;
}
The debug log output to CCS is shown below.
CRC-32
[Cortex_R4_0] Debug: 32 Bit Software CRC is 0xdc254701
Debug: Testing CRC Functionality Polynomial [Ethernet(32 Bit Polynomial)] for Pointer Data 8000000 Data Length 32 bits
Debug: CRC Driver signature is 00000000dc254701
Debug: CRC Driver signature is 00000000dc254701
Debug: Testing CRC Functionality Polynomial [Ethernet(32 Bit Polynomial)] for Data Length 32 bits Passed
CRC AUTOSAR E2E Profile04
[Cortex_R4_0]Debug: 32 Bit Software CRC is 0x98b5b372
Debug: Testing CRC Functionality Polynomial [Profilr4(32 Bit Polynomial)] for Pointer Data 8000000 Data Length 32 bits
Debug: CRC Driver signature is 000000003a377250
Error: Mismatch in the CRC Detected Expected: 0x98b5b372 Got 000000003a377250