CAN Example for S32K311

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

CAN Example for S32K311

1,935 Views
adi2
Contributor I

Hi, I was looking for a CAN example to reference for the S32k311. I am specifically trying to bring up CAN for the S32K31XEVB-Q100 devboard, and since there are no S32K311 or 310 examples in the S32 library, I wanted to ask if anybody has any of their own. Thanks!

 

0 Kudos
Reply
6 Replies

1,909 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@adi2

This is a test demo based on S32K311EVB-Q100 and you may refer to it.

0 Kudos
Reply

617 Views
mkpivot
Contributor I

Hi

Thanks for this example. I was able to build it and flash it.

But my board is an inhouse board. 

It has S32K311 -> TCAN1048AVDMTRQ1 -> CanH and CANL

When the FlexCAN_Ip_Send() is executed, I see the TX signal input to the TCAN1048 is changing. But there is no output from the TCAN1048. 

I am wondering if the TCAN may not be the same as the one on the EVB

So it may not be initialized correctly. 

If you have the code to initialize the TCAN1048 can you please share.

Also can you please tell me the mode and the bit rate you are using?

thanks

0 Kudos
Reply

1,884 Views
adi2
Contributor I
Hi, thanks for this. I believe this project has some errors in it. When I try to load it into S32k3xx, I get a lot of errors related to file versions mismatching. Could this be a problem related to the SDK that I have downloaded on my computer or would this be a problem from the project?
0 Kudos
Reply

1,872 Views
Senlent
NXP TechSupport
NXP TechSupport

Hi@adi2

It works fine on myside and it should be a RTD version problem. 

This demo made base on RTD 4.0.0 HF01 with S32 DS V3.5.

The hardware is S32K311EVB-Q100.

0 Kudos
Reply

1,860 Views
adi2
Contributor I
Okay, thank you. How should I go about changing the RTD version on the project to be the correct one? I am on S32DS V3.5, but I believe the RTD might not be updated

Also, what bitrate and sampling point does this file run at? I have found that the propagation segment, phase segment 1/2, prescaler division factor, and resync jump width that you enter into the peripheral configuration menu in S32DS do not match the resultant numbers in FlexCAN_Ip_Sa_PBcfg.c, so knowing what the sample point and bitrate of the file you sent is, would help.
0 Kudos
Reply

1,848 Views
EvaKi
Contributor I

Hi adi2

You can try this project(S32DS 3.5)

0 Kudos
Reply