Kinetis Can frame retransmission

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

Kinetis Can frame retransmission

跳至解决方案
1,267 次查看
bataliero
Contributor III

Hi , I am trying to use FlexCan on K60 with PLL 96MHz ( cristal 8MHz). When I set up bitrate from Processor Expert to 20kbps and standard parameters (Propagation segment:0, seg1 : 7, seg 2: 3, RSJ: 1, One Sample) everything is ok. After changing value of bit rate to 250kbps or 500kbps Can frame is retransmitted 3 and 5 times ( I dont change anything in code just parameters in Processor Expert ) to external device .

0 项奖励
回复
1 解答
1,020 次查看
Petr_H
NXP Employee
NXP Employee

Hello,

There might be a problem with CAN settings - please see check properties Segment, segment1,2. These settings are sensitive especially for high CAN bitrates. These settings should be set according to capacitance of the CAN bus. The repeated transmissions may occur because MK60 doesn't get acknowledge from the counterpart device, so the FlexCAN repeats sending frame while invoking the OnError event. Please try to enable OnError event and put there an error handling code. You can use there the GetError() method that returns a type of the error (e.g. ACK error).

best regards

Petr Hradsky

Processor Expert Support Team

在原帖中查看解决方案

0 项奖励
回复
1 回复
1,021 次查看
Petr_H
NXP Employee
NXP Employee

Hello,

There might be a problem with CAN settings - please see check properties Segment, segment1,2. These settings are sensitive especially for high CAN bitrates. These settings should be set according to capacitance of the CAN bus. The repeated transmissions may occur because MK60 doesn't get acknowledge from the counterpart device, so the FlexCAN repeats sending frame while invoking the OnError event. Please try to enable OnError event and put there an error handling code. You can use there the GetError() method that returns a type of the error (e.g. ACK error).

best regards

Petr Hradsky

Processor Expert Support Team

0 项奖励
回复