S32k344 - CAN in polling mode with TX and RX duplicated

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

S32k344 - CAN in polling mode with TX and RX duplicated

跳至解决方案
2,292 次查看
MVR
Contributor III

Hello everyone,

I'm using S32K3x4-Q172 and trying to communicate with this transceiver:

MVR_3-1661551030267.png

 

and S32K3 RTD AUTOSAR 4.4 2.0.1 D2207.

I'm trying to use the CAN as polling mode, follow my code:

MVR_2-1661550793102.png

MVR_4-1661551098421.png

The result is TX and RX duplicated:

MVR_1-1661550491704.png

And the status return of "FlexCAN_Ip_SendBlocking" function is "FLEXAN_STATUS_TIMEOUT":

MVR_0-1661550481761.png

Can anyone help me with this problem?

Thanks,

MVR

标签 (1)
0 项奖励
回复
1 解答
2,226 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

from a description it could be that a transceiver is TJA1153, which needs a config first. But Q172 in last revision is populated with normal TJA1043. Maybe some earlier board version have that secure CAN transceiver. So first check a board version and also read transceiver's top marking.

BR, Petr 

在原帖中查看解决方案

0 项奖励
回复
8 回复数
2,264 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems FlexCAN is repeating a message due to missing ACK from other node.
Do you have other node connected configured for a same CAN bitrate and sample time?

BR, Petr

0 项奖励
回复
2,255 次查看
MVR
Contributor III

Hello Petr,

Not, I don't have. I will put another device for receive this data and send ACK, let's see if this signal exist in RX because is duplicated or because don't have another device connected.

So, this "TIMEOUT" status must be about the lack of ACK as well, right?

Thanks,

MVR

0 项奖励
回复
2,248 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, it is due to that fact. Message is not successfully transmitted without error detected (missing ACK), so it is repeating automatically, and using blocking function you got timeout status.

BR, Petr

0 项奖励
回复
2,240 次查看
MVR
Contributor III

@PetrS ,

I put the another device on the other side of the transceiver but I still have the same problem... I also measured the CAN_H and CAN_L signals but there are no signals... 

 

image-2022-08-31-14-28-32-652.png

0 项奖励
回复
2,234 次查看
MVR
Contributor III

@PetrS ,

Today I tested more things. I think that the problem is with transceiver, what do you think?

I have tried to set the EN and STDB_N as HIGH, following the datasheet, but I always see the ERR_PIN with LOW level. I have tried to test with examples available on NXP community and in the IDE but doesn't work. Follow one print about the configuration (The ERR_PIN doesn't change the level):

MVR_0-1661978000050.jpeg

I have tried to set as much as NORMAL MODE as COLD START, but without success. I tried put another device sending message in CAN_H / CAN_L  but I can't see signal in CAN_RX. 

It occur the same when I send message via NXP microcontroller using the line CAN_TX, the signal is duplicated like shown earlier. And the ERR_PIN always is LOW.

Do you have some example that works with this board? I already tested this examples but without success:

https://community.nxp.com/t5/S32K/S32K3x4-Q172-CAN-bus-example/m-p/1502554#M16950

MVR_1-1661978777318.png

Thanks.

0 项奖励
回复
2,227 次查看
PetrS
NXP TechSupport
NXP TechSupport

Hi,

from a description it could be that a transceiver is TJA1153, which needs a config first. But Q172 in last revision is populated with normal TJA1043. Maybe some earlier board version have that secure CAN transceiver. So first check a board version and also read transceiver's top marking.

BR, Petr 

0 项奖励
回复
2,232 次查看
wuxianlong
Contributor III

Hi,

The transceiver is TJA1153 and needs to be configured.

2,212 次查看
MVR
Contributor III

@wuxianlong @PetrS Nice, thanks for help!

I was able to do it works. I followed this forum:

https://community.nxp.com/t5/S32K/S32K344-EVB-With-EB-AUTOSAR/m-p/1351864#M12367

And the board is using the TJA1153. So summarizing, I changed the clock and send some data over CAN to initialization, besides setup EN and NSTB as well.

Thanks!

0 项奖励
回复