Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Accounting for Frame Overhead and Bit Stuffing in Eight-Byte Classical CAN Frames | Crystal & Oscillator Handbook

In a performance review of an industrial acquisition gateway, two archived Classical CAN frames carry eight data bytes at the same bit rate, yet the instrument measures different on-bus durations. Estimating maximum load from eight times eight bits at one bit time omits both protocol structure and content-dependent stuff bits. Different frame lengths also do not establish oscillator error. Check whether the instrument measured the entire frame or just the payload, and whether the bounds and actual bit rates match.

Use stored synthetic records and normal protocol analysis offline. Do not connect to production networks, vehicles, or machinery, transmit frames, or inject faults. The example is a budget illustration rather than a real-time control guarantee.

Equal payload sizes do not imply equal wire length

A Classical CAN frame contains identification, control, check, and ending fields as well as data. In the part subject to dynamic bit stuffing, the transmitter inserts a bit of opposite polarity after five identical consecutive bits. The receiver recognizes and removes those bits according to the protocol. Stuff bits occupy bit times but add no application bytes. An application log usually shows the decoded fields, so two eight-byte entries there can occupy different amounts of time on the bus.

Equal payload lengths can still have different runs of identical bits. The stuffing rule applies continuously across the applicable serialized fields and does not restart at each payload byte. Other fields in the affected region contribute too. Counting zero bytes cannot give the frame's actual stuff-bit count. Separate Classical CAN from other frame formats in mixed captures. This single-bit-rate calculation does not apply across a segment that changes rates.

ObservationWhat it can establishWhat remains separate
Both application records have eight bytesEqual payload lengthEqual wire length
Same actual bit periodComparable bit timing for those capturesEqual total duration
Offline records show different stuffingA specific length contributionFull-condition oscillator tolerance
Tool includes frame-after idleA different occupancy boundaryDirect comparison to frame-only reports

Use a fictional budget with the wire counts already summarized, without generating any byte sequence. Both selected intervals have 108 bits before stuffing. The first adds 2 bits and the second adds 8. At 500 kbit/s, each bit takes about 2 μs. The first interval has 110 bits and takes 220 μs, while the second has 116 bits and takes 232 μs, a difference of 12 μs. The 108 is an arithmetic assumption, not a fixed overhead for a particular frame. It excludes additional idle time or retries counted by individual tools. If another report includes the interval from one frame's end to the next frame's start, separate it before reconciling the measures.

Verify bit rate, frame duration, and workload independently

Confirm the bit rate and measurement definition in saved normal traces. A bit width can establish the local time scale, but a single edge may land at an unfavorable point in the instrument's sampling grid and cannot establish quartz accuracy across temperature. Verify the timer timebase, transmit and receive references, and normal frame states under approved conditions. Save the raw length of each frame before averaging across a longer sequence so valid content-dependent variation is not lost or later reported as timing jitter.

Label frame duration, interframe idle, and time spent waiting while an earlier task occupies the link separately. If the application confounds queue timing and on-wire duration, correctly explaining frame length still leaves queue delays unresolved. Separate retries from successful first transmissions. Use archived normal traces and synthetic timing intervals to verify the reporting tools without altering live workloads or deliberately producing faults. This can show why two systems assign different numbers to the same record.

Check whether the design budget records only an average. A group of frames with few stuffed bits does not guarantee that future frames will be that short. If industrial acquisition has a defined delivery deadline, retain an upper bound based on the approved frame type and operating conditions. List application wait, interframe space, and protocol-processing uncertainty separately. The synthetic 220 μs is not a project limit, and low average bus utilization does not show that every acquisition met its deadline.

Qualify clock timing and wire counts separately

SCTF's 2CV-series SX2M24.000E20F30THN from mainland China is a listed 24 MHz, 1.2 V, four-terminal surface-mount CMOS active oscillator. It is a possible reference, without identifying installed hardware or direct compatibility with every controller. Actual bit time depends on clock tree and timing settings. Verify supply, levels, temperature, load, and clock destination, and retain bench timing evidence separately.

For supplier handoff, retain both shorter and longer synthetic normal records at the same bit rate, with their boundaries, known stuffing, and expected bit counts. An eight-byte summary is insufficient. State whether the tool preserves or removes stuffed bits, and make both analysis tools inspect the same portion of the same record. Label each view as raw bus data or decoded fields. This can explain normal count differences without treating a reporting definition as an oscillator return.

Define the denominator for longer occupancy measurements. If the goal is to show how long a device occupied the link within a one-second window, include the valid time that actually overlaps that window under one consistent rule. The number of rows processed by the application is not that denominator. A frame crossing a window boundary can be counted by its overlap or assigned as a whole event, depending on the question. Keep those results separate and preserve interval start and end times so a future window change can be recalculated from the records.

Frequently asked questions

Do stuff bits change the application data? Normal reception removes them. Check the file definition before treating a reported wire bit as payload or editing the record.

Why can 500 kbit/s frames show different microsecond counts? Verify frame type, payload, stuffing, and boundaries. If those do not account for the difference, investigate the timebase and waveform independently.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.