How to configure Freemaster over CAN bus on MPC5566?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

How to configure Freemaster over CAN bus on MPC5566?

跳至解决方案
1,618 次查看
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 项奖励
回复
1 解答
1,557 次查看
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 项奖励
回复
10 回复数
1,605 次查看
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 项奖励
回复
1,592 次查看
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 项奖励
回复
1,580 次查看
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 项奖励
回复
1,577 次查看
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 项奖励
回复
1,573 次查看
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 项奖励
回复
1,570 次查看
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 项奖励
回复
1,564 次查看
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 项奖励
回复
1,562 次查看
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 项奖励
回复
1,558 次查看
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 项奖励
回复
1,551 次查看
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 项奖励
回复