S32M244 FlexCAN with Internal Transceiver

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

S32M244 FlexCAN with Internal Transceiver

Jump to solution
1,067 Views
GaneshBhagwat
Contributor IV

 

Hi NXP Community,

I am working with the S32M244 series device and configuring the FlexCAN module using the internal CAN transceiver. The project is developed in S32 Design Studio 3.6.

Current Behavior:

  • The internal transceiver appears to be active (I can see pulses on the oscilloscope).
  • When I trigger transmission using the FlexCAN TX function, pulses are visible on the CAN lines.
  • However, the TX message is not being properly received on the PC via PCAN(No Message appears ).
  • After the first transmission, pulses continue repeatedly on the bus, making it difficult to decode the signal on the oscilloscope.

Additional Information:

  • I am using a FlexCAN configuration similar to what I previously implemented on the S32K358, where it works correctly.
  • The issue seems specific to the S32M244 setup.
  • Currently, this test project contains only the CAN configuration.

Questions:

  1. Is there any complete working example of FlexCAN using the internal CAN transceiver on S32M244?
  2. Are there additional configurations required for enabling or controlling the internal transceiver (normal mode, standby, wake-up, etc.)?
  3. Could the continuous pulses indicate a configuration issue (e.g., bus-off, auto retransmission, incorrect timing)?

I have attached my current CAN-only project for reference.
Any guidance or example code would be greatly appreciated.

Thank you.

Best regards,
Ganesh

 

Tags (1)
0 Kudos
Reply
1 Solution
1,009 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @GaneshBhagwat,

Are the pulses you mentioned visible in the oscilloscope CAN frames? Or simply high low pulses?

"After the first transmission, pulses continue repeatedly on the bus, making it difficult to decode the signal on the oscilloscope"

This means that the bus only detects 1 node, and by specification CAN repeats the same message until an ACK has been received; Most probably the CAN bit timing is not correctly set. Be sure same sample point, bit rate, and is programmed

  1. Is there any complete working example of FlexCAN using the internal CAN transceiver on S32M244?

    There is example inside RTD package "CanTrcv_Example_S32M244", however, this example mainly configures transceiver and does not send anything on the bus. I've sent you a private message with a working example for CAN communication. 

  2. Are there additional configurations required for enabling or controlling the internal transceiver (normal mode, standby, wake-up, etc.)?

    No, mainly CanTrcv_Init & CanTrcv_SetOpMode to set it to NORMAL mode.

  3. Could the continuous pulses indicate a configuration issue (e.g., bus-off, auto retransmission, incorrect timing)?

    Yes. As I mentioned previously, this points to wrong bit timing configuration. I can see from your project bit timing is 250Kbps & 87.5% sampling point. Please set the same settings for both nodes (PCAN + S32M244).

Also, I can see in your project configuration, you are using both MCAL and IP layers. If possible, please avoid mixing AUTOSAR and non-AUTOSAR layers.

Best regards,
Julián

View solution in original post

3 Replies
1,010 Views
Julián_AragónM
NXP TechSupport
NXP TechSupport

Hi @GaneshBhagwat,

Are the pulses you mentioned visible in the oscilloscope CAN frames? Or simply high low pulses?

"After the first transmission, pulses continue repeatedly on the bus, making it difficult to decode the signal on the oscilloscope"

This means that the bus only detects 1 node, and by specification CAN repeats the same message until an ACK has been received; Most probably the CAN bit timing is not correctly set. Be sure same sample point, bit rate, and is programmed

  1. Is there any complete working example of FlexCAN using the internal CAN transceiver on S32M244?

    There is example inside RTD package "CanTrcv_Example_S32M244", however, this example mainly configures transceiver and does not send anything on the bus. I've sent you a private message with a working example for CAN communication. 

  2. Are there additional configurations required for enabling or controlling the internal transceiver (normal mode, standby, wake-up, etc.)?

    No, mainly CanTrcv_Init & CanTrcv_SetOpMode to set it to NORMAL mode.

  3. Could the continuous pulses indicate a configuration issue (e.g., bus-off, auto retransmission, incorrect timing)?

    Yes. As I mentioned previously, this points to wrong bit timing configuration. I can see from your project bit timing is 250Kbps & 87.5% sampling point. Please set the same settings for both nodes (PCAN + S32M244).

Also, I can see in your project configuration, you are using both MCAL and IP layers. If possible, please avoid mixing AUTOSAR and non-AUTOSAR layers.

Best regards,
Julián

944 Views
GaneshBhagwat
Contributor IV

 

@Julián_AragónM

Thank you for your reply.

I tested the updated code you provided and investigated the issue on my setup. I found two root causes:

  1. Clock Configuration Issue
    As you mentioned, the issue was related to the clock configuration. On my side, the peripheral clock was set to 40 MHz, while the configuration expected 48 MHz.
    I verified this by checking the FSPWM generation derived from the core clock and comparing the timing. After correcting the clock configuration to 48 MHz, the CAN communication worked as expected.

    GaneshBhagwat_1-1771345006399.pngGaneshBhagwat_2-1771345033135.png

    Running it at 100Kbps

  2. Power Module Configuration
    The second issue was related to the power configuration. The required power module was not enabled in my initial setup. After enabling it in the configuration, the internal transceiver started working correctly.

    GaneshBhagwat_0-1771344962464.png

     

After resolving these two issues, everything worked properly.

The example runs fine on S32M276, but in the case of S32M244, it seems that the power module must be explicitly configured.

Thank you very much for your support — the example was very helpful.

0 Kudos
Reply
1,023 Views
GaneshBhagwat
Contributor IV
Hi @PetrS,
Could you please have a look at this issue when you have time? Your guidance would be greatly appreciated.
Thank you.
Best regards,
Ganesh
0 Kudos
Reply