4.8.7 Get Telegram State Machine

The get telegram state machine handles the reception of a telegram after the RX path is enabled. It is the most complex state machine. Several options can modify the flow to support a wide range of different protocols.

After the first initialization, the state machine can be spawned into two paths, one for path A and one for path B. Both paths can be active at the same time waiting for the start of a transmission. Depending on the SSMRCR.SSMPVS configuration, one path is halted either after a wake check OK or after a start of telegram event on the other path. Only one telegram can be received at a time. After the end of a telegram, both paths can be restarted with both paths, again, waiting for a wake event.

The following figure illustrates the state diagram of the get telegram state machine. For better readability, the states for path B are hidden because they are equivalent to path A. Each part is associated with the corresponding demodulator path. The two paths of the state machine are, thus, not necessarily in the same state. For example, path A can be waiting for a Wake Check OK event in the get WCOA state, whereas path B may have already gotten a Wake Check OK and is, then, waiting for the start of the telegram event in the get SOTB state.
Figure 4-28. Get Telegram State Diagram

Telegram Phases/Demodulator Condition Flags

The get telegram state machine supports the three phases of telegram reception.

During the first phase, the state machine is waiting for a Wake Check OK (WCO) condition. For this phase, the demodulator uses the settings from SOTC1A/B and EOTC1A/B. These are copied into SOTCA/B and EOTCA/B in the RX DSP enable state machine and in the setup WCO state to obtain the settings restored after any restart.

During the second phase, the state machine is waiting for a Start of Telegram (SOT). In this phase, the demodulator uses the settings from SOTC2A/B and EOTC2A/B. These are copied into SOTCA/B and EOTCA/B in the setup SOT state.

During the third phase, the state machine is waiting for the EOT. In this phase, the demodulator uses the settings from EOTC3A/B. These are copied into EOTCA/B during the disable state.

Loop Control

For each path, the get telegram state machine has four configuration registers that control the loop and restart behavior. First, there is the GTCR.DARA/B setting, which enables or disables the automatic demodulator restart. If this bit is set to ‘1’, the demodulator gets restarted automatically when an EOT condition occurs while the system is waiting for a WCO or for a start of telegram.

Then, there is the intermittent wake-up GTCR.IWUPA/B setting, which is intended for automatic polling cycles. If it is set to ‘1’, the state machine waits for a WCO as long as this is defined by the WCO time-out WCOTOA/B. If an EOT condition occurs before the time-out, the demodulator is restarted and is again, waiting for the WCO condition.

The GTCR.GAPA/B setting is for supporting protocols that have a pause after the wake-up pattern. If enabled, the state machine waits for a SOT even if an EOT condition has occurred after detecting a WCO. For example, due to a missing carrier or Manchester error. The maximum wait time, and, thus, the maximum length of the gap can be defined by the start of telegram time-out SOTTOA/B.

The setting of the RX telegram end handling GTCR.RXTEHA/B decides whether the state machine must stop or restart after the telegram is received successfully.

ID Check Handling

The get telegram state machine can process ID check results. The ID check feature needs software support to write the results of an ID check into the SSMFCR register. Due to the implementation nature of the ID check hardware, which itself requires software support, this mechanism avoids overlapping results from different telegrams. See ID Check from Related Links.

If the ID check handling is enabled by the SSMRCR.SSMIDSE register and the get telegram state machine is in the get EOT state, a ‘1’ in the SSMIDSF bit ends this state and transitions to the next state. The telegram currently being received is incomplete and can be discarded.

When the ID check is enabled, the get telegram state machine is in the wait ID scan finish state waiting for either an SSMIDSF or an SSMIDSO bit to be set.

Additional Controls

The get telegram state machine can control the antenna damping and update it during every loop. The preceding figure illustrates the antenna damping procedure is part of every restart path x state. The get telegram state machine controls the RSSI buffer if it is enabled in the PRR2.PRRS register. Correction setup due to enabled antenna damping or an IF amplifier is done automatically in the restart loops. If the get telegram state machine is started with no path enabled in the SSMRCR, it stops immediately and sets the error flag in SSMSR.

Table 4-43. Settings Influencing the Get Telegram State Machine

Setting

Description

SSMRCR.SSMPA/B

Enable path A/B of the sub-state machine

SSMRCR.SSMIFA

Enable IF amplifier during automatic antenna damping adjustment

SSMCR.SETRPA/B

Enable/disable transparent outputs

SSMRCR.SSMTMOE

SSMRCR.SSMIDSE

Check ID check results if enabled

SSMRCR.SSMADA/B

Enable/disable automatic antenna damping.

SSMFBR.SSMFID

Adjusts the settling wait time for internal filters after automatic antenna damping modification

SSMFBR.SSMDFDT

SSMFBR.SSMHADT

SSMRCR.SSMPVS

Flow control of telegram reception:

Path valid after SOT

Gap mode

Intermittent WUP

Automatic restart

RX end handling (see the preceding figure)

GTCR.GAPMA/B

GTCR.IWUPA/B

GTCR.DARA/B

GTCR.RXTEHA/B

SOTC1A/B

Copy these settings to demodulator registers before waiting for wake check OK

EOTC1A/B

SOTC2A/B

Copy these settings to demodulator registers before waiting for start of telegram

EOTC2A/B

EOTC3A/B

Copy these settings to demodulator registers before waiting for end of telegram

WCOTOA/B

Wake check OK time-out

SOTTOA/B

Start of telegram time-out