Build Fails When “Target MCU > Family” is set to “MPC5775B” in Configuration Block

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

Build Fails When “Target MCU > Family” is set to “MPC5775B” in Configuration Block

Jump to solution
3,873 Views
ranulf
Contributor IV

System: Windows 10
Development Board: X-RDVCU5775EVM VERSION B
MATLAB Version: 2020a
Toolbox: Model-Based Design Toolbox for MPC57xx MCUs Version 3.2.0

I have a model that contains FCAN blocks. The Simulink build fails when “Target MCU > Family” is set to “MPC5775B” in the configuration block. However, the build is successful when “Target MCU > Family” is set to “MPC5777C” in the configuration block. That is strange because the MPC5775B is the actual chip on the dev board. Why does the build fail?

ranulf_0-1603985760086.png

 

0 Kudos
Reply
1 Solution
3,655 Views
ranulf
Contributor IV

@paulvlaseWith the target set as MPC5775B, I changed the CAN Engine Clock Source to Oscillator Clock in the FCAN config block and tried again. Now the code worked as it should.

View solution in original post

0 Kudos
Reply
7 Replies
3,834 Views
ranulf
Contributor IV

@mariuslucianand I followed your instructions above. I set the target to MPC5775B. The build completed without errors. The code was downloaded to the board. However, the code did not run properly: Some LEDs that should have been flashing did not. A CAN message that should have been transmitted was not.

I set the target back to MPC5777C and replaced the new file with the original one and built and downloaded again. The code ran as expected. 

Apparently the fix did not work as expected.  

0 Kudos
Reply
3,736 Views
paulvlase
NXP Employee
NXP Employee

Hi @ranulf , @iraleksandrova1 ,

 

The input muxing configuration for FlexCAN RX is not correct.

 

Can you try to apply the attached patch?

 

The steps to do that are:

1. Download the attached zip file and unzip it.

2. Run mbd_find_mpc_root() to get the root folder there the MPC57xx toolbox is installed.

3. Open the mpc5775b_e_flexcan_patch.exe file and extract it's contents to the root folder.

4. Try again your model.

 

Regards,

Paul

0 Kudos
Reply
1,737 Views
RegulusCheng
Contributor III

If MCAN0 set on RDVCU5775EVM also has a problem?

I tried many ways but still can not control MCAN1 with TJA1145, I have tried to config TJA1145 but still not get any response.

Can you give me  detail steps about using MCAN1 with MBDT?

 

0 Kudos
Reply
3,730 Views
ranulf
Contributor IV

I ran mbd_find_mpc_root() in the Matlab command window to get the path:  C:\Users\[user]\AppData\Roaming\MathWorks\MATLAB Add-Ons\Toolboxes\NXP_MBDToolbox_MPC57xx.

I put  mpc5775b_e_flexcan_patch.exe in that location and ran it. When the Confirm File Replace window opened I selected the Yes to All option. 

In my model in the MBDTBX_EC_MPC574X Config_Information block I changed Family to MPC5775B. I built the code and downloaded to the eval board. The build proceeded without errors. However, when I ran the code the board was unresponsive. 

I changed Family back to MCP5775C and rebuilt and the code appeared to work normally again. 

 

0 Kudos
Reply
3,656 Views
ranulf
Contributor IV

@paulvlaseWith the target set as MPC5775B, I changed the CAN Engine Clock Source to Oscillator Clock in the FCAN config block and tried again. Now the code worked as it should.

0 Kudos
Reply
3,809 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ranulf ,

Thank you for mentioning this behavior. We will investigate. @paulvlase  can you investigate this?

Regards,

Marius

3,862 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @ranulf ,

Thank you for mentioning this!

I confirm that this is a bug. So let's try fixing it by replacing this p file under {MPC installation folder}\mbdtbx_mpc\mscripts\fcan

Once you tested this, please let me know if the error is gone and the CAN works.

Hope this helps,

Marius

0 Kudos
Reply