CAN TxInterrupt enable on a FRDM-KE06

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

CAN TxInterrupt enable on a FRDM-KE06

跳至解决方案
819 次查看
brunotremblay
Contributor III

Hi,

I'm back on project to use CAN communication to exchange data between three FRDM-KE06 boards. I tried to use the typical usage code "sending data frame with interrupt service" found in the CAN_LDD component help.

pastedImage_1.png

pastedImage_2.png

The program enter in the while loop but the DataFrameTxFlg never goes true and tha CAN frame is repeatedly sent on the CAN bus.

With Freemaster I checked the CAN registers but I don't see anything wrong. Can someone have a clue on what's going on with this example?

pastedImage_3.png

 

Best regards,

Bruno Tremblay

标记 (3)
0 项奖励
1 解答
640 次查看
brunotremblay
Contributor III

Hi Earl,

Thanks for your inputs. As I suspected, the answer was simple the scope that I use can decode CAN frame but don't generate an acknowledge. I have setup a little receiver and now I get the result I want.

 

Thanks again.

 

Bruno

在原帖中查看解决方案

0 项奖励
3 回复数
641 次查看
brunotremblay
Contributor III

Hi Earl,

Thanks for your inputs. As I suspected, the answer was simple the scope that I use can decode CAN frame but don't generate an acknowledge. I have setup a little receiver and now I get the result I want.

 

Thanks again.

 

Bruno

0 项奖励
640 次查看
egoodii
Senior Contributor III

So item #4 on my little checklist!  Glad to hear of your success!

---ERGII

0 项奖励
640 次查看
egoodii
Senior Contributor III

CAN is 'guaranteed delivery' at a low-layer.  If the TX message is not ACKed by 'somebody' (or is NAKed by anybody) the transmitter will automatically resend, and NOT declare the message 'sent'.

See that you have proper CAN transceivers at all nodes.

See that you have a net 60ohms across the wire pair among them (usually 120ohms at each end) -- CAN is 'open collector'.

See that you have a 'similar ground reference' among all nodes.  CAN transceivers tolerate 'some' ground shift.

See that at least one receiver-node is active and 'able' to ACKnowledge a full reception.

See that you have a proper set of bit-timing parameters to allow proper CAN communication, starting with ACCURATE bit rates, and all the other bit-timing parameters for 'sample point'.

You might start at a 'very low' bit rate (like 10K baud!) to ease concerns about timing.

0 项奖励