Monitoring CAN messages at the input

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Monitoring CAN messages at the input

4,254 Views
juliana_rojas30
Contributor III

Hello there!   

I am working with a S32k board and I want to monitor the number of CAN messages I am receiving at the input of my communication system. It doesn't matter if it only gives me the number of messages or the ID of the CAN messages I am receiving. How can I do this? I was trying to implement a counter but no success. Any ideas ?     

Also, I would like to know how to do it from the S32DS, I am guessing it can be done from there.

Besides that, I am having trouble finding the project for importing it into the DS, I am not finding it anywhere so I asumme I am not exporting it correctly.. which is the extension it is supposed to have? 

Thanks in advance! 

Juliana

0 Kudos
7 Replies

650 Views
Perkiden34
Contributor I

As i know the CAN bus analyzer is connected to the CAN bus network using appropriate hardware interfaces, such as a CAN interface module or a USB-to-CAN adapter. Once connected, the analyzer captures and interprets the CAN messages being transmitted on the bus.  

 

PrepaidGiftBalance

0 Kudos

4,214 Views
juliana_rojas30
Contributor III

I forgot to add, now, the issue is this: I solved the problem with the transmission of messages. But, now I see a lot of more messages in the echo channel than in the original one. I checked the log and apparently, some of the 2B messages are being echoed twice (I guess that because of their size the code is expecting a bigger one so it just sends two of them). How can this be solved?

Thank you!

0 Kudos

4,239 Views
mariuslucianand
NXP Employee
NXP Employee

Hello juliana.rojas3062@ctag.com‌,

Do you receive any of the messages over CAN?

For the importing issue, the model generates in the Matlabs current directory,  a folder with the same name as the model, ended in _mbd_rtw. In that folder, you should be able to find the ProjectInfo.xml file that helps you importing the generated code in the S32DS code.

pastedImage_1.pngpastedImage_2.png

Hope this helps,

Marius

4,230 Views
juliana_rojas30
Contributor III

Hi @mariuslucianand,

Thank you very much for your reply. Yes, I do receive CAN. Let me explain, I am receiving a lot of CAN messages at a high speed. So the problem is that when I echo them back, there are a lot of lost messages. Now, I don't know why, and that's what I am trying to figure out. First I am trying to be sure that the messages arrive to the board, so that's why I am trying to make  a counter. I guess it's easier to get this data from the Design Studio, but I am having issues with it. 

Regarding the S32DS, yes, that worked. Now when I try to build the code I get this:

juliana_rojas30_0-1598938073340.jpeg

Any idea what can that be about? 

Thanks!

0 Kudos

4,216 Views
juliana_rojas30
Contributor III

Hi again @mariuslucianand ,

Updating this, I was able to count the messages arriving to the board by implementing a custom made counter. Now, as I am sure they don't get lost there, I am trying to understand how MB work in order to manipulate them for the transmission process, maybe this can help me improve the percentage of echoed messages. Can you give me a explanation of how the MB work? As I understand I can use the MB4-Mb15 am I wrong? I read the manual but it doesn't any clearer for me tbh. 

Thank you!

0 Kudos

831 Views
Louis21Chamberlain
Contributor I

Thanks for share this post !!!!

0 Kudos