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.

MCAN RX buffer memory problem

Part Number: MSPM0G3507
Other Parts Discussed in Thread: SYSCONFIG,

1) I am using MSPM03507 launch pad MCAN RX sample code .

2) If I received one ID some function is working but in middle same id came again next time i am sending different id to MCU  for different  another function -   previous same function is working . if i want to function can work i have to send again same id for working of same function . this is repeteadly every time  . 

could you please suggest a solution for that if new id will come every time  previous stored buffer data will delete only present data function will run only .  

Thanks, 

Aryan vats 

  • Hi Aryan,

    Does you mean that after a new ID sent to MCU, but the old ID will exist and prevent new ID identification, which makes your code can not process new function with the new ID.

    B.R.

    Sal

  • yes sir , could you please help me solution of this problem 

  • Hi Aryan,

    I haven't used it before. Let me do some test and figure out what happened here.

    B.R.

    Sal

  • If I want to my MCAN work Overwrite mode . for overwrite mode I have to change in  code or only changes in sysconfig this code will work. Please confirm it .

  • OK, I will udated here when I got some progress.

    I'm quite busy these days, so responses may be delayed due to the need for experimentation.

  • So , you are making a new code or doing another activity .

  • Sir any update . This issue is serious for me . I have to show demo to TATA motors . Please help me .

  • Hi Aryan,

    Sorry for the late response, I am working on the sdk code example of "mcan_message_rx_LP_MSPM0G3507_nortos_ticlang". I think this demo have already achieved the function you asked.

    I highly recommend you refer to this demo code to implement your functions. If you have any further question, feel free to reply here.

    B.R.

    Sal

  • hello sir ,

    1) we are using same code . but in this code if you send an id , which has set runtime of more than 4 sec delay and If i send another id having different function before the previous id has completed its execution. second id ( interrupt) remains in waiting .

    2) If we send three or more ids before completion of first function even then it only serves the first id ( interrupt) in waiting ,rest of the  ids are taken up with a new instruction i.e when we send a new id(instruction) for execution,system takes up the already pending interrupts first(as mentioned above) only then it executes the current id(instruction).

  • Hi Aryan,

    Well understood. Due to I don't have enough time to do verification, I will forward this thread to the CAN expert in my team for further support. I suppose he will give some comments tomorrow. Thanks for your patience.

    B.R.

    Sal

  • thankyou for the support Sir .I an waiting for comment .

  • Hi Aryan,

    There is some comments for your issue:

    1) we are using same code . but in this code if you send an id , which has set runtime of more than 4 sec delay and If i send another id having different function before the previous id has completed its execution. second id ( interrupt) remains in waiting .

    In the example code, it only filter the id and then through the switch function to process different task.

    MCAN should have the FIFO to store different id. If below API function:

    DL_MCAN_writeRxFIFOAck(MCAN0_INST, rxFS.num, rxFS.getIdx);

    has finished, it should not make the impact on your new id update. It doesn't take much time to finish this.

    2) If we send three or more ids before completion of first function even then it only serves the first id ( interrupt) in waiting ,rest of the  ids are taken up with a new instruction i.e when we send a new id(instruction) for execution,system takes up the already pending interrupts first(as mentioned above) only then it executes the current id(instruction).

    When more ID comes, it will be stored in RXFIFO, please make sure you have set enough RAM for message storage. And then you can read these ID from RXFIFO.

    B.R.

    Sal

  • can we used this code in overwrite mode or we have to do changes in code . 

  • Sir can we add priorities message for a particular id in that code . you have any code which is working on message id priority .