Freemaster not working after processor expert configuration

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Freemaster not working after processor expert configuration

ソリューションへジャンプ
1,378件の閲覧回数
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,365件の閲覧回数
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,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 件の賞賛
返信
1,354件の閲覧回数
hredekar
Contributor I
Thanks, it is working now.
we changed the FlexCAN1 base to FlexCAN0 base
0 件の賞賛
返信