AUTOSAR COM

Timeouts

Silence can be dangerous. If the brake control unit stops talking, others must find out. COM watches the clock for you.

Waiting for a packet

For a signal that should arrive regularly, you give COM a time limit. COM starts a stopwatch. Every arrival resets it. If the stopwatch reaches the limit, that is a timeout, and COM does two things:

1. Decide what value to hand out

Keep the last value, go back to the start value, or use a special substitute value. You choose one per signal.

2. Raise an alarm

COM tells the application "this signal is overdue", so it can react, for example by showing a warning.

Then the stopwatch starts again. As long as nothing arrives, the alarm repeats each time the limit passes.

Try it

The limit is 3 seconds. Let packets arrive, then stop clicking and watch. The start value is 0 and the substitute value is 99.

One stopwatch or several?

Normally COM watches the whole packet with one stopwatch: if the packet arrives, all its signals are fine. A signal with an update-bit (lesson 5) gets its own stopwatch, because the packet may arrive without that signal being new.

The very first wait after switch-on can have its own, usually longer, limit. Other control units may need time to start up.

The other direction: was it really sent?

COM can also watch its own sends. When it hands a packet down, it expects the answer "it is on the bus" within a time limit. If that answer does not come, for example because the wire is broken, COM tells the application.

One difference: this alarm comes once per failed send. It does not repeat.

Check yourself

Optional. Answer from memory.

The AUTOSAR words

Plain word hereAUTOSAR word
Watching the clockDeadline monitoring (reception / transmission)
Time limit, first time limitTimeout, first timeout
What value to hand outTimeout action: NONE, REPLACE, SUBSTITUTE
The answer "it is on the bus"Transmit confirmation

Source: AUTOSAR COM specification, R25-11, section 7.2.6 (SWS_Com_00290, 00292, 00470, 00875, 00500, 00889, 00878, 00304). Finer points: a time limit of 0 means "do not watch". COM can also report timeouts to the diagnostic system. Watching sends only makes sense on a bus that confirms them.