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/AWR1843BOOST: CAN communication doesn't work after adding CAN features into lab0008_automated_parking?

Expert 2050 points
Part Number: AWR1843BOOST

Tool/software: Code Composer Studio

I want to apply CAN communication in the demo lab0008_automated_parking.

Refer to demo lab0007_mrr, I modified lab0008's mss_main.c. Also I added debug log in the

Can_Transmit_Schedule

as below:

int32_t Can_Transmit_Schedule( uint32_t msg_id,
            uint8_t *txmsg, uint32_t len)
{

    volatile uint32_t                   index = 0;
    int32_t                     retVal = 0;
    int32_t                     errCode = 0;

    System_printf ("MEssage %x  len %d\n", msg_id, len);
    if(frameType == CANFD_MCANFrameType_FD)
    {
        Task_sleep(1);

        while(len > 64U)
        {
            retVal = CANFD_transmitData (txMsgObjHandle, msg_id, CANFD_MCANFrameType_FD, 64U, &txmsg[index], &errCode);
            System_printf ("A: FD return value %x , Errcode %x\n", retVal, errCode);
            index = index + 64U;
            len = len - 64U;

            Task_sleep(1);
        }
        retVal = CANFD_transmitData (txMsgObjHandle, msg_id, CANFD_MCANFrameType_FD, len, &txmsg[index], &errCode);
        System_printf ("B:FD return value %x , Errcode %x\n", retVal, errCode);
    }
    else
    {
        while(len > 8U)
        {
            retVal = CANFD_transmitData (txMsgObjHandle, msg_id, CANFD_MCANFrameType_CLASSIC, 8U, &txmsg[index], &errCode);
            System_printf ("A: Classic return value %x , Errcode %x\n", retVal, errCode);
            if (retVal < 0)
            {

                continue;
            }
            index = index + 8U;
            len = len - 8U;

        }

        retVal = CANFD_transmitData (txMsgObjHandle, msg_id, CANFD_MCANFrameType_CLASSIC, len, &txmsg[index], &errCode);
        System_printf ("B: Classic return value %x , Errcode %x\n", retVal, errCode);

        while(retVal < 0)
        {
            //System_printf("Debug: Error transmitting CAN data %x , Errcode %x\n", retVal, errCode);
            retVal = CANFD_transmitData (txMsgObjHandle, msg_id, CANFD_MCANFrameType_CLASSIC, len, &txmsg[index], &errCode);
            System_printf ("C: Classic return value %x , Errcode %x\n", retVal, errCode);

        }

    }


    return retVal;

}

Also I added library in build setting of ARM Linker as below: 

Then I successfully rebuild the demo and run it in debug mode, but the CAN communications doesn't work. I tried both FD and Classic... 

Below is the error code when I use CAN Classic, the retval and errcode are the same as that when use CAN FD.

[Cortex_R4_0] Debug: Launched the Initialization Task
[C674X_0] processCreate: (radarProcessInstance_t *)0x80a4d8
processCreate: (RADARDEMO_rangeProc_handle *)0x0
processCreate: (RADARDEMO_dopplerProc_handle *)0x80a5d8
processCreate: (RADARDEMO_detectionCFAR_handle *)0x80a8c0
processCreate: (RADARDEMO_aoAEstBF_handle *)0x80b8bc
processCreate: (RADARDEMO_clusteringDBscanInstance *)0x811960
processCreate: (radarProcessBenchmarkObj *)0x8139ec
processCreate: heatmap (float *)0x200c0000
DDR Heap : size 1048576 (0x100000), used 851968 (0xd0000)
LL2 Heap : size 61440 (0xf000), used 58312 (0xe3c8)
LL2 Scratch : size 8192 (0x2000), used 6656 (0x1a00)
LL1 Scratch : size 16384 (0x4000), used 16384 (0x4000)
HSRAM Heap : size 0 (0x0), used 0 (0x0)
[Cortex_R4_0] Debug: Initialized the mmWave module
Debug: Synchronized the mmWave module
Debug: CLI is operational
Set LDO Bypass
Debug: MMWave has been configured for MRR.
Debug: Sensor will start momentarily. 
MEssage c1  len 36
A: Classic return value ffffffff , Errcode fffff253
A: Classic return value ffffffff , Errcode fffff253
A: Classic return value ffffffff , Errcode fffff253
A: Classic return value ffffffff , Errcode fffff253
A: Classic return value ffffffff , Errcode fffff253
A: Classic return value ffffffff , Errcode fffff253
A: Classic return value ffffffff , Errcode fffff253