Home Learning Paths ECU Lab Assessments Interview Preparation Arena Pricing Log In Sign Up

Signal Byte-Order & Encoding

EndiannessDescriptionCommon Use
BIG_ENDIAN (Motorola)MSB at lowest byte address; ComBitPosition = MSBMost CAN automotive signals
LITTLE_ENDIAN (Intel)LSB at lowest byte address; ComBitPosition = LSBBody electronics
OPAQUEByte array; no bit manipulationRaw byte strings, UDS payloads
Big-Endian 16-bit Signal (ComBitPosition=7)
  PDU Byte:  Byte0    Byte1
             ┌───────┬───────┐
  Bits:      7......0 15.....8
             └──┬────┴───┬───┘
                │ 16-bit BIG_ENDIAN signal
                │ MSB=bit7(Byte0)  LSB=bit8(Byte1)

I-PDU Composition

XMLCom_Cfg.arxml
<ISIGNAL-TO-I-PDU-MAPPING>
  <SHORT-NAME>VehicleSpeed_Mapping</SHORT-NAME>
  <PACKING-BYTE-ORDER>MOST-SIGNIFICANT-BYTE-FIRST</PACKING-BYTE-ORDER>
  <START-POSITION>0</START-POSITION>
  <IREF><I-SIGNAL-REF>/Signals/VehicleSpeed_ISignal</I-SIGNAL-REF></IREF>
</ISIGNAL-TO-I-PDU-MAPPING>

Transmission Modes

ModeComTxModeBehaviourUse Case
DIRECTDIRECTSend immediately on Com_SendSignal()Events: fault flags, gear change
PERIODICPERIODICSend every ComTxModeTimePeriodStatus: speed, RPM
MIXEDMIXEDPeriodic baseline + direct on value changeCritical + status combined

💡 MinimumDelayTime

ComMinimumDelayTime prevents burst transmission when a signal changes rapidly in DIRECT or MIXED mode. Set to at least the CAN bit-stuffing transmission time for the PDU (typically 0.1–1 ms at 500 kbps).

Rx Deadline Monitoring

XMLCom_RxDeadline.arxml
<TIMEOUT-PERIOD>150</TIMEOUT-PERIOD>  <!-- 150 ms for 100ms sender -->
<FIRST-TIMEOUT-PERIOD>200</FIRST-TIMEOUT-PERIOD>
<NOTIFIER-REF>/DemEvents/Com_E_TimeoutRx</NOTIFIER-REF>

⚠️ Timeout Calibration

Set ComRxTimeout to at least 150% of the sender's expected cycle time. A 100 ms sender with 100 ms timeout causes false timeout events from legitimate transmission jitter (±10%).

Summary

COM signal configuration requires exact bit-position arithmetic — a single-bit error in ComBitPosition is impossible to detect from the software layer and causes silent data corruption. Always validate with a bit-level signal trace in CANoe comparing the COM config against the live bus frame.

🔬 Signal Bit-Packing Arithmetic — Getting It Right

The COM module packs signals into PDU byte arrays using three ARXML parameters: ComBitPosition, ComBitSize, and ComSignalEndianness. Understanding the exact bit-addressing convention is critical for CAN network interoperability:

  • Motorola (Big Endian) bit addressing: ComBitPosition refers to the MSB of the signal. Bits are numbered within each byte from MSB=7 to LSB=0, but the overall addressing goes from byte 0 (MSB byte at top) downward. A 16-bit Motorola signal with ComBitPosition=15 starts at byte 1, bit 7 (the MSB).
  • Intel (Little Endian) bit addressing: ComBitPosition refers to the LSB of the signal. Bits are numbered left-to-right within the PDU, byte 0 first. A 16-bit Intel signal at ComBitPosition=8 starts at byte 1, bit 0 (LSB), and extends to byte 2, bit 7 (MSB).
  • Mixed PDUs: A PDU can contain both Motorola and Intel signals. Each signal's endianness is independent. This is common in legacy CAN databases (DBC files) migrated from older ECU generations.
  • Scaling for floating-point signals: COM signals are always integer type. Float values (e.g., engine temperature in 0.1°C steps) use a ComSignalInitValue and require application-layer scaling. The scaling factor must match the DBC definition exactly — a 0.1 vs 0.01 mismatch is a very common integration defect.

🏭 Real-World Signal Packing Issues

  • DBC to ARXML migration: Vector CANdb++ DBC files define signal bit positions using the same Intel/Motorola convention, but some OEM DBC exporters use a non-standard 'bit counting from MSB' variant. Always verify with a known-good CANoe trace before starting BSW configuration.
  • Gateway latency: In a CAN-to-CAN gateway using PduR raw forwarding, PDUs are forwarded without signal extraction. This has near-zero latency. If COM signal processing is used instead (extract + repack), a minimum 1× PDU period latency is introduced. For safety-critical signals, this latency must be documented in the FMEA.
  • RxTimeout tuning: COM RxDeadlineMonitoringPeriod must be set to ≥ 1.5× the sender's PERIODIC transmission period to avoid false timeout events. A setting of exactly 1× causes missed-cycle false alarms under bus load.

⚠️ COM Configuration Pitfalls

  1. ComBitPosition off by one: The most common signal mapping error. Always verify with a CANoe/CANalyzer trace by sending a known test value (e.g., 0x0100) and checking the raw bytes on the bus.
  2. DIRECT transmission mode with MinimumDelayTime = 0: A SWC calling Com_SendSignal every 1 ms on a DIRECT signal without a MinimumDelayTime will flood the CAN bus. Always set MinDelayTime ≥ minimum network inter-frame spacing.
  3. Missing ComCallout for CRC signals: PDUs with E2E CRC protection require a TxCallout to calculate the CRC before transmission. Without it, CRC bytes stay at their InitValue — receivers will reject every frame.
  4. Signal group vs individual signals: COM signal groups guarantee atomic read/write of multiple signals packed in the same PDU byte. Forgetting to use a signal group for tightly-coupled signals (e.g., position + speed + status in one PDU) risks reading inconsistent values across preemptions.

📊 Industry Note

In automotive projects with 500+ CAN signals, the COM module ARXML is generated from the DBC/FIBEX/ARXML network database — not hand-configured. Vector DaVinci Network Designer or SystemDesk System Configurator handles the translation. Always regenerate from source — do not manually edit generated COM ARXML.

🧠 Knowledge Check — Click each question to reveal the answer

❓ A Motorola signal has ComBitPosition=23 and ComBitSize=8. Which byte in the CAN frame does the MSB occupy?

✅ ComBitPosition=23 in Motorola convention means the MSB is at bit 23. With bytes numbered byte 0 (bits 7–0), byte 1 (bits 15–8), byte 2 (bits 23–16): bit 23 is bit 7 of byte 2. The MSB occupies byte 2. An 8-bit signal starting there runs from byte 2, bit 7 (MSB) down to byte 2, bit 0 (LSB) — entirely within byte 2.

❓ What is the purpose of COM transmission mode MIXED, and when is it used in practice?

✅ MIXED mode combines PERIODIC (time-triggered) and DIRECT (event-triggered) transmission. The signal is sent on value change (DIRECT) but also guaranteed at a minimum periodic rate. Used for safety-critical signals that must be refreshed even without value changes — e.g., active steering torque request where a missed cycle is dangerous. The MinimumDelayTime parameter prevents duplicate sends within one period.

❓ A developer reports that the COM RxTimeout DEM event fires intermittently under high bus load. What is the likely cause and fix?

✅ High bus load increases message latency on lower-priority CAN IDs. If the COM RxDeadlineMonitoringPeriod is set to exactly 1× the nominal Tx period, even one delayed frame triggers a timeout event. Fix: set RxDeadlineMonitoringPeriod to ≥ 1.5× the sender period, or 2× for safety margin. Also review bus utilisation — sustained >80% bus load requires architecture-level load balancing.
← PreviousHands-On: First SWC ConfigurationNext →PDU Router - Routing Tables & Gateways