Can Rx issue

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

Can Rx issue

11,003 次查看
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 项奖励
回复
8 回复数

10,974 次查看
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 项奖励
回复

10,970 次查看
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 项奖励
回复

10,957 次查看
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 项奖励
回复

10,934 次查看
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 项奖励
回复

10,930 次查看
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 项奖励
回复

10,926 次查看
Ashish4525
Contributor II

HI

Please See PFA I am using SOSC with 40mhz

B.R

Ashish

0 项奖励
回复

10,920 次查看
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

 

标记 (1)
0 项奖励
回复

10,916 次查看
Ashish4525
Contributor II

Hi

It is running from SOSC

B.R

Ashish

0 项奖励
回复