Unable to Send CAN in Non-blocking mode

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

Unable to Send CAN in Non-blocking mode

1,190 Views
ba2nguye
Contributor I

Hello,

I am having issue with getting a simple CAN message to be sent in non-blocking mode as part of my model.

I have attached the isolated test model that I have been trying to make it work, however the Vector CAN tool only detects CAN messages when FCAN_Send is in Blocking. The CANdbs for a test message is attached too.

Is there a solution to this? I have read the https://community.nxp.com/message/966278 , but I believe the setup is similar.

Thank you,

Anh Nguyen

0 Kudos
4 Replies

892 Views
constantinrazva
NXP Employee
NXP Employee

Hello ba2nguye@uwaterloo.ca‌,

I have attached a simple example using CAN Send block in non-blocking mode. I would suggest that you first use this simple example to determine that your setup works; if this example fails and you do not see anything on your CAN sniffer, it fails due some setup glitch. If this works but you have other models that fail, we'll see from there.

Kind regards,

Razvan.

0 Kudos

892 Views
ba2nguye
Contributor I

Hello Razvan,

So i ran your model with a CAN tool and I encountered the same issue. I also connected 2 NXPs with a slightly modified model to double check if it's the NXPs fault and it still fails to deliver messages in non-blocking mode.

I have attached the model ran on 2 NXPs connected to the same CAN bus below.

Thanks,

Anh

0 Kudos

892 Views
constantinrazva
NXP Employee
NXP Employee

Hello ba2nguye@uwaterloo.ca‌,

First of all, please install the latest cumulative patch available here. In Hotfix_4 we've patched how receive masks work - now individual masking is working as expected.

Second, I'd suggest you first use only a simple Receive block and a CAN ISR on Rx Complete event to blink a LED. Go on the CAN tool and start sending messages with the ID you've set to receive. If this does not work, try to figure out what issues you have going with your current setup.

If you're having issues with this step, please give me a detailed description of your current setup so I can replicate it and make a model that will work for you. By that I mean I need to know what hardware connections you have made, what executables are running on what boards, etc.

Kind regards,

Razvan.

0 Kudos

892 Views
ba2nguye
Contributor I

Hello Razvan,

So I tested just Receive block and CAN ISR on Rx Complete and it functions without any issues and CAN tool is detecting it perfectly. This was also the case before installing the Hotfix 4.

It is the Send block that causes me issues specifically, even after Hotfix installation. I used your message generation and send block you have attached before and it does not function in non-blocking mode. The CAN tool detects no messages being sent by the NXP.

However, if I enable blocking mode for the Send block, the CAN tool does detect the messages sent by the NXP. In both of these cases, NXP still receives generated CAN messages just fine.

I have attached the model, CANoe (Vector software) and CANdbc file that I used for testing. The board is S32K144-EVB-Q100. The only connections are CAN High and Low to the CAN tool with the terminating resistor jumpers on the NXP and another terminating resistor on the CAN tool side. The power is given through the barrel-jack external supply. There are Data store variables for each bit in the model, but I only use it to verify the messages through FreeMaster. And I installed the cumulative patch 2, not just Hotfix 4.

Thanks,

Anh

0 Kudos