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.

  • TI Thinks Resolved

Compiler/AWR1642: CAN

Expert 1235 points

Replies: 5

Views: 166

Part Number: AWR1642

Tool/software: TI C/C++ Compiler

Hi,

I am using awr1642 boards. i am using two boards for CAN communication using canfd driver provided in SDK  with type calssic can.

from one board 128 bytes of data is sending.

from second board i am trying to receive the same data by calling CANFD_getData() function. I am able to receive 64 bytes of data only.

I am not understanding the flow here. rxDataLength is always 8 bytes. but it is storing 64 bytes of data. I printed rxData upto 128 bytes.

after 64 bytes printing it is not getting next 64 bytes. 

Please guide me with any receive program to receive complete data. 

Thanks and regards,

K Subrahmaniam

  • Hi,

    WIll get back to you next week

    thank you

    Cesar

  • In reply to Cesar:

    Hello Subrahmaniam,

    To send out 128bytes of data over the CANFD interface, you will need to send out the data in chunks of 64 bytes . What this means is you will need to call CANFD_TransmitData() in a loop till all data is sent out .

    This was already indicated to you in your previous post :

    https://e2e.ti.com/support/sensors/f/1023/t/830811?tisearch=e2e-sitesearch&keymatch=%252520user%25253A354388

    Please refer to the example "Object Data Over CAN" in TI Resource Explorer . Refer to function Can_Transmit_Schedule() in mss_main.c which has the reference for sending the data over CANFD in chunks.

     

    Thanks,

    Raghu

  • In reply to Raghunandan Kamath:

    Hi,

    Thank you .

    I am able to send 128 bytes of data over classical CAN. In PCAN tool i am receiving the same 128 bytes of data.

    Now i connected two AWR 1642 boards. one board sending same 128 bytes data over classical can.

    from second board i am trying to receive the data of 128 bytes. I am able to receive only 64 bytes of data. 

    i tried all the ways. please guide me any code to receive complete data. 

    Thanks and regards,

    K Subrahmaniam

  • In reply to ks prasad:

    Hi,

    It's Ok now i am able to receive 128 bytes data. but another problem is one set of 8 bytes is receiving and one is missing because

    of synchronization between sender and receiver. I tried with different task sleeps. please guide me to get the synchronization.

    thanks and regards,

    K Subrahmaniam

  • In reply to ks prasad:

    Hi Subramaniam,

    You can add code to wait for pending transmission before transmitting new message on the CAN interface. This should help with the synchronization. 

    Thanks,

    Raghu

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.