修改CAN帧中的CRC字段。

huangapple go评论72阅读模式
英文:

modify CRC field in CAN frame

问题

To generate error on CAN, I've done change data field. But It seems just change numerical things. I want to know how to modify CRC field to inject error. Can I change that field with software?.
我已经更改了CAN数据字段以生成错误,但似乎只改变了数字部分。我想知道如何修改CRC字段以注入错误。我能否使用软件更改该字段?。
I want to add some anomalies to corrupt the CRC field of the CAN message.
我想添加一些异常来损坏CAN消息的CRC字段。
I used the python can library,
我使用了Python的CAN库。

英文:

To generate error on CAN, I've done change data field. But It seems just change numerical things. I want to know how to modify CRC field to inject error. Can I change that field with software?.
I want to add some anomalies to corrupt the CRC field of the CAN message.
I used the python can library,

答案1

得分: 0

CRC由CAN控制器硬件生成,因此无法通过软件更改。

为了在CAN帧中注入错误,您将需要一个连接到CANH/CANL的TX线的微控制器,并在它们应该是隐性模式时将位拉到显性模式。

英文:

The CRC is generated by the CAN controller hardware, so you cannot change it from software.

In order to inject errors in CAN frames, you will need a microcontroller which is connected to either the TX line of CANH/CANL and pulls bits to dominant mode when they should be recessive.

huangapple
  • 本文由 发表于 2023年5月29日 22:58:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/76358376.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定