CAN configuration for s32K324

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

CAN configuration for s32K324

4,923 Views
LavanyaR
Contributor I

Hi,

Here we are working in s32k324. We tried s32k312 CAN example code configuration into s32k324. But it is not working. If you CAN driver code for s32k324 means kindly share it to us.

 

Thank you in advance

0 Kudos
Reply
14 Replies

4,859 Views
Riyasma07
Contributor III

Hi @VaneB,

I've entered the following values for FlexCAN bitrate configuration and updated the code.

Riyasma07_0-1702881790228.png

But the code does not get updated. Old config values are still there in the FlexCAN_Config0 structure variable. But other parameter values are gets updated.

Riyasma07_1-1702881968539.png

I'm using RTD V3.0.0

Please check and update.

 

0 Kudos
Reply

4,814 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Riyasma07 

Please check the following post. Here, I am helping another customer with the same situation. 

The S32DS peripheral configuration tool for the S32 platform fails to generate a configuration file

 

B.R.

VaneB

0 Kudos
Reply

4,905 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @LavanyaR 

Sorry for the inconvenience this might cause. 

We do not have an example for S32K324, but you can use the available ones for S32K344 devices (included with the RTDs). 

Example S32K344 FlexCAN_Ip TX/RX/EnhanceRXFIFO test S32DS3.4 RTD200

As you can see in the following image, the S32K344 is pin-to-pin compatible with S32K324. So it is easier to port the examples to the MCU you are using. 

VaneB_0-1702668074585.png

 

B.R.

VaneB

4,382 Views
LavanyaR
Contributor I

Hi @VaneB 

Shall we use s32k344 example driver code for s32k322 microcontroller? or Do you have driver code for s32k322 microcontroller

0 Kudos
Reply

4,372 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @LavanyaR 

I will be helping you with this topic in this post (Driver configuration for S32K322). 

0 Kudos
Reply

4,861 Views
LavanyaR
Contributor I

Hello all,

I have tried this code for s32k324 but this is also not working. Same s32k344 code we checked in Evolution Board. It send the data in one time. In s32k324 controller CAN code not working and producing Bus error. Kindly give the clarification for CAN configuration. 

Thanks you in advance

0 Kudos
Reply

4,816 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @LavanyaR 

Could you share an image of the error you are getting? Also, could you provide more details about the project's behavior?

0 Kudos
Reply

4,795 Views
LavanyaR
Contributor I

Hi @VaneB 

Screenshot 2023-12-19 095350.png

I have checked Loop-back mode and Normal mode. But we are receiving the 

Bus Error. And i don't have the clarity about those mode. Kindly explain about the modes and which mode need to choose.

0 Kudos
Reply

4,750 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @LavanyaR 

Sorry for the inconvenience this might cause. I am not familiar with the tool you are using. 

Also, the CAN_Example was developed as a LoopBack example, so no external tools or external connections are needed. 

0 Kudos
Reply

4,663 Views
LavanyaR
Contributor I

Hi @VaneB 

In Example code clock configuration have the below options are enabled.

LavanyaR_0-1703387361773.png

If i enabled these options means whether it occur  hard fault error or get stuck in below condition.

LavanyaR_1-1703387648075.png

 

 

 

0 Kudos
Reply

4,623 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @LavanyaR 

The function Clock_Ip_GetClockFrequency returns the frequency of a given clock, in this case, FXOSC. Make sure that the clock configuration on Config Tools has the same value as your external clock/oscillator. 

 

0 Kudos
Reply

4,585 Views
LavanyaR
Contributor I

Hi @VaneB 

In FXOSC and CAN0 to CAN5 having the same frequency. I have configures as 16MHz.

LavanyaR_0-1703651362897.png

 

LavanyaR_1-1703651390524.png

 

0 Kudos
Reply

4,554 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @LavanyaR 

Could you share your example project so I can test it from my side? Or, if it is not possible, could you share all the configurations made in COnfigTools? So I can try to replicate the problem using an example code.

0 Kudos
Reply

4,493 Views
LavanyaR
Contributor I

Hi @VaneB 

CAN driver is working now.

Thank you

0 Kudos
Reply