freeMaster transplant to new s32 project

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

freeMaster transplant to new s32 project

Jump to solution
820 Views
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 Kudos
1 Solution
802 Views
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

View solution in original post

0 Kudos
2 Replies
803 Views
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 Kudos
768 Views
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 Kudos