AUTOSAR COM

Repeats and the minimum gap

Two extras for sending. One sends an important packet several times. The other stops a packet from being sent too often.

Repeats: say it more than once

A packet can get lost on a noisy wire. For important news, such as "brake pressed", COM can send the same packet several times in a row after one write.

set per packet

Number of repeats

How many extra sends follow the first one. With 2 repeats the packet goes out 3 times.

set per packet

Repeat spacing

The time between those sends.

If the application writes a new value while repeats are still running, COM drops the remaining repeats and starts again with the new value. Old news is not worth repeating.

Minimum gap: not too often

An application might write a triggered signal a hundred times a second. Sending a packet each time would flood the bus. The minimum gap is a pause COM keeps after sending a packet before it sends that same packet again.

A send that falls inside the pause is not lost. COM holds it back and sends when the pause is over, with the newest values.

Try it

Speed is a triggered signal in a packet with no timer. Click "Write speed" a few times quickly, with different settings. Repeats are one second apart here.

Things to notice. With repeats, a second write cuts the first series short. With a gap, quick writes produce fewer packets than writes, and the packet that finally goes carries the newest speed.

The triggered family

Lesson 2 said a signal is triggered or pending. Triggered comes in four flavours. They differ in two questions: does every write count, or only a changed value? And are repeats used?

Setting of the signalA write sends when…Repeats
TRIGGEREDalwaysyes
TRIGGERED_WITHOUT_REPETITIONalwaysno, once
TRIGGERED_ON_CHANGEthe value is different from beforeyes
TRIGGERED_ON_CHANGE_WITHOUT_REPETITIONthe value is different from beforeno, once
PENDINGnever–

As in lesson 2, all of this only matters when the packet is DIRECT or MIXED.

Check yourself

Optional. Answer from memory.

The AUTOSAR words

Plain word hereAUTOSAR word
RepeatsNumber of repetitions, also "N-times transmission"
Repeat spacingRepetition period
Minimum gapMinimum delay time, kept by the minimum delay timer (MDT)

Source: AUTOSAR COM specification, R25-11, sections 7.2.3.1, 7.2.3.4 and 7.2.5.5 (SWS_Com_00330, 00767, 00734, 00768, 00279, 00305, 00698). Finer points: COM counts a repeat only once the lower layers confirm the packet was sent. A separate setting decides whether the minimum gap also applies to timer sends and repeats; in this toy it applies to every send.