Freemaster not working after processor expert configuration

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

Freemaster not working after processor expert configuration

跳至解决方案
1,379 次查看
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 项奖励
回复
1 解答
1,366 次查看
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 项奖励
回复
2 回复数
1,367 次查看
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 项奖励
回复
1,355 次查看
hredekar
Contributor I
Thanks, it is working now.
we changed the FlexCAN1 base to FlexCAN0 base
0 项奖励
回复