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.

AWR1642: AWR1642 uses the SDK2.00.00.04 to debug the CAN module, sending CAN data discontinuous

Part Number: AWR1642

The AWR1642 uses the SDK2.00.00.04 to debug the CAN module. When the CAN data is continuously transmitted, the receiving device finds that the CAN data is discontinuous and the frame loss occurs. However, the Busy bit of the IF1CMD Register of the DCAN is not set during the whole process. It is not possible to determine if the CAN data can be successfully transmitted by the Busy bit. I would like to ask how to solve this situation of sending CAN data discontinuity?

  • Hello ,

    Can you please check if the "autoRetransmitDisable" is being set in your code?
    Please make sure that the re-transmission are enabled in the code when using multiple message objects so that the re-transmission are attempted and transmissions are successful.

    -Raghu
  • 你好,  Raghu

          非常感谢您的回复。 “autoRetransmitDisable”已设置为0; 我正在调试SDK提供的Dome项目(..:... \ sdk2000004 \ mmwave_sdk_02_00_00_04 \ packages \ ti \ drivers \ can \ test \ common \ mian.c):

    代码更改如下:

    testSelection = DCAN_APP_TEST_EXTERNAL_DATA;


    dcanCfgParams-> autoRetransmitDisable = 0;

    验证数据是否连续发送的机制是:

    将“AliveCount”添加到发送数据,并在每次成功发送CAN数据时将“AliveCount”增加1. 详细的可见图片


    在此更改之后,当使用接收设备接收数据时,发现“AliveCount”不是连续的:

    Any thoughts you may have could be helpful!

    Kind regards,

    leiyang

     

  • Hello Leiyang,

    I do not understand the query. Can you put it in English?

    Thanks,
    Raghu
  • hello,  Raghu

          Thank you very much for your reply. "autoRetransmitDisable" has been set to 0; I am debugging in the Dome project provided by the SDK(..:... \ sdk2000004 \ mmwave_sdk_02_00_00_04 \ packages \ ti \ drivers \ can \ test \ common \ mian.c):

    The code changes as follows:

    1:   testSelection = DCAN_APP_TEST_EXTERNAL_DATA;

    2:   dcanCfgParams-> autoRetransmitDisable = 0;

    The mechanism for verifying whether data is continuously sent is:

    Add "AliveCount" to the send data, and increase the "AliveCount" by 1 each time the CAN data is successfully sent. Detailed view can be seen.

    After these change, when using the receiving device to receive data, it is found that "AliveCount" is not continuous:

    Any thoughts you may have could be helpful!

    Kind regards,

    leiyang

  • Hi Leiyang,

    Could you confirm if you have iniitalized the s_AliveCount = 0  and the type of s_AliveCount?

    -Raghu

  • Hi  Raghu,

     Thank you very much for your reply.The variable s_AliveCount is defined as follows:

    Apart from the above changes, I'm sure there are no other changes.

    Any thoughts you may have could be helpful!

    Kind regards,

    Leiyang

  • Hello Leiyang,

    Could you check by putting a delay between the transmission?
    Include a Task_sleep(1) in between CAN_transmitData() .

    -Raghu
  • Hello Raghu,
    Thank you very much for your reply.
    I know that the discontinuity of s_AliveCount will be improved by adding sleep (1). But the key problem is the return value of the CAN_transmitData() function, which can not accurately reflect whether the CAN message is successfully sent. When the CAN message is not sent successfully, the return value of the CAN_transmitData() function is still 0. When CAN data needs to be sent quickly, it becomes uncertain whether the CAN message is successfully sent.
    Apart from the above changes, I'm sure there are no other changes.
    Any thoughts you may have could be helpful!
    -Leiyang
  • Hello Leiyang,

    Using the delay is the current workaround for the issue. We are looking to address this issue in the next version of the SDK.

    Thanks,

    Raghu