Freemaster not working after processor expert configuration

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

Freemaster not working after processor expert configuration

Jump to solution
1,377 Views
hredekar
Contributor I

Hello NXP.

I am using S32K142 RDB and SW from below link, everything is working fine including Freemaster.

https://community.nxp.com/t5/S32K-Knowledge-Base/Automotive-Electrical-E-compressor-Aircon-RDB-based...

Now i am porting the same on our in-house developed HW with the processor expert configuration. below is the observation based on configuration.

1. Clock oscillator changed from 16 MHz to 8 Mhz

2. CAN is working

3. Freemaster over CAN is not working.

When the source code is compared, there is not much change concerning Freemaster.

0 Kudos
Reply
1 Solution
1,364 Views
iulian_stan
NXP Employee
NXP Employee

Hi @hredekar,

Does your HW uses the same CAN instance as the RDB ? FreeMASTER uses CAN instance defined in freemaster_cfg.h, ex:

#define FMSTR_CAN_BASE         0x40025000UL /* FlexCAN1 base on S32K14x */

Another thing to check is the bit rate. Considering you have different clock frequency, you may need to:

  • select the bitrate specific to your HW, in FreeMASTER tool (on the PC), or
  • update clock configuration to obtain the FreeMASTER default bitrate (500 kB)

You can make a simple test to check whether FreeMASTER uses correct CAN instance by following these steps:

1. Enable polling driven communication

#define FMSTR_LONG_INTR        0    /* Complete message processing in interrupt */
#define FMSTR_SHORT_INTR       0    /* SCI FIFO-queuing done in interrupt */
#define FMSTR_POLL_DRIVEN      1    /* No interrupt needed, polling only */

2. Define debug macro

#define FMSTR_DEBUG_TX 1

 3. Connect CAN adapter and inspect the communication frames - FreeMASTER Driver should be continuously sending a test frame "+©W" (0xA9U).

Note: FreeMASTER tool won't be able to connect to the board while in debug. This test only ensures that FreeMASTER Driver is properly configured.

View solution in original post

0 Kudos
Reply
2 Replies
1,365 Views
iulian_stan
NXP Employee
NXP Employee

Hi @hredekar,

Does your HW uses the same CAN instance as the RDB ? FreeMASTER uses CAN instance defined in freemaster_cfg.h, ex:

#define FMSTR_CAN_BASE         0x40025000UL /* FlexCAN1 base on S32K14x */

Another thing to check is the bit rate. Considering you have different clock frequency, you may need to:

  • select the bitrate specific to your HW, in FreeMASTER tool (on the PC), or
  • update clock configuration to obtain the FreeMASTER default bitrate (500 kB)

You can make a simple test to check whether FreeMASTER uses correct CAN instance by following these steps:

1. Enable polling driven communication

#define FMSTR_LONG_INTR        0    /* Complete message processing in interrupt */
#define FMSTR_SHORT_INTR       0    /* SCI FIFO-queuing done in interrupt */
#define FMSTR_POLL_DRIVEN      1    /* No interrupt needed, polling only */

2. Define debug macro

#define FMSTR_DEBUG_TX 1

 3. Connect CAN adapter and inspect the communication frames - FreeMASTER Driver should be continuously sending a test frame "+©W" (0xA9U).

Note: FreeMASTER tool won't be able to connect to the board while in debug. This test only ensures that FreeMASTER Driver is properly configured.

0 Kudos
Reply
1,353 Views
hredekar
Contributor I
Thanks, it is working now.
we changed the FlexCAN1 base to FlexCAN0 base
0 Kudos
Reply