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.

RTOS/AWR1642BOOST: Crash problem about CAN transmit.

Part Number: AWR1642BOOST

Tool/software: TI-RTOS

Hi Sir,

I have some crash problem about CAN transmit.

I want to transmit two 8byte data which ID is "0xFFU" and "0xA1U" and I design the code as below.

When I just transmit gSrrMSSMCB.CAN_txMsgObjHandle[0] it works ,but if I also transmit gSrrMSSMCB.CAN_txMsgObjHandle[1] it will crash .

I analysis package on the PCAN-View the cycle time is very huge (without transmit "gSrrMSSMCB.CAN_txMsgObjHandle[1]" ,the cycle time is about 60ms ,but "gSrrMSSMCB.CAN_txMsgObjHandle[1]" is just a 8byte package too)

please help to solve this problem A.S.A.P please.

BR

Thanks

Frank

  • Hi Frank,

    Can you post the crash log that you see when this issue happens?

    -Raghu

  • Hi Raghu,

    Sorry, our device has no UART interface now, so I can't read the log information from our device.

    Here's the issue :

    When I use the "gSrrMSSMCB.CAN_txMsgObjHandle[1]", the cycle time will be very large and the RADAR keeps hanging on(show as the PCAN view that I just post),  no reply.

    Then it crashed.

    Should I need to initialize DCAN or delete some data in txhandle before I change "gSrrMSSMCB.CAN_txMsgObjHandle[0]" to "gSrrMSSMCB.CAN_txMsgObjHandle[1]" ?

    BR

    Thanks

    Frank

  • Hi Frank,

    Please see below code for transmitting 20 messages . Create 20 TX message objects and then use the created objects to send data.

    CAN_MsgObjHandle txMsgObjHandle[20];
    uint32_t i;

    /*Create 20 TX mesage objects */

    for(i = 1; i<20 ; i++)

    {

    appDcanTxCfgParams.msgIdentifier = 0xC0 + i;
    /* Setup the transmit message object */
    txMsgObjHandle[i] = CAN_createMsgObject (canHandle, i, &appDcanTxCfgParams, &errCode);
    if (txMsgObjHandle[i] == NULL)
    {
    System_printf ("Error: CAN create Tx message object failed [Error code %d]\n", errCode);
    return -1;
    }
    }
    while (1)
    {
    for(i = 1 ; i < 20 ; i++)
    {
    alive_cnt++;
    appDcanTxData.msgData[7] = alive_cnt;

    /* Send data over Tx message object */
    retVal = CAN_transmitData (txMsgObjHandle[i], &appDcanTxData, &errCode);
    if (retVal < 0)
    {
    System_printf ("Error: CAN transmit data for iteration %d failed [Error code %d]\n", iterationCount, errCode);
    return -1;
    }

    iterationCount++;
    Task_sleep(1);
    if(alive_cnt >=200U)
    alive_cnt = 0;

    }

    }

    Thanks,

    Raghu

  • Hi Raghu,

    The problem is solved.

    BR

    Thanks

    Frank