How can I verify the configured CAN bitrate, using an oscilloscope?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How can I verify the configured CAN bitrate, using an oscilloscope?

5,666 Views
lpcware
NXP Employee
NXP Employee

CAN frames do not guarantee an edge appears for every bit. There can be sequence of up to five consecutive bits of the same logic level with no edges appearing in the waveform.
If the bus is operating normally and frames are being transferred without error then towards the end of the frame the acknowledge slot will be dominant (CAN_H is high and CAN_L is low). The bit immediately preceding (CRC delimiter) and following (acknowledge delimiter) will be recessive (CAN_H and CAN_L are almost the same voltage). Therefore it is always possible to measure the width of the acknowledge slot and determine the bit rate.

"FAQ contribution from Embedded Systems Academy, experts in CAN bus. For more information visit www.esacademy.com"

Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

39 Views
pomet30955
Contributor I

Your observation is spot on. While CAN's bit-stuffing mechanism guarantees an edge at least every 6 bit times, relying on arbitrary data bits for auto-baud or bit-rate measurement can be tricky due to varying payloads and stuffing intervals.

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-591051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EHow%20can%20I%20verify%20the%20configured%20CAN%20bitrate%2C%20using%20an%20oscilloscope%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-591051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3ECAN%20frames%20do%20not%20guarantee%20an%20edge%20appears%20for%20every%20bit.%20There%20can%20be%20sequence%20of%20up%20to%20five%20consecutive%20bits%20of%20the%20same%20logic%20level%20with%20no%20edges%20appearing%20in%20the%20waveform.%3CBR%20%2F%3EIf%20the%20bus%20is%20operating%20normally%20and%20frames%20are%20being%20transferred%20without%20error%20then%20towards%20the%20end%20of%20the%20frame%20the%20acknowledge%20slot%20will%20be%20dominant%20(CAN_H%20is%20high%20and%20CAN_L%20is%20low).%20The%20bit%20immediately%20preceding%20(CRC%20delimiter)%20and%20following%20(acknowledge%20delimiter)%20will%20be%20recessive%20(CAN_H%20and%20CAN_L%20are%20almost%20the%20same%20voltage).%20Therefore%20it%20is%20always%20possible%20to%20measure%20the%20width%20of%20the%20acknowledge%20slot%20and%20determine%20the%20bit%20rate.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%3CSPAN%20style%3D%22font-size%3A%2011.0pt%3B%22%3E%22FAQ%20contribution%20from%20Embedded%20Systems%20Academy%2C%20experts%20in%20CAN%20bus.%20For%20more%20information%20visit%20%3CA%20href%3D%22http%3A%2F%2Fwww.esacademy.com%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%20target%3D%22_blank%22%3Ewww.esacademy.com%3C%2FA%3E%22%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-591051%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ECAN%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2410966%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20How%20can%20I%20verify%20the%20configured%20CAN%20bitrate%2C%20using%20an%20oscilloscope%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2410966%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EYour%20observation%20is%20spot%20on.%20While%20CAN's%20bit-stuffing%20mechanism%20guarantees%20an%20edge%20at%20least%20every%206%20bit%20times%2C%20relying%20on%20arbitrary%20data%20bits%20for%20auto-baud%20or%20bit-rate%20measurement%20can%20be%20tricky%20due%20to%20varying%20payloads%20and%20stuffing%20intervals.%3C%2FP%3E%3C%2FLINGO-BODY%3E