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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

2,145 次查看
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!

标签 (1)
标记 (1)
4 回复数

1,247 次查看
dumitru-daniel_
NXP Employee
NXP Employee

paulvlase‌,

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

Daniel

0 项奖励

1,247 次查看
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 项奖励

1,248 次查看
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.

1,248 次查看
wbj5238
Contributor III

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

   thanks.

0 项奖励