freeMaster transplant to new s32 project

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

freeMaster transplant to new s32 project

跳至解决方案
829 次查看
Harry0001
Contributor II

Hello,I plan to use the freeMaster on my new S32 project as they use the same board based on MPC5777C.The question is how to transplant the it by using the fast method?

Now I have the driver package about the freeMaster on the old project.i has tried to put the three API FMSTR_Init(),FMSTR_Poll(),Recoder(0) on the properly position of the nwe project.And i plan to use CAN as the communication style which is the same this the old project .But i do not know how to configuate the CAN communication on the new project.

I want to measure and calibrate the variables by using the freeMaster,also i want to link the state machine with the freeMaster switch.So is there any manual or suggestion about how to transplant freeMaster to a new project step by step?Thanks!

0 项奖励
1 解答
811 次查看
iulian_stan
NXP Employee
NXP Employee

Hi @Harry0001,

You can either start from an existing FreeMASTER example and add your custom logic or integrate FreeMASTER Driver into you existing application.

For the first case you ca refer to the following post: Communication Driver Configuration (unfortunately it show cases only UART communication).

For the second one you can check the sample project that is included into FreeMASTER Driver package:

Capture.PNG

Inside the "src" folder of the corresponding project you will find "periphinit.c" implementing CAN configuration. There are no specific settings required by FreeMASTER beside the minimal setup:

Board setup:

  • Enabling CAN peripheral
  • Setting correct baud rate (the host uses 500Kb as default value)
  • Routing CAN RX/TX signals to corresponding pins

FreeMASTER setup "freemaster_cfg.h" (I assume these were already set in your previous project):

  • #define FMSTR_CAN_BASE 0xFFE30000UL
  • #define FMSTR_USE_MCAN 1

Iulian

在原帖中查看解决方案

0 项奖励
2 回复数
812 次查看
iulian_stan
NXP Employee
NXP Employee

Hi @Harry0001,

You can either start from an existing FreeMASTER example and add your custom logic or integrate FreeMASTER Driver into you existing application.

For the first case you ca refer to the following post: Communication Driver Configuration (unfortunately it show cases only UART communication).

For the second one you can check the sample project that is included into FreeMASTER Driver package:

Capture.PNG

Inside the "src" folder of the corresponding project you will find "periphinit.c" implementing CAN configuration. There are no specific settings required by FreeMASTER beside the minimal setup:

Board setup:

  • Enabling CAN peripheral
  • Setting correct baud rate (the host uses 500Kb as default value)
  • Routing CAN RX/TX signals to corresponding pins

FreeMASTER setup "freemaster_cfg.h" (I assume these were already set in your previous project):

  • #define FMSTR_CAN_BASE 0xFFE30000UL
  • #define FMSTR_USE_MCAN 1

Iulian

0 项奖励
777 次查看
Harry0001
Contributor II

Thanks!I have finished the transplant on the MPC5777C new S32 project.The point worthy of notice is the properly configuration of the CAN and also know clearly which CAN buffer is used as the freemaster communication.

0 项奖励