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,
Asked
Active
Viewed 58 times
1 Answers
0
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.

Lundin
- 195,001
- 40
- 254
- 396
-
ok, if i use the pcan usb pro can i modify the crc – jiji May 31 '23 at 10:29
-
@jiji Is it a microcontroller on a custom PCB? If not, then no. – Lundin May 31 '23 at 11:06