FreeMaster not connecting over CAN MBDT 1.5 - S32K344

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

FreeMaster not connecting over CAN MBDT 1.5 - S32K344

672件の閲覧回数
rishikesh_c
Contributor III

I recently installed MBDT 1.5 for the S32K3xx series. I built a simple model to connect the board to FreeMaster over CAN. 

I have CAN configured to work at 500Kb and used the FreeMaster Config block to set the mode to long interrupt ( I also tried with short interrupt and polling). I have an initialisation function where I am calling the Can_SetControllerMode function.

I have also tried calling the Can_EnableControllerInterrupts function in the initialisation function.

However, I am not able to connect over CAN through FreeMaster. I get the "error contacting the target" error message. 

I am using FreeMaster desktop tool version 3.2.2. For the connection itself, I am using a PEAK CAN device. I have tried connecting a number of PEAK CANs but none connect. The devices themselves aren't faulty because I have tested them with other boards. 

I am attaching my model and the mex file for reference (there are some NVM blocks too which are also problematic and I have commented them out). 

Can someone help me with this, please?

タグ(4)
5 返答(返信)

140件の閲覧回数
rishabh_10
Contributor I

Hello,
I am testing freemaster over Peak CAN and I am facing some issues. I have done the configuration for CAN1 & CAN2. On default Software settings from nxp MBDT for CAN0 & CAN4, I am able to use freemaster over peak CAN over CAN0 but not for CAN1, CAN2 or CAN4. I have done the following:-

1. Added the flexcan0, flexcan2 & Flexcan1 in default CAN0 config which enables the freemaster use over peak CAN, but configuring CAN0, CAN1 or CAN2 manually does not work for freemaster.
2. Hardware objects are configured for both transmission and reception.
3. Also the Pins and ports have been added for the respective pins.

4. Also Configuring this, transmission and reception is not working for any CAN channel.

Is there some any further cofigurations which i need to do for this to work.

Thanks,
Rishabh

0 件の賞賛
返信

115件の閲覧回数
Adrian_Gherca
NXP Employee
NXP Employee

Hello and thank you for using our product.

Having a working FreeMASTER over CAN using the FLEXCAN_0 channel is a good start.
You also mention about pins but it is not clear to me if these pins are the ones associated with the corresponding CAN instance (FLEXCAN channel) or with the CAN transceiver.
For each CAN instance the following pins need to be configured:

Adrian_Gherca_0-1725361653644.png

Please note that each CAN instance uses its own transceiver which can differ from the ones used by the other instances and transceiver initialization may consist of setting the CAN_EN and CAN_STB pins to High state or more.

If you are using an NXP development board please mention it in a future reply for more details, if necessary.

0 件の賞賛
返信

635件の閲覧回数
Adrian_Gherca
NXP Employee
NXP Employee

Hello and thank you for using our product.

I had a look on the Simulink model you provided and I couldn't find any initialization for the CAN transceiver. Normally this is done in the "initialize" block and it usually implies setting a few DIO pins to certain values depending on the hardware connections on the electrical board. For reference, please check the FreeMASTER over CAN example in your toolbox:

Adrian_Gherca_1-1718365030161.png

It can be found at this location: "S32K3_Examples\fm\s32k3xx_fm_over_can_s32ct".

While at this path, right click on file "s32k3xx_fm_over_can_s32ct.pmpx" and then click on "Open Outside Matlab". This launches the FreeMASTER PC application with some settings already configured. Please make sure that both "Command Message ID" as well as "Response Message ID" are set to value 0x7aa and both have the "Extended ID" checkbox checked. You can get to this menu by navigating to "Project -> Options... -> Comm tab -> Configure... button":

Adrian_Gherca_0-1718364837544.png

タグ(3)
0 件の賞賛
返信

604件の閲覧回数
rishikesh_c
Contributor III

Hi Adrian!
I tried with the example as well just now, but it still doesn't connect. I am working with S32K344-Q257. I had a look on my board and I can see that my CAN Transceiver is the 1043, so I selected that option in the example model, built it and flashed it on the board. I also checked that the Command and Response Message ID are set to 0x7aa and the extended ID checkbox is ticked. 

What else could be causing this issue?

0 件の賞賛
返信

554件の閲覧回数
Adrian_Gherca
NXP Employee
NXP Employee

Is this the evaluation board you are using: S32K3x4-Q257 Full-Featured General Purpose Development Board ?

Activating the CAN transceiver is an operation that is hardware specific, that's why it is important to check these details:
1. What CAN instance is used by the FreeMASTER Config block? The example comes by default with FLEXCAN_0

Adrian_Gherca_0-1718487233070.png
2. Based on the schematic document of your board, what CAN transceiver is connected to that specific instance?
3. To which pins of the microcontroller are the transceiver's CANx_EN and CANx_STB (same x as for FLEXCAN_x) connected to?
4. Are these two pins of the microcontroller created and configured in the S32CT configuration and their state (High/Low) corresponds to transceivers requirements (EN requires High, STB requires also High to avoid standby)?

Adrian_Gherca_2-1718487921110.png

You can refer to this article for more details on how to configure the digital output pins for the CAN transceiver: Communicating over the CAN Bus (see chapter 2. CAN Configuration)

0 件の賞賛
返信