s32k312 can freemaster

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

s32k312 can freemaster

2,723 Views
fengba_360
Contributor III

Hello, I would like to use FreeMASTER for monitoring via CAN. Could you please guide me on how to integrate and configure the FreeMASTER driver into my S32 Design Studio 3.5 project? Thank you.

Autosar Version: 4.7.0
Autosar Revision: ASR_REL_4_7_REV_0000
Autosar Conf.Variant:
SW Version: 3.0.0
Build Version: S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331

0 Kudos
Reply
3 Replies

2,668 Views
iulian_stan
NXP Employee
NXP Employee

Hi @fengba_360,

Unfortunately, there is no support for FreeMASTER over CAN for S32K3 family.
Note: we plan to add it by the end of the year.

In the meantime, you can use an older version of FreeMASTER Driver (v 2.0) which includes support for S32K1xx family because both families use the same FlexCAN module.

FreeMASTER has no Autosar integration. You would use FreeMASTER Driver as simple external component/library.

Steps to integrate FreeMASTER Driver:
1. Configure the CAN peripheral (FreeMASTER does not configure any peripherals)
2. Include FreeMASTER source code into your project (and add those folder to sources and include directories)
3. Configure FreeMASTER Driver (all FreeMASTER configurations are defined as macros in freemaster_cfg.h)
4. Include freemaster.h header file into your source code
5. Add FMSTR_Init() call in your application initialization section
6. Call FMSTR_Poll() in a periodic interrupt or an infinite loop

You can also check this older post.

I attached an S32K312 example project that you could use as reference (it was build with S32DS 3.5 and RTD 4.0.0).

Hope it helps

0 Kudos
Reply

2,646 Views
fengba_360
Contributor III

Thank you for your reply. I have tested it on the s32k144 with a Zlg CAN card, and encountered the following error message: "Error message: Timeout when waiting for the CAN/LIN response (no data received)." I have attached the screenshots of my configuration. Could you please take a look at them for me?0926-1.png20240926-2.png20240926-3.png微信图片_20240926161734.png微信图片_20240926162145.png微信图片_20240926162825.png

0 Kudos
Reply

2,630 Views
iulian_stan
NXP Employee
NXP Employee

Hi @fengba_360,

From your CAN configuration print screen I can assume that your application already has some logic that uses the CAN interface and FreeMASTER messages send from PC may never reach FreeMASTER Pool routine.

Please note that FreeMASTER cannot share the same CAN interface with other applications.  Also it does not use RX FIFO.

I used the same command ID (7bb) and message buffers (12 & 13) and was able to connect to the board. See my config bellow:

Capture.PNG

 Capture4.PNG

Capture1.PNG

For CAN you just Initialize the peripheral without extra options. Additionally, I disabled the abort mechanism that is not handled by FreeMASTER but is enabled by the SDK. 

Capture3.PNG

 

0 Kudos
Reply