CAN1 Not Working in Parallel with CAN0

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

CAN1 Not Working in Parallel with CAN0

Jump to solution
366 Views
schourasiya
Contributor II

Hi,

I’m working on the S32K344 using MBDT v1.5, and I'm trying to configure all four CAN controllers for both Tx and Rx. For initial validation, I’ve configured only CAN0 and CAN1.

CAN0 is working fine for both transmission and reception.

CAN1, however, does not produce any output even though I’ve followed the same configuration steps as for CAN0.

Both controllers are initialized in the model, and the Tx blocks are set up identically for both. I’ve attached the .mex file for reference, along with a screenshot of how I'm configuring the blocks in MBDT.

Could someone help me understand what might be missing or misconfigured for CAN1 to work in parallel with CAN0?

Thanks in advance.

schourasiya_0-1754284491610.png

 

 

0 Kudos
Reply
1 Solution
339 Views
SorinIBancila
NXP Employee
NXP Employee

Hello,

 

I've downloaded your configuration file and I found a few problems:

1. In the platform configuration, you need to enable the interrupts for the FlexCAN component, set a priority and add the IRQ handlers.. The lower the number, the higher the priority.

SorinIBancila_0-1754306555428.png

 

 

2. You need to configure the pins in the PORT components for the CAN instance you want to use, similarly to the CAN0 instance.

SorinIBancila_1-1754306771376.png

 

3. In the PINS view, you need to configure the EN and STB pins for the transceiver too, similarly to the CAN0. If the state of the EN and STB are not properly set, you might get undefined behavior. 

 

SorinIBancila_2-1754306880604.png

 

3.1 If you want to control EN and STB at runtime, you also have to update the DIO component with the EN and STB pins, similarly to CAN0.

SorinIBancila_3-1754307035168.png

 

 

These are a few things I was able to find looking through your configuration file. Let me know if the suggestions help you.

 

Best regards,

Sorin Bancila

View solution in original post

5 Replies
357 Views
SorinIBancila
NXP Employee
NXP Employee

Hello,

 

One thing to verify is to download the schematic and check if the transceiver for CAN1 is the same as the transceiver for CAN0. If they are different, the initialization part might be different.

 

Can you provide the name of the reference design board you are using? Or maybe a link.

 

Best regards,

Sorin Bancila

0 Kudos
Reply
347 Views
schourasiya
Contributor II
This is a customized PCB developed by a third party, and the schematic is part of their confidential documentation, so I do not have access to it. As for the CAN transceiver, they have used the TCAN1042
0 Kudos
Reply
340 Views
SorinIBancila
NXP Employee
NXP Employee

Hello,

 

I've downloaded your configuration file and I found a few problems:

1. In the platform configuration, you need to enable the interrupts for the FlexCAN component, set a priority and add the IRQ handlers.. The lower the number, the higher the priority.

SorinIBancila_0-1754306555428.png

 

 

2. You need to configure the pins in the PORT components for the CAN instance you want to use, similarly to the CAN0 instance.

SorinIBancila_1-1754306771376.png

 

3. In the PINS view, you need to configure the EN and STB pins for the transceiver too, similarly to the CAN0. If the state of the EN and STB are not properly set, you might get undefined behavior. 

 

SorinIBancila_2-1754306880604.png

 

3.1 If you want to control EN and STB at runtime, you also have to update the DIO component with the EN and STB pins, similarly to CAN0.

SorinIBancila_3-1754307035168.png

 

 

These are a few things I was able to find looking through your configuration file. Let me know if the suggestions help you.

 

Best regards,

Sorin Bancila

332 Views
schourasiya
Contributor II
Hi,

Thanks — the CAN1 issue is now resolved after applying the suggested configuration changes.

I have a follow-up question:

When working with different peripherals (e.g., CAN, ADC, SPI, PWM), it's often unclear which prior configurations (clocks, pinmux, interrupts, etc.) are mandatory to get them working. This leads to a lot of guesswork and trial-and-error during integration.

Could you please guide me on:

Which official documents or references clearly outline the required pre-configuration steps for each peripheral?

Is there a recommended process or checklist to systematically bring up and debug peripheral-related issues using MBDT or RTD?

Any pointers to application notes, user manuals, or example projects that help streamline peripheral initialization would be very helpful.

Thanks in advance!
0 Kudos
Reply
308 Views
SorinIBancila
NXP Employee
NXP Employee

Hello,

 

If you want to see how to configure, initialize and use different peripherals, you can install S32 Design Studio and install the same RTD version as the RTD included in the toolbox.  Then, you gain access to examples for most of the peripherals (including configuration projects .mex).

SorinIBancila_1-1754468960174.png

 

 

Another way to understand the MBDT workflow is to check the webinars and articles available on the MBDT Community.

SorinIBancila_0-1754468915850.png

 

The third option is to check the included examples in the MBD Toolboxes.  All the supported peripherals include at least one example to showcase the functionality.  

SorinIBancila_2-1754469671369.png

 

 

Best regards,

Sorin Bancila

 

 

0 Kudos
Reply