S32k344 - CAN in polling mode with TX and RX duplicated

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

S32k344 - CAN in polling mode with TX and RX duplicated

Jump to solution
2,244 Views
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

Labels (1)
0 Kudos
1 Solution
2,178 Views
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 

View solution in original post

0 Kudos
8 Replies
2,216 Views
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 Kudos
2,207 Views
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 Kudos
2,200 Views
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 Kudos
2,192 Views
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 Kudos
2,186 Views
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 Kudos
2,179 Views
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 Kudos
2,184 Views
wuxianlong
Contributor III

Hi,

The transceiver is TJA1153 and needs to be configured.

2,164 Views
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 Kudos