S32K144-EVB only outputs CAN once on startup or after reset button is pressed, not continuously

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

S32K144-EVB only outputs CAN once on startup or after reset button is pressed, not continuously

Jump to solution
1,570 Views
chrisc1
Contributor III

Hi,

I’m trying out the simplest form of CAN-out functionality on the S32K144-EVB based on the tutorial and example presented here:

https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-Build-and-Configure-a-CAN-with-S32K...

I’ve cut down the model as much as possible to just output CAN out so that I can view it in a Vector VN1630 in CANalyzer.

However when I connect an oscilloscope to view and decode the output to J13 I can only see CAN being Tx’d on a board reset (when releasing the Reset btn).

I get the same when I try the model as set up to be like the Master example.

 

I’ve verified that I’m powering the board via the J16 external power, J107 is set to 1&2.

J13-1 (HI) is going to DB9-7, J13-2 (LO) is going to DB9-2, J13-4 (GND) is going to DB9-3. J13-3 is NC.

 

The blue LED is set-up like the example, and I am seeing this constantly on (I don’t believe it is turning on/off rapidly). Is there any chance that some settings in my model blocks are incorrect or I have cut down too much content and omitted something that is essential?

 

This may be a very trivial question, answered by a very obvious answer. I apologise but I am used to some different toolchains that I've used in the past.

Thank you in advance

Kind regards

Chris

0 Kudos
1 Solution
1,561 Views
gramirezv
Contributor III

Hi @chrisc1 ,

 

This sounds extremely similar to something I was seeing in the past. I don't know how you have your test setup, but here are some things you could try:

I observed that when using CAN_send on Non-blocking mode, I was having the symptoms you describe. I'm sure others have seen the same behavior in their projects. 

When using CANalyzer, make sure CANalyzer is running (clicking the yellow lightning bolt) before powering your S32K144 board. The best way I found for testing RX & TX messages is by connecting CH1 to CH2 on CANalyzer and sending messages between CH1 & 2, obviously you have to set the baud rate to the same baud rate you're using on your S32K144 board.

Once you have messages going around in CANalyzer, connect your S32K144-EVB to the CAN bus you created with CH1&CH2 and then power on your evaluation board. You should see the messages being transmitted from your board.

 

If you use the same block on Blocking mode it should work regardless of if you have a can bus active or not, but as you would expect that has timing implications on your model as it's not using the interrupts for CAN.

 

Hope it helps.

View solution in original post

2 Replies
1,508 Views
chrisc1
Contributor III

Thank you. I had more luck when connecting via a PEAK adapter. Then after that I was able to see the CAN data on PCAN. When I went back to CANalyzer what I did is a fresh setup and it worked better this time. I did not need to make changes to the S32K144-EVB code or add/remove 120ohm resistors or change any of the wiring. I think it seemed to be the way the second device on the CAN was affecting the EVB. So the issue seems to have gone away relatively easily. Thank you Razvan Chivu @ NXP for some in-depth 

1,562 Views
gramirezv
Contributor III

Hi @chrisc1 ,

 

This sounds extremely similar to something I was seeing in the past. I don't know how you have your test setup, but here are some things you could try:

I observed that when using CAN_send on Non-blocking mode, I was having the symptoms you describe. I'm sure others have seen the same behavior in their projects. 

When using CANalyzer, make sure CANalyzer is running (clicking the yellow lightning bolt) before powering your S32K144 board. The best way I found for testing RX & TX messages is by connecting CH1 to CH2 on CANalyzer and sending messages between CH1 & 2, obviously you have to set the baud rate to the same baud rate you're using on your S32K144 board.

Once you have messages going around in CANalyzer, connect your S32K144-EVB to the CAN bus you created with CH1&CH2 and then power on your evaluation board. You should see the messages being transmitted from your board.

 

If you use the same block on Blocking mode it should work regardless of if you have a can bus active or not, but as you would expect that has timing implications on your model as it's not using the interrupts for CAN.

 

Hope it helps.