S32K322 FLEXCAN

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

S32K322 FLEXCAN

1,159 Views
Vishnu4
Contributor I

Hi,

The microcontroller for our project S32K322NH(2MB Dual-core, 100pin) . An evaluation board for the same controller was not available. As per the instruction from the NXP part supplier we purchased an S32K344 dev board and by using an elf (given by NXP FAE) file we converted it into an S32K324(dual core).

We started working with S32K324 by using RTD version 4.0.0 with S32DS 3.5 (Update 9). With this, I was able to control GPIO but when I started developing FLEX_CAN the API FlexCAN_Ip_GetTransferStatus(INST_FLEXCAN_0, RX_MB_IDX); always returned FLEXCAN_STATUS_BUSY. Also not receiving any data.

I Asked for support again, and they informed me to change the RTD version to 3.0. Now I am getting a hard fault error. Not able to run the code. I saw a solution on the forum (screenshot attached) which asked to define MPU_ENABLE.

In my case, this MPU_ENABLE is already defined.

From the highlighted line of code, my program is entering Hard-fault. Need a solution ASAP as our product development is on hold due to this. Any help would be deeply appreciated!

I am attaching my code and supporting screenshot documents along with this.

 

0 Kudos
3 Replies

1,138 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Vishnu4 

Did you test the FlexCAN_Ip_Example? If yes, Did you see the same behavior?

As I do not have any board with an S32K324, I will be trying to replicate your issue with an S32K344EVB. For this, I want to try as much as possible to be in the same context as you. Could you help me by providing any other configuration you made? 

 

B.R.

VaneB

0 Kudos

1,134 Views
Vishnu4
Contributor I

Hi @VaneB,

Thank you for the response.

I have used the same  S32K344EVB and FlexCAN_Ip_Example. 
The difference is, that I got a *.elf file(from NXP) to convert from S32K344(Lockstep core) to S32K324(dual-core) to test the dual-core functionality. So now the S32K344EVB is running with the S32K324 dual-core microcontroller. 

In this case, I can't directly use any S32K344 example project in the eval board. So, I created a new application project for S32K324, and I used the main file from the S32K344EVB example project. Also, I couldn't find any example projects with S32K324.

Are there any proper steps for installing RTD 3.0? If there is, can you please share it?  Also, a few example codes for S32K324?

Regards,

@Vishnu4 

 

0 Kudos

1,030 Views
VaneB
NXP TechSupport
NXP TechSupport

Hi @Vishnu4 

I have reviewed your code and I understand that you configure the FlexCAN driver as the example code. I am a little confused about your implementation. I saw that you created a callback function that is not used, also it looks like you are trying to communicate externally when the configuration is made in loopback. Could you help by clarifying these points?

Also, could you try testing the exact (no modifications) example of FlexCAN ported to a S32K324?

Regarding the S32K324 examples, as you know, S32K3 has many derivatives, so to reduce effort, in the most recent RTD releases we only provide examples for K344, K358, and K396. Examples of other derivatives can be created based on these existing examples.  

By last, if you want a CAN example without loopback, please check the following post. It has an example related to this topic that you might find useful. 

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

0 Kudos