How to send multiple CAN messages after stop and restart the CAN analyzer in the model attached

cancel
Showing results for 
Search instead for 
Did you mean: 

How to send multiple CAN messages after stop and restart the CAN analyzer in the model attached

1,171 Views
chmjob90
Contributor II

RHinnen

Hi , RHinnen

   Could  you spare some precious time to help me solve the following problems: How to  modify the model attached to send multiple CAN messages and keep sending CAN messages without reset the the mcu after the CAN analyzer is stopped and started again? The example -CAN1(Flexcan Traffic )offered  in the MPC574xP Example Projects-Communictions does not exsit the problem.

   Up to now ,even though i added another CAN message (different ID) in the model ,the CAN analyzer only sent one ID CAN message.  The CAN analyzer  will stop sending CAN messages after stopped and started .

     Look forward to your solution ,thank you very much!

Labels (1)
4 Replies

274 Views
dumitru-daniel_
NXP Employee
NXP Employee

paulvlase‌,

Please have a look and investigate a possible solution. Thank you!

Daniel

0 Kudos

274 Views
sparkee
Contributor V

This question was asked in November... any traction on this? 

The issue that I found was that I was not setting the message buffers different for each message.  I didn't realize you had to set each message to load into a specific buffer.

pastedImage_1.png

0 Kudos

274 Views
constantinrazva
NXP Employee
NXP Employee

Hello sparkee,

Yes, unfortunately if you want to use the same MB for multiple transfers you'll have to do one of the following:

- either use blocking mode (which will likely slow down a bit your application)

- either use non-blocking mode, but making sure the 2nd transfer on the same MB will be done only after the 1st was completed. Otherwise, the 1st transfer will be halted by the 2nd, so it will not run to completion.

The 2nd option here depends on how you write your application, as you'll have to manage the timing yourself - nevertheless, it can have the advantage of a slightly faster application (depending on what overhead you add with the timing management).

The 1st option is simple enough (the block handles everything), but you must decide if that bit of extra time spent in the blocking transfer is something you can have or not in your application.

The best scenario is the one where you have MBs available so that you can use the non-blocking mode, each transfer having it's own MB set.

Hope this clears things up a bit.

Kind regards,

Razvan.

274 Views
wbj5238
Contributor III

   I still don't know what the right approach should look like. Can you give me a correct example?

   thanks.

0 Kudos