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.

TDA4VM: [J7 SDK v7.0]How to send and receive Periodic message in vision apps

Part Number: TDA4VM

Hello, experts:

My customers have the requiement of sending and receiving periodic messages, I want to implement this functionality in vision apps.

but there's no such demos in this module.I find some demo in the component gateway-demos,from the file 'can_process.c',it seems 

that the component only has CanApp_RxTask,and it is not trigged by period.

So,couild you give me some demos to show how to send and receive period can message int the vision apps ?

for example ,send can message 0xAA,0xBB,receive message 0xCC,0xDD.

thank you .

  • Hi,

    Can you please refer https://e2e.ti.com/support/processors/f/791/p/911411/3368835#3368835 and see if you are able to create a timer task using this? Let me know if you need more help.

    Regards,

    Karan

  • hi,

    I think there are two more points that need to be addressed:

    1.how to send and receive Can message in vision apps

    2.How to receive and send multiple Can messages periodly in vision apps at the same time,for example,send can message ID 0xAA,0xBB,receive can message ID 0xCC,0xDD.

  • hello expert:

    About my question addressed above,Could you provide some demos to resolve the issue? ths。

  • Hi,

    Apologies for a late reply.

    chenxuebin chen said:
    how to send and receive Can message in vision apps

    You can use the CSL example as a reference for this. Please find the source of the CSL example at - psdk_rtos_auto_j7_06_02_00_21/pdk/packages/ti/csl/example/mcan/mcanEvmLoopback/mcan_evm_loopback_app_main_k3.c

    chenxuebin chen said:
    How to receive and send multiple Can messages periodly in vision apps at the same time,for example,send can message ID 0xAA,0xBB,receive can message ID 0xCC,0xDD

    For TX: you need to be make different messages with different ID. Please refer lines 528:537 

     528     /* Initialize message to transmit */
     529     txMsg.id  = (uint32_t)((uint32_t)(0x4U) << 18U);
     530     txMsg.rtr = 0U;
     531     txMsg.xtd = 0U;
     532     txMsg.esi = 0U;
     533     txMsg.dlc = 0xFU;
     534     txMsg.brs = 1U;
     535     txMsg.fdf = 1U;
     536     txMsg.efc = 1U;
     537     txMsg.mm  = 0xAAU;

    For RX you need to have filters for all the IDs you want to receive. You need to modify the filter config parameters in the CSL example.

     723     MCAN_StdMsgIDFilterElement stdFiltelem;
    
     779     /* Initialize Tx Buffer Config params */
     780     stdFiltelem.sfid2 = 0x0U;
     781     stdFiltelem.sfid1 = 0x4U;
     782     stdFiltelem.sfec  = 0x7U;
     783     stdFiltelem.sft   = 0x0U;
    
     835     /* Configure Standard ID filter element */
     836     MCAN_addStdMsgIDFilter(gMcanModAddr, 0U, &stdFiltelem);

    For the information on the meaning of the fields you can refer psdk_rtos_auto_j7_06_02_00_21/pdk/packages/ti/csl/src/ip/mcan/mcan.h

    Regards,

    Karan