can bus - How i can calculate stuffbits in standard CAN 2.0A data frame -
i have 1 can standard 2.0a frame contain 8 bytes of data. e.g can frame data "00 ca 22 ff 55 66 aa df" (8 bytes) want check how many stuff bits add in can frame(bit stuffing). standers formula calculate worst case bit stuffing scenario following: 64+47+[(34+64-1)/4] ->64 :: data bits , 47 :: overhead bits 2.0a
how calculate real stuffed bits in sample can message ?? comment, suggestion warmly welcome.
there no way mathematically "calculate" stuffed bits. need construct frame (on bit level), traverse bits, , count.
read more bit stuffin @ link below.
https://en.wikipedia.org/wiki/can_bus#bit_stuffing
basic principle:
1. contruct can frame on bit level
2. start @ frame start bit. when 5 consecutive bits of same polarity found insert bit of opposite polarity.
3. continue crc delimeter (crc delimeter excluded)
Comments
Post a Comment