want to use Freemaster to monitor and calibrate variables on the S32K144 via CAN, but I'm having trouble effectively configuring the CAN connection in Freemaster (see the illustration). Can you tell me how to solve this problem? Or is there a configuration manual or user guide available?
Hi @fengba_360 ,
It seems that the corresponding CAN probe driver is either not detected or is not compatible with FreeMASTER.
What CAN adapter are you using ?
Please note that CAN adapter software (driver) should be installed separately of FreeMASTER.
I reinstalled the ZLG CAN driver, and now FreeMASTER can recognize it, but it reports the error shown in the image. Can you tell me how to deal with it?
Hello,
the ZLG USBCAN-I and USBCAN-II have known issues and may not work with FreeMASTER correctly. I recommend to use newer devices like USBCAN-2E-U, or 4E-U.
Anyway, when all attempts fail, I would recommend to hook a logic analyzer to CAN RX/TX signals at the microcontroller side and observe if communication reaches the MCU and if it answers (at proper bitrate).
Regards,
Michal
Hello support of USBCANFD device is now under development along with adding support of CAN-FD transport protocol. We plan to release it by end of June as new experimental feature.
Anyway, you can still try the USBCAN device and try to observe the bus (and bit timing) using a logic analyzer or oscilloscope. The issues I talked about with USBCAN are causing the FreeMASTER to crash of hang. If you can press the "Test Connection" button without a crash, then, I think, the USBCAN device could work.
There is a LED on the USBCAN device - it shall flash when you press the Test Connection in the FreeMASTER - that would be a good indication if a CAN frame is transmitted or not.
Regards,
Michal
I think (not sure) that flashing the red LED is actually good indication that FreeMASTER attempted to send a frame, but it was not acknowledged by anyone on the CAN bus.
To me it seems the target board does not receive the frame - either because its CAN module is not initialized properly or because the bit-rates do not match. You can double check by putting a breakpoint to a CAN reception routine FMSTR_RxCan() - to see if this function is ever called. If yes, then good the communication works at least somehow. If not, then there is a problem in configuration or bus termination. Make sure the CAN bus is properly terminated by 120ohm resistors on both sides (or at least one side if a wire is short).
Are you trying to use a CAN example application or your own application? It would be good to try the example first.
Regards,
Michal
Hi @yang_jacky,
Please find attached an example for S32K144 using FreeMASTER Driver over UART.
This project was build using:
Note: we do not have a planned updates on FreeMASTER Driver for S32K1, so I integrated manually the latest version of the driver.
It uses CAN0 instance @ 500 Kbps (tested with Vector VN1610):
I also included a sample FreeMASTER project that reads a demo variable and plots inside an Oscilloscope chart.
Hope it helps.
Hi,MichaIH
When I use the CANTest tool, the baud rate is set to 500kbps, and the CANTest tool can correctly receive CAN messages sent by the device. When using the FreeMaster tool, the Bit rate is 500KB. May I ask if the baud rate set by the CANTest tool and the Bit rate set by FreeMaster are in the same unit. Is there a difference between baud rate and bit rate?
In most cases this error code means that FreeMASTER (desktop tool) did not receive a reply from the target board.
You would need to check whether CAN interface and FreeMASTER Driver are properly configured.
If you are using SDK to configure the CAN, you may need to disable transmission abort mechanism (see this thread for more info).
It's available on FreeMASTER's home page in downloads section. Here's a direct link.
If you are using S32 Design Studio, it is already included in S32K1xx development package - you can find it in `C:\NXP\S32DS.3.5\S32DS\software\FreeMASTER_Serial_Communication_Driver_V2_0`.
I would also recommend checking the following post - it explains UART configuration, but the same flow applies in case of CAN communication.