Cannot Send/Get CAN Messages on MPC5775B EVB

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

Cannot Send/Get CAN Messages on MPC5775B EVB

Jump to solution
1,832 Views
sonik82
Contributor III

I am trying to check CAN communication on MPC5775B BMS Plus VCU Reference Design board with using MBDT. To check CAN message transmitting function I have used flexcan_master_mpc574x model after changing MCU, FCAN configuration and Digital output configuration:

sonik82_0-1616712569986.png

sonik82_1-1616712733324.png 

sonik82_2-1616712811811.png

After building code and flashing MCU, I have used Microchip CAN BUS Analyzer Tool

 to check output messages, but saw nothing and LED D45 is always ON. Then I have tried to check CAN receiving with flexcan_slave_mpc574x model by using same modifications, but result was same: I am not able to send any message to MCU and LED D45 is always ON.

Before I have checked both flexcan_master_mpc574x and flexcan_slave_mpc574x models with using DEVKIT MPC5744P and Microchip CAN BUS Analyzer Tool and everything was working fine.

 

 

 

 

  

0 Kudos
1 Solution
1,691 Views
paulvlase
NXP Employee
NXP Employee

Hi @sonik82 ,

 

Can you uncheck Bitrate to time segments option, increment the Phase1 segment from 5 to 6, and try to run the example again?

 

You should have the following settings:

paulvlase_0-1617266367287.png

 

Regards,

Paul

View solution in original post

10 Replies
1,819 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @sonik82 

Please have a look at this thread https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/Build-Fails-When-Target-MCU-gt-Family-is-s... 

Here, we've provided a patch for the MPC5775B/E that has to be applied to the current installation folder of the toolbox. 

Also, on the board there are two CAN instances, CAN0 and CAN1. Please try on both of them. The difference is the transceiver they are using, one of them may require some configurations.

Hope this helps,

Marius

0 Kudos
1,736 Views
sonik82
Contributor III

@mariuslucianand  what is a difference between FlexCAN and MCAN library blocksets? 

I have used mpc5777c FlexCAN examples with CAN0 and everything works fine, but with using MCAN examples I can see CAN bus traffic only in "listen only mode" and signal ID and data are wrong.  

0 Kudos
1,714 Views
paulvlase
NXP Employee
NXP Employee

Hi @sonik82 ,


FlexCAN and MCAN are two different CAN peripherals. On MPC577x MCAN has CAN-FD support, two RX FIFOs, more message buffers, and you can also use the Rx FIFO with CAN-FD, which FlexCAN doesn't support. You can find the list of FlexCAN features in chapter 40.2.2 and the MCAN one in chapter 41.1.2 from the reference manual.


I tried the example mcan_fd_echo_mpc577x.mdl on my side, on the X-MPC5775E/B-EVB board because I don't have access to a MPC5775B BMS Plus VCU Reference Design board, and it works as expected.


Can you post a screenshot with the bitrate configuration in the MCAN_Config block and another one with the one from your CAN BUS Analyzer tool?


I am also curious to know why FlexCAN wasn't working before?


Regards,

Paul

0 Kudos
1,700 Views
sonik82
Contributor III

@paulvlase 

FlexCAN works only when I choose mpc5777c even I use patch mentioned by @mariuslucianand 

0 Kudos
1,706 Views
sonik82
Contributor III

Hello @paulvlase 

Microchip CAN BUS analyzer does not support CAN FD, so I have used mcan_master_mpc577x model

1.PNG

2.PNG5.PNG

In Normal mode there is nothing in CAN analyzer

3.PNG

If I change mode to "Listen only", then I can see this data, which is not same with data in simulink model

4.PNG 

Best regards,

Denis

0 Kudos
1,692 Views
paulvlase
NXP Employee
NXP Employee

Hi @sonik82 ,

 

Can you uncheck Bitrate to time segments option, increment the Phase1 segment from 5 to 6, and try to run the example again?

 

You should have the following settings:

paulvlase_0-1617266367287.png

 

Regards,

Paul

1,633 Views
sonik82
Contributor III

sonik82_0-1618063813212.png

@paulvlase  It works. Thank you for help.

0 Kudos
1,777 Views
sonik82
Contributor III

@mariuslucianand Also I am going to try these example models instead of modification of mpc5744p model.

sonik82_0-1616762107264.png

Earlier I didn't know about existing of these models because they are not shown in my Simulink library.

 

0 Kudos
1,800 Views
sonik82
Contributor III

@mariuslucianand Thank you very much for reply. I have already used this patch, without it I was not able to generate and compile a code. Also I have tried to use both CAN channels with same result. Initially I thought that issue is in Microchip CAN analyzer, but with mpc5744p EVB it works fine. 

Moreover, I changed the CAN Engine Clock Source to Oscillator Clock in the FCAN config block and changed target to mpc5777C, but it also did not work.

Today I will try repeat same study in Matlab 2020a (before I have used 2017b) and let you know about results.

0 Kudos
1,796 Views
mariuslucianand
NXP Employee
NXP Employee

This might be related to the CAN transceivers. @paulvlase can you please comment on this?

Marius

Tags (1)
0 Kudos