In the automotive industry, the CAN bus has the most application scenarios. This paper also sorts out the relationship between network management and Transceiver/Controller based on the CAN bus.
The modules involved in AUTOSAR NM include Transceiver, CAN Driver, CANIf, CANSM, CANNM, PDUR, Com, ComM, EcuM, BswM, etc. Due to the large number of modules, the editor will divide it into several articles.
This article discusses the relationship between network management and Transceiver and Controler.
Network Management and Transceiver
Why talk about Transceiver? Because the execution of any upper-level intent is actually an operation on the underlying hardware module, and network management is no exception.
Before discussing network management, a question, how is the ECU powered? Because the network management is only available after the ECU is powered on and the program is running. soDo not confuse ECU power-up and network management activation, ECU power-on does not mean network management activation. In this example, Transceiver1145(1) is used as an example to show how to power on the ECU.
As shown in the figure above, when BAT (equivalent to KL30, this example does not use KL15) to supply power to Transceiver1145, the INH pin of Transceiver1145 activates the 3V power management module, and then supplies power to the main chip. After the main chip is powered, the program starts to run, but at this time When the network is in BSM (Bus Sleep Mode), the ECU cannot send out messages immediately. It is necessary to verify the validity of the wake-up event to avoid invalid wake-up of the ECU due to bus jitter or other disturbances.
If a program (upper-layer module, such as CANNM) wants to identify whether a network management message is currently received, what conditions should it meet?
If the ECU wants to send and receive messages normally, the Transceiver1145 and the Controller need to enter their respective working states. Let’s talk about Transceiver1145 first. For Transceiver1145, it needs to switch to Normal Mode (send Normal command through SPI). At this time, Transceiver1145 can convert analog signal and digital signal; although Transceiver1145 can convert analog signal and digital signal, but at this time ECU cannot The message is transmitted to the upper-layer module, that is, the message cannot be sent and received normally at this time, because the Controller is not working normally, and the ECU can send and receive the message normally only when the Controller is also working normally.
Network Management and Controller
How does the Controller enter the normal working mode? When the Controller enters the normal working mode, it needs to understand the wake-up process of the ECU. In this example, the Transceiver wake-up check is used as an example to analyze the ECU wake-up process.
As shown in the figure above, Transceiver1145 checks the wake-up source in the initialization or handler program, and will notify EcuM that there is a wake-up event when power-on or CAN bus interference event is detected, and then EcuM calls CanTrcv_CheckWakeup through the CanIf module to check the wake-up source. If EcuM enables the check of the wakeup source, EcuM calls the EcuM_StartWakeupSources interface. The essence of this operation is to make the Controller enter the Start state. So far, both the Transceiver1145 and the Controller have entered the corresponding working state, and the ECU has the ability to send and receive messages. Note that the Controller needs to switch from the STOPPED state to the STARTED state.
Reviewing Editor: Liu Qing