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.

CCS/AWR1843: Does AWR1843 support AUTOSAR E2E Profile04 hardware CRC calculation?

Part Number: AWR1843

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

  • Are you sure that polynomial of Profile4 is same as AWR1843 CRC 32bit?

    Regards,

    Jitendra

  • No, Profile 04 is a different polynomial from CRC32.
    Profile 04 polynomial is 0xF4ACFB13
    CRC32 polynomial is 0x4C11DB7

    The setting values for software calculation are shown below.

    CRC-32
    /* Populate the CRC Model Configuration: */
    crcModelCfg.cm_width = 32;
    crcModelCfg.cm_poly = 0x4C11DB7;
    crcModelCfg.cm_init = 0xFFFFFFFF;
    crcModelCfg.cm_refin = TRUE;
    crcModelCfg.cm_refot = TRUE;
    crcModelCfg.cm_xorot = 0xFFFFFFFF;

    CRC AUTOSAR E2E Profile04
    /* Populate the CRC Model Configuration: */
    crcModelCfg.cm_width = 32;
    crcModelCfg.cm_poly = 0xF4ACFB13;
    crcModelCfg.cm_init = 0xFFFFFFFF;
    crcModelCfg.cm_refin = TRUE;
    crcModelCfg.cm_refot = TRUE;
    crcModelCfg.cm_xorot = 0xFFFFFFFF;

  • Hello,

    You need to use same CRC polynomial what AWR device supports in AUTOSAR. 

    Regards,

    Jitendra

  • thank you for your answer.

    The polynomial for AUTOSAR E2E Profile 04 is 0xF4ACFB13.
    The software calculation result of AWR1843 is correct.

    However, the hardware calculation result of AWR1843 is incorrect.
    I set for AUTOSAR E2E Profile 04 to the CRC_CTRL0 register .
    Please see first post.
    Is this setting enough?

  • Hello,

    I would recommend to verify CRC module with the mmwave SDK driver test application, this way you can verify that CRC peripheral works as expected.

    c:\ti\mmwave_sdk_03_04_00_03\packages\ti\drivers\crc\test

    As we don't have any offering in terms of AUTOSAR so I don't have any feedback with that experiment.

    Although MCAL driver provided for AWR1843 works fine for CRC.

     

    Regards,

    Jitendra

  • Hello,

    Thanks for your answer.

    >Although MCAL driver provided for AWR1843 works fine for CRC.

    How Can I Get MCAL driver provided for AWR1843?

    Please let me know if you have any contact information.

  • Please contact your TI sales representative near your region. 

    Regards,

    Jitendra