How to configure Freemaster over CAN bus on MPC5566?

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

How to configure Freemaster over CAN bus on MPC5566?

Jump to solution
2,621 Views
EmilyZhou8
Contributor III

Hi,

I want to use freemaster to communicate with the MPC5566 over CAN bus.

I have configued FMSTR_USE_FLEXCAN to 1. And chose right plugin on FreeMASTER. Is there any demo which can explain the basic how-to? I want to know how to add the related code to my project in MPC5566. 

#MPC5566 #FreeMASTER #CAN

0 Kudos
Reply
1 Solution
2,560 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, 

what ZLG device do you use? We are testing with USBCAN2, which is quite old. Maybe you have a newer device which needs some additional programming support (?).

Please show me a screenshot of your ZLG configuration window. 

This is how it is supposed to look:

MichalH_0-1704960617695.png

Please check:

  • The ZLG CANtest software is installed in the Program Files (x86)
  • The ControlCAN.dll exists in C:\Program Files (x86)\CANTest\ControlCAN.dll  (you do not need to copy it anywhere)
  • The DLL version is displayed (in my case it is 5.0.0.2).

 

Also, you can show us your CANtest software running with your CAN interface. This is how it looks on my side (USBCAN2 device):

MichalH_1-1704961166483.png

 

Thanks,
Michal

 

 

View solution in original post

0 Kudos
Reply
10 Replies
2,608 Views
iulian_stan
NXP Employee
NXP Employee

Hi @EmilyZhou8,

FreeMASTER Communication Driver 2.0 contains example applications for some MPC devices.

Capture.PNG

Unfortunately, it does not include MPC5566 example but you can use another application for one of the MPC family devices as reference. The driver library is installed by default in "C:\NXP\FreeMASTER_Serial_Communication_Driver_V2.0" folder and the example applications can be found in "examples\SCI_driver_examples":

Capture.PNG

You can also check this post for a step by step FreeMASTER Driver integration into a new project.

Hope it helps,
Iulian

 

0 Kudos
Reply
2,595 Views
EmilyZhou8
Contributor III

Thank you for your reply!

I did successfully connect FreeMASTER with MPC5566 through CAN, but on some computer FreeMASTER can open the CAN port and some don't. FreeMASTER warns me that could not open the communication port(Error 0x848c0003:Can not open CAN/LIN port or channel.)!) . Could you please tell me how to set up the FreeMASTER by communication through CAN?

 

0 Kudos
Reply
2,583 Views
iulian_stan
NXP Employee
NXP Employee

FreeMASTER CAN plugin uses underlying (vendor specific) driver to communicate with target board. This errors is thrown when the external driver fails to establish the communication channel.

Are you using the same version of FreeMASTER ? same probe ?

If so, can you check the CAN interface configuration from the PC that connects to the board with the one on which it fails. I am referring to the top part of this screen:

Capture.PNG

I can think of the following potential issues:

  • Driver is not identified correctly or uses a wrong channel.
  • Driver is not found or has an older version.

Kind regards,
Iulian 

0 Kudos
Reply
2,580 Views
EmilyZhou8
Contributor III

Thanks for your kind reply!

Yes, the same version. The only difference is (driver not find) which is shown after CAN device on the same platform you post. But I don’t know how to make FreeMASTER detect the CAN Card’s driver. Because I am pretty sure the CAN Card driver is installed and the CAN Card can be used for CAN communication.

0 Kudos
Reply
2,576 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, 

can you tell what CAN interface do you use? If it is a Vector card, you can also test the newer VECTOR-XL driver interface.

MichalH_0-1704894924424.png

Regards,
Michal

 

0 Kudos
Reply
2,573 Views
EmilyZhou8
Contributor III

Thank you for your reply!

I use ZLG CAN Card, and located/loaded driver DLL is not shown on my platform. Instead, Path to ControlCAN.dll within the CANtest to software folder is shown. And I test my CAN Card which works for FlexCAN communication, but the Card cannot work for FreeMaster, because the driver for ZLG CAN Card is not found. And I don’t know how to deal with it. 

0 Kudos
Reply
2,567 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, 

can you make sure to install the x86 version of the CANtest and use the path to 32-bit DLL in the FreeMASTER plug-in?

Does the 32-bit version of the CANtest software work in your case?

In our test setup, we use the USBCAN_AllInOne_x86_x64_2.0.0.1 package for 32bit version of Windows.

Regards,
Michal

0 Kudos
Reply
2,565 Views
EmilyZhou8
Contributor III

Thanks for your patience!

The CAN card installation package I installed is USBCAN_AllInOne_x86_x64_2.0.0.1. I copied the ControlCAN in CANtest to Windows\Sys WOW64. Although the FreeMaster display changes from driver not find to device not find, what else do I need to do so that I CAN link to FreeMaster?

0 Kudos
Reply
2,561 Views
MichalH
NXP Apps Support
NXP Apps Support

Hello, 

what ZLG device do you use? We are testing with USBCAN2, which is quite old. Maybe you have a newer device which needs some additional programming support (?).

Please show me a screenshot of your ZLG configuration window. 

This is how it is supposed to look:

MichalH_0-1704960617695.png

Please check:

  • The ZLG CANtest software is installed in the Program Files (x86)
  • The ControlCAN.dll exists in C:\Program Files (x86)\CANTest\ControlCAN.dll  (you do not need to copy it anywhere)
  • The DLL version is displayed (in my case it is 5.0.0.2).

 

Also, you can show us your CANtest software running with your CAN interface. This is how it looks on my side (USBCAN2 device):

MichalH_1-1704961166483.png

 

Thanks,
Michal

 

 

0 Kudos
Reply
2,554 Views
EmilyZhou8
Contributor III

Thank you very much for your patience!

I think I solved the problem by replacing focpgi.dll in C:\Program Files (x86)\NXP\FreeMASTER 2.5\plugins\can. ZLG USBCAN finally communicate with FreeMASTER.

 

0 Kudos
Reply