SNIP_CLASSIC_LIN_SECTION_7_3_3_State_diagrams
Wortlaut
7.3.3 State diagrams
The LIN driver has a state machine that is shown in Figure 7.1. Reset LIN_UNINIT LIN_INIT for each channel LIN_CH_OPERATIONAL LIN_CH_SLEEP LIN_CH_SLEEP_PENDING Master only Lin_WakeupInternal Lin_GetStatus Lin_GoToSleepInternal Lin_GoToSleep Lin_Wakeup Lin_Init Figure 7.1: Lin driver states Module State Meaning / Activities in the state LIN_UNINIT The state LIN_UNINIT means that the Lin module has not been initialized yet and cannot be used. LIN_INIT The LIN_INIT state indicates that the LIN driver has been initialized, making each available channel ready for service. Table 7.1: Lin driver states Channel State Meaning / Activities in the state LIN_CH_OPERATIONAL The individual channel has been initialized (using at least one statically configured data set) and is able to participate in the LIN cluster. LIN_CH_SLEEP The detection of a ’wake-up’ pulse is enabled. The LIN hardware is into a low power mode if such a mode is provided by the hardware. Table 7.2: Lin driver channel states
[SWS_Lin_00145] ⌈Reset -> LIN_UNINIT: After reset, the Lin module shall set its state to LIN_UNINIT.⌋
[SWS_Lin_00146] ⌈LIN_UNINIT -> LIN_INIT: The Lin module shall transition from LIN_UNINIT to LIN_INIT when the function Lin_Init is called.⌋ The LIN module’s environment shall call the function Lin_Init only once during runtime.
[SWS_Lin_00171] ⌈On entering the state LIN_INIT, the Lin module shall set each channel into state LIN_CH_SLEEP, enable bus monitoring for a wake-up request on that channel if external wake-up detection is supported by configuration parameter LinChannelWakeupSupport, and optionally set the LIN hardware unit to reduced power operation mode (if supported by HW).⌋
[SWS_Lin_00263] ⌈LIN_CH_OPERATIONAL -> LIN_CH_SLEEP_PENDING through Lin_GoToSleep: If a go to sleep is requested by the LIN interface, the Lin module shall ensure that the rest of the LIN cluster goes to sleep also. This is achieved by issuing a go-to-sleep-command on the bus before entering the LIN_CH_SLEEP_PENDING state. This requirement is only applicable for LIN master nodes.⌋
[SWS_Lin_00264] ⌈LIN_CH_SLEEP_PENDING -> LIN_CH_SLEEP: When Lin_GetStatus is called, the LIN driver shall directly enter the LIN_CH_SLEEP state, even if the go-to-sleep-command has not yet been sent. This requirement is only applicable for LIN master nodes.⌋
[SWS_Lin_00265] ⌈LIN_CH_OPERATIONAL -> LIN_CH_SLEEP through Lin_GoToSleepInternal: If an internal go to sleep is requested by the LIN interface, the LIN driver shall directly enter the LIN_CH_SLEEP state.⌋
[SWS_Lin_00174] ⌈LIN_CH_SLEEP -> LIN_CH_OPERATIONAL through Lin_Wakeup: If a LIN channel is in the state LIN_CH_SLEEP, the function Lin_Wakeup shall put the LIN channel into the state LIN_CH_OPERATIONAL.⌋
[SWS_Lin_00261] ⌈LIN_CH_SLEEP -> LIN_CH_OPERATIONAL through Lin_WakeupInternal: If a LIN channel is in the state LIN_CH_SLEEP, the function Lin_ WakeupInternal shall put the LIN channel into the state LIN_CH_OPERATIONAL.⌋
[SWS_Lin_00209] ⌈Lin_Wakeup: During the state transition from LIN_CH_SLEEP to LIN_CH_OPERATIONAL the LIN Driver shall ensure that the rest of the cluster is awake. This is achieved by issuing a wake-up request, forcing the bus to the dominant state for 250 µs to 5 ms.⌋
[SWS_Lin_00184] ⌈A mode switch request to the current mode is allowed and shall not lead to an error, even if DET is enabled.⌋
Versionen & Provenienz · Zugeordnete Anforderungen
Diese Angaben zeigt der Versions-Explorer.
Begründung & Zuweisungs-Evidenz
Cited verbatim in the snippet (deterministic citation).
Dokumenten-Herkunft & Rückverfolgbarkeit
| Spezifikations-Dokument | SWS_LINDriver.pdf |
|---|---|
| Dokumentseite | Seite 24 |
| Ziel-Modul | lin (classic) |
| Ziel-Anforderung | SWS_Lin_00265 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |