AUTOSAR COM · Configuration help
Troubleshooting
Something does not behave as expected. Find what you see, then go through the checks from top to bottom. Each check names the setting to look at.
Before you start. Most surprises come from four things: the packet group is not started, a time was entered in milliseconds instead of seconds, the signal is pending where it should be triggered, or sender and receiver disagree on where the bits sit. Check these first.
The signal is written, but the packet never goes out
- Is the packet group started? After start-up every group is stopped. A write to a stopped packet is stored, the call answers "not available", and nothing is sent. Look at
ComIPduGroupRefof the packet and at who starts that group. - Is the signal pending in a packet without a timer?
ComTransferProperty=PENDINGwithComTxModeMode=DIRECTmeans nothing ever asks for a send. - Is the active send setting
NONE? Either it is set that way, or the packet is on its "false" setting andComTxModeFalsesaysNONE. - Is the signal "on change" and the value did not change? COM compares with the value sent last, or with the start value if nothing was sent yet.
- Is the signal a member of a signal group? Writing a member only fills the staging area. The application must hand over the whole group.
- Does the send heartbeat run? Sends happen in
Com_MainFunctionTx. With several heartbeats,ComIPduMainFunctionRefsays which one serves the packet. - Does COM hand the packet down, but the bus stays silent? Then the problem is below COM, in the route of the packet. See lesson 14.
The packet goes out later than expected
- The heartbeat. A triggered send happens at the next send heartbeat at the latest, not inside the write. Look at
ComMainTxTimeBase. - The minimum gap. A send asked for during the gap waits until it is over. Look at
ComMinimumDelayTime. - The start delay. The first timer send after the packet was started waits for
ComTxModeTimeOffset. - Is only the "sent" message late? With
ComIPduSignalProcessing=DEFERREDthe message comes at the next heartbeat. The packet itself was on time.
The packet goes out too often
- Triggered on every write.
TRIGGEREDsends even when the same value is written again.TRIGGERED_ON_CHANGEdoes not. - Repeats.
ComTxModeNumberOfRepetitionsis the number of extra sends. 2 means three packets per write. - Timer and trigger together.
MIXEDsends on the timer and on every triggered write. - Switching the send setting. A switch to the other setting sends the packet at once, unless that setting is
NONE. - No minimum gap.
ComMinimumDelayTimeleft out or 0 means no limit on how close two sends can be.
Fewer repeats on the bus than configured
- A new write came in between. It cancels the repeats that are still open and starts the count again.
- The signal is "without repetition".
TRIGGERED_WITHOUT_REPETITIONandTRIGGERED_ON_CHANGE_WITHOUT_REPETITIONsend once, whatever the packet says. - A timer send was counted. In
MIXED, a timer send that falls into the repeats counts as one of them. - The send timeout struck. When
ComTimeoutruns out before all repeats are done, the rest is dropped. - The other send setting is active. The "true" and the "false" setting each have their own number of repeats.
The timer period on the bus is wrong
- Seconds, not milliseconds.
ComTxModeTimePeriod= 0.1 is 100 ms. A value of 100 is 100 seconds. - Which send setting is active? The "true" and the "false" setting can have different periods.
- Does the heartbeat really run as configured? COM counts time in heartbeats. If
ComMainTxTimeBasesays 10 ms but the function is called every 20 ms, every period doubles. - Is the period a multiple of the heartbeat? If not, it gets rounded.
- Is the minimum gap longer than the period? Then the gap decides, unless
ComEnableMDTForCyclicTransmissionis false.
The packet uses the wrong one of its two send settings
- Which signals have a condition? Every signal of the packet with a
ComFilterbox takes part. All others do not. - One true is enough. The "true" setting is used as soon as one condition is true. "False" needs all of them false.
- A condition
ALWAYS. It is always true, so the packet never leaves the "true" setting. - No condition at all. Then the result is always "true" and
ComTxModeFalseis never used. - Right after the start. Until the application writes, the conditions are checked with the start values.
"Not sent in time" is reported although the bus looks fine
- Does the bus confirm sends? Without confirmations from below the send timeout always strikes.
- Is the limit shorter than the repeats take? With repeats, the send only counts as done after all of them were confirmed.
- Another signal's limit. If signals of one packet have different
ComTimeoutvalues, the shortest one is used for the packet. - Expecting it more than once? The message is given once per failed send and not repeated.
- Was the packet stopped? Then the open send is reported as "could not be sent" instead.
The packet arrives, but the application is never told
- Is the packet group started? A stopped packet is ignored when it arrives.
- Is a "new value" message set? It lives in the set-up of COM's user, as a
ComUserCallbackof typeCOM_RX_ACK, and the signal must be linked to it. In older projects:ComNotificationon the signal. - Deferred, and the receive heartbeat does not run? With
ComIPduSignalProcessing=DEFERREDthe message is given inCom_MainFunctionRx. - An update-bit that is never set. If
ComUpdateBitPositionis configured here but the sender does not set that bit, or uses another position, the signal is ignored. - A filter that blocks. A blocked value is thrown away without a message. Look at
ComFilterof the signal. - The invalid value. With
ComDataInvalidAction=NOTIFY, the reserved value gives only the "invalid" message. - The packet is shorter than expected. Only signals that are completely inside the received bytes are unpacked.
- The signal is a member of a signal group. Messages exist for the group only.
The application always reads the start value
- Go through "the application is never told" above. A stopped packet, an unset update-bit or a blocking filter all leave the start value in place.
- A member of a signal group. The application must first fetch the whole group. Only then do the members hold new values.
- Read too early. With
DEFERRED, a read between arrival and the next heartbeat still gives the old value. - A timeout puts it back.
ComRxDataTimeoutAction=REPLACEreturns to the start value each time the limit runs out.
Nothing arrives, but no timeout is reported
- Is there a time limit?
ComTimeoutleft out or 0 means the signal is not watched. - Did anything ever arrive? Without
ComFirstTimeout, watching only begins after the first arrival. - Is an "overdue" message set? A
ComUserCallbackof typeCOM_RX_TOUT, linked to the signal. Without it, only the value may change. - Is the packet group started? A stopped packet is not watched.
- Was watching switched off? It can be switched off and on per packet group while running, with
Com_DisableReceptionDMandCom_EnableReceptionDM.
A timeout is reported right after the start
- The first limit is too short.
ComFirstTimeoutmust cover the time the sender needs to start, plus its start delay and one period. - The group is started too early. The stopwatch starts when the packet group is started. If that happens before the bus is up, time is lost.
The timeout is reported again and again
- This is how it works. On the receiving side the stopwatch restarts when it runs out. The message comes after every further
ComTimeoutas long as nothing arrives. Only the send timeout is reported once.
A timeout is reported although the packet arrives
- The signal has an update-bit. Then it has its own stopwatch, and only packets with the bit set count. A sender that sends the packet but does not write the signal causes a timeout.
- Another signal's limit. Signals without update-bit share one stopwatch per packet. It uses the shortest limit of all of them, including
ComFirstTimeoutvalues. - The limit is too close to the sender's period. One late frame is then enough. Seconds, not milliseconds: 0.3 is 300 ms.
- The heartbeat. COM counts time in heartbeats. A limit that is not a multiple gets rounded.
The value jumps back to the start value
- Timeout with replace.
ComRxDataTimeoutAction=REPLACE. - Invalid value with replace.
ComDataInvalidAction=REPLACEhands out the start value whenever the reserved value arrives. - The packet group was started again. Starting a group with "initialize" puts all its signals back to their start values.
The "changed" filter lets an unchanged value through
- After a timeout. The first value after a timeout always passes
MASKED_NEW_DIFFERS_MASKED_OLD. - The mask. Only the bits set in
ComFilterMaskare compared. A change in other bits is not seen, and the other way round. - Compared with what? With the last value that passed, not with the last value that arrived.
The receiver sees a wrong value
- Byte order.
ComSignalEndiannessmust be the same on both sides. Swapped bytes are the typical sign: 0x1234 arrives as 0x3412. - Start bit.
ComBitPositionis the lowest bit of the signal forLITTLE_ENDIANand the highest forBIG_ENDIAN. Other tools and file formats count differently. - Size.
ComBitSizemust match on both sides. - Overlap. Two signals, or a signal and an update-bit, on the same bits.
- Both sides wrong in the same way? Compare each side with the network description, not with each other.
A negative value arrives as a large positive one
- The type.
ComSignalTypemust be a signed type (SINT8toSINT64) on the receiving side. Only then does COM fill up the upper bits correctly. - The size. With a wrong
ComBitSizethe sign bit is taken from the wrong place.
Only some of the sent values reach the application
- A filter.
ONE_EVERY_Npasses one value in N. A range or mask filter passes only matching values. - An update-bit. Packets in which the sender did not write the signal are ignored for this signal.
- Several arrivals per heartbeat. With
DEFERRED, values that arrive faster than the receive heartbeat can be overwritten before the application is told.
A forwarded signal does not appear on the other bus
- Does the gateway heartbeat run? Copies are made in
Com_MainFunctionRouteSignals. The packets involved point to it withComMainFunctionRouteSignalsRef. - The source has an update-bit that is not set. Then nothing is forwarded.
- The outgoing packet is stopped. Its packet group must be started too.
- The destination signal is pending and its packet has no timer. The value is copied but nothing sends it.
- A packet that is sent in pieces. Signals of packets with
ComIPduType=TPcannot be forwarded.
A forwarded signal is late
- Three waits add up. The gateway heartbeat (
ComMainRouteSignalsTimeBase), then the send heartbeat, then a minimum gap of the outgoing packet if one is running. - The destination is pending. Then the value waits for the next timer send of its packet.
The configuration tool rejects the settings
These are the rules of the specification that are broken most easily.
- Update-bit together with repeats. Not allowed in one packet.
- A sending packet without
ComTxIPdu, or with neitherComTxModeTruenorComTxModeFalsein it. - Overlapping signals in one packet.
ComBitSizelarger than the type, for example 12 bits in aUINT8.- A row of bytes that does not start on a byte border, or whose byte order is not
OPAQUE. - A filter the type does not support. Decimal numbers and rows of bytes: only
ALWAYS,NEVER,ONE_EVERY_N. On/off values: no range filters. ONE_EVERY_NwithComFilterOffsetnot smaller thanComFilterPeriod.- An invalid value without an action on a received signal.
- A packet group with both directions. All packets of one group must be sending, or all receiving.
- Names. Two of the names of signals, groups, members, packets and packet groups are the same, or one is not a valid C name.
- A signal of changing length that is not the last one in its packet, or a second one in the same packet.
- Forwarding between signals of different bit size.
The configurator checks most of these for a single signal.
Reading a configuration you did not write
A configuration made by a tool from the network description can be read in a fixed order. Go packet by packet.
- The packet.
ComIPduDirection: sent or received?ComIPduGroupRef: which groups switch it on? - If sent: its send setting.
ComTxModeModeinComTxModeTrue, and inComTxModeFalseif there is one. Then the period, the repeats andComMinimumDelayTime. All times are in seconds. - Its signals: triggered or pending. Does
ComTransferPropertyfit the send setting? Triggered has no effect in a packet that isPERIODIC. Pending in a packet that isDIRECTnever sends by itself. - Conditions. Which signals of a sending packet have a
ComFilter? Those decide between the two send settings. - Where the bits sit.
ComBitPosition,ComBitSize,ComSignalEndianness,ComSignalType, andComUpdateBitPositionif used. Compare with the network description. - Start values.
ComSignalInitValueis what a receiver reads before the first packet, and what a sender puts on the bus before the first write. Is it a safe value? - If received: immediate or deferred.
ComIPduSignalProcessing, per packet. - Timeouts.
ComTimeout,ComFirstTimeout,ComRxDataTimeoutAction. Remember that signals without update-bit share the shortest limit in the packet. - Invalid values and filters.
ComSignalDataInvalidValuewithComDataInvalidAction, andComFilteron received signals. - Messages. Look in the set-up of COM's user for the
ComUserCallbackentries linked to the signal. - Heartbeats.
ComMainRxTimeBaseandComMainTxTimeBase. Do all times above fit them, and are the functions really called that often?
To see what a set of values does, enter them in the configurator and read "What COM will do".
Behaviour and rules: AUTOSAR COM specification, R25-11, chapters 7 and 10. Only causes inside COM's own configuration are listed. A packet that COM hands down correctly can still get lost in the layers below.