Can Rx issue

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

Can Rx issue

10,972 Views
Ashish4525
Contributor II

Dear all

I am trying run CAN on S32k118evb2Q048,I can able to transmitt using Can_Write. but when I am unable to receive via CAN analyzer .it shows erros which I have shared with you in attachment.

Also I have added canISR in startup code ,still it is not hittng.

All errors like CRC,ACK,stuff error only in receving time.

Both RX and TX are configured in interrupt.

Also Canif_RxIndication is not hitting too.

I have configured Rxfifo too in tresos with identfier 942 and mask is 2047.

 

 

 

0 Kudos
Reply
8 Replies

10,943 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

simply message is not properly sent without error detected.
Generally, be sure CAN transceiver is active and properly terminated. Check if CAN bit rate is properly set and it is same for all nodes connected. Use SOSC clk for PE clock.
You can try to measure TX/RX and CAN bus signal to be sure it is expected one.

BR, Petr 

0 Kudos
Reply

10,939 Views
Ashish4525
Contributor II

Dear Petr

SOSC I am using for CAN and bit rate is also set with 20TQ and 500 kbps baud rate with 40MHZ clock and 4 prescaller.

B.R

Ashish

 

0 Kudos
Reply

10,926 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

yes, this option is possible, but errors are detected, so check real signals, sample point used and bus terminations.

BR, Petr

0 Kudos
Reply

10,903 Views
Ashish4525
Contributor II

Dear Peter

When I am trying to send data in 20TQ it is not going but at 23Tq and 24Tq it is going .

baud rate 500Kpbs and 40MHZ clock with 4 prescale , So time quanta will come 20 but no frame is being transmitting.

B.R

Ashish

0 Kudos
Reply

10,899 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

seems your PE clock is running from FIRC (system clock) and not from crystal. Check CTRL1[SRCCLK] setting and config bit timing accordingly.

BR, Petr

0 Kudos
Reply

10,895 Views
Ashish4525
Contributor II

HI

Please See PFA I am using SOSC with 40mhz

B.R

Ashish

0 Kudos
Reply

10,889 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi, 

clock1.png shows CTRL1[CLKSRC] checked, so if this is really set, then PE clock is derived from SYSCLK. Is then SYSCLK running from SOSC or FIRC?

BR, Petr

 

Tags (1)
0 Kudos
Reply

10,885 Views
Ashish4525
Contributor II

Hi

It is running from SOSC

B.R

Ashish

0 Kudos
Reply