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:
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.
Solved! Go to Solution.
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:
Regards,
Paul
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
@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.
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
FlexCAN works only when I choose mpc5777c even I use patch mentioned by @mariuslucianand
Hello @paulvlase
Microchip CAN BUS analyzer does not support CAN FD, so I have used mcan_master_mpc577x model
In Normal mode there is nothing in CAN analyzer
If I change mode to "Listen only", then I can see this data, which is not same with data in simulink model
Best regards,
Denis
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:
Regards,
Paul
@paulvlase It works. Thank you for help.
@mariuslucianand Also I am going to try these example models instead of modification of mpc5744p model.
Earlier I didn't know about existing of these models because they are not shown in my Simulink library.
@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.