CLASSIC
Modul: cantrcv
Rolle: constitutive
Konfidenz: 95%
SNIP_CLASSIC_CANTRCV_SECTION_9_2_3_CAN_Wakeup_Sequences
Wortlaut
9.2.3 CAN Wakeup Sequences
On CAN a wake up can be detected by the transceiver or the communication controller using either an interrupt or polling. Wake up source identifiers should be shared between transceiver and controller as the ECU State Manager module only needs to know the network that has woken up and passes that on to the Communication Manager module. In interrupt case or in shared interrupt case it is not clear which specific wake up source (CAN controller, CAN transceiver, LIN controller etc.) detected the wake up. Therefore the integrator has to assign the derived wakeupSource of EcuM_ CheckWakeup(wakeupSource), which could stand for a shared interrupt or just for an interrupt channel, to specific wake up sources which are passed to CanIf_Check Wakeup(WakeupSource). So here the parameters wakeupSource from EcuM_Check Wakeup() could be different to WakeupSource of CanIf_CheckWakeup or they could equal. It depends on the hardware topology and the implementation in the integrator code of EcuM_CheckWakeupHook. During CanIf_CheckWakeup(WakeupSource) the CAN Interface module (CanIf) will check if any device (CAN communication controller or transceiver) is configured with the value of "WakeupSource". If this is the case, the device is checked for wake up via the corresponding device driver module. If the device detected a wake up, the device driver informs EcuM via EcuM_SetWakeupEvent(sources). The parameter "sources" is set to the configured value at the device. Thus it is set to the value CanIf_Check Wakeup() was called with. Multiple devices might be configured with the same wake up source value. But if devices are connected to different bus medium and they are wake-able, it makes sense to configure them with different wake up sources. The following CAN Wake-up Sequences are partly optional, because there is no specification for the "Integration Code". Thus it is implementation specific if e.g. during Ecu M_CheckWakeup() the CanIf is called to check the wake up source.
«Peripheral» ETH Hardware (PHY)
«Peripheral» CanController
«module» CanTrcv
«module» Can
«module» CanIf
«module» Icu
«module» Mcu Integration Code
«module» EcuM
«module» Os
!
HALT
"#
$
%
&
$
&
%
$
GOSLEEP SLEEP WAKEUP I WAKEUP VALIDATION Return from interrupt() CanIf_SetTrcvWakeupMode(uint8, CanTrcv_TrcvWakeupModeType) DisableAllInterrupts()
EnableAllInterrupts()
GetResource(uint8) CanTrcv_SetWakeupMode(uint8, CanTrcv_TrcvWakeupModeType) Icu_EnableWakeup(Icu_ChannelType) CanTrcv_CheckWakeup(uint8): Std_ReturnType activate PLL() CanIf_SetTrcvWakeupMode(uint8, CanTrcv_TrcvWakeupModeType) EcuM_CheckWakeupHook(EcuM_WakeupSourceType)
EcuM_SetWakeupEvent(EcuM_WakeupSourceType)
EcuM_EnableWakeupSources(EcuM_WakeupSourceType) CanIf_CheckWakeup(EcuM_WakeupSourceType): Std_ReturnType Wakeup interrupt() Mcu_SetMode(Mcu_ModeType)
EcuM_DisableWakeupSources(EcuM_WakeupSourceType)
EcuM_CheckWakup(EcuM_WakeupSourceType)
EnableAllInterrupts() Mcu_SetMode (Mcu_ModeType) ReleaseResource(uint8)
DisableAllInterrupts()
CanTrcv_SetWakeupMode(uint8, CanTrcv_TrcvWakeupModeType)
Icu_DisableWakeup(Icu_ChannelType)
Mcu_SetMode() Figure 9.4: CAN transceiver wake up by interrupt Figure 9.4 shows the CAN transceiver wakeup via interrupt. The interrupt is usually handled by the ICU Driver as described in Chapter 9.2.2. A CAN controller wakeup by interrupt works similar to the GPT wakeup. Here the interrupt handler and the CheckWakeup functionality are both encapsulated in the CAN Driver module, as shown in Figure 9.5 .
«Peripheral» CanController
«module» CanTrcv
«module» Icu Integration Code
«module» CanIf
«module» Can
«module» Mcu
«module» EcuM
«module» Os
«Peripheral» ETH Hardware (PHY) HALT
GOSLEEP
SLEEP
!
"
#
$
%
&
WAKEUP I WAKEUP VALIDATION
%
$
Wakeup interrupt()
Mcu_SetMode(Mcu_ModeType) Mcu_SetMode (Mcu_ModeType) EcuM_DisableWakeupSources(EcuM_WakeupSourceType)
Mcu_SetMode()
EcuM_CheckWakup(EcuM_WakeupSourceType)
DisableAllInterrupts()
DisableAllInterrupts()
EnableAllInterrupts()
GetResource(uint8) Return from interrupt()
EcuM_EnableWakeupSources(EcuM_WakeupSourceType)
Can_CheckWakeup(Std_ReturnType, uint8)
CanIf_CheckWakeup(Std_ReturnType, EcuM_WakeupSourceType)
EcuM_SetWakeupEvent(EcuM_WakeupSourceType)
ReleaseResource(uint8) Activate PLL() EcuM_CheckWakeupHook(EcuM_WakeupSourceType) Figure 9.5: CAN controller wake up by interrupt Wake up by polling is possible both for CAN transceiver and controller. The ECU State Manager module will regularly check the CAN Interface module, which in turn asks either the CAN Driver module or the CAN Transceiver Driver module depending on the wake up source parameter passed to the CAN Interface module, as shown in Figure 9.6 .
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_ECUStateManager.pdf |
|---|---|
| Dokumentseite | Seite 179 |
| Ziel-Modul | cantrcv (classic) |
| Ziel-Anforderung | SWS_Std_00005 |
| Semantische Rolle | constitutive |
| Automatisierungs-Konfidenz | 0.95 |