Communication bus detection method, vehicle-mounted communication device and electronic equipment
By using the interrupt detection function in the on-board communication device to obtain the communication bus status and control the sleep or wake-up of the controller, the problem of poor sleep or wake-up stability of the controller is solved, and more efficient energy consumption management and user experience improvement is achieved.
Patent Information
- Application Number
- CN202510038502.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-10
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2045-01-10
AI Technical Summary
In the prior art, the dormant or wake-up stability of the controller is poor, and it is easy to repeatedly sleep or wake-up, resulting in an increase in vehicle energy consumption and a decrease in user vehicle experience.
By enabling the interrupt detection function in the on-board communication device, the communication bus status is obtained and the controller sleep or wake-up is controlled according to the status, ensuring that the controller always remains awake when the message transmission occurs on the communication bus.
Accurate control of the controller wake-up or sleep, reduces the risk of the controller being repeatedly wake-up or sleep, improves the controller's sleep-up or wake-up stability, reduces the vehicle's energy consumption, and improves the user's car use experience.
Smart Images

Figure CN119484200A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of vehicle technology, and in particular to a communication bus detection method, a vehicle-mounted communication device and an electronic device. Background Art
[0002] The sleep or wake-up of the controller is very important for saving the energy consumption of the vehicle. In the relevant technology, the sleep or wake-up of the controller is mainly based on the controller, CAN (Controller Area Network) transceiver, and power management module. The level of the relevant pins is controlled by judging whether the network management message is transmitted on the CAN bus, thereby realizing the control of the sleep or wake-up of the controller.
[0003] However, there is a risk of repeatedly sleeping or waking up the controller using the above method, resulting in poor stability of the controller's sleep or wake-up, increased energy consumption of the vehicle, and reduced user experience. For example, when the network management message disappears, the controller enters sleep mode. If there are other messages on the bus at this time, the controller will be awakened. Since the message received is not a network management message, the controller will go into sleep mode. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0005] To this end, an object of the present invention is to propose a communication bus detection method, which reduces the risk of the controller being repeatedly put into sleep or awakened, improves the stability of the controller's sleep or awakening, reduces the energy consumption of the vehicle, and improves the user's car experience.
[0006] To this end, a second object of the present invention is to provide a vehicle-mounted communication device.
[0007] To this end, a third object of the present invention is to provide an electronic device.
[0008] In order to achieve the above-mentioned purpose, an embodiment of the first aspect of the present invention proposes a communication bus detection method, which is used for a vehicle-mounted communication device, and the method includes: when it is determined that the network mode of the vehicle-mounted communication device is a first sleep mode, turning on the interruption detection function of the vehicle-mounted communication device; obtaining the communication bus state corresponding to the interruption detection function; and controlling the controller in the vehicle-mounted communication device to sleep or wake up according to the communication bus state.
[0009] According to the communication bus detection method of an embodiment of the present invention, the interrupt detection function of the on-board communication device is used to effectively detect the communication bus status, that is, whether there is message transmission, so that the controller is always awake when there is message transmission on the communication bus, thereby achieving precise control of the controller awakening or sleeping, avoiding repeated sleep and awakening of the controller due to different transmission messages transmitted on the communication bus, reducing the risk of the controller being repeatedly awakened or asleep, improving the stability of the controller awakening or sleeping, reducing the energy consumption of the vehicle, and improving the user's car experience.
[0010] In some embodiments, obtaining the communication bus state corresponding to the interrupt detection function includes: after turning off the interrupt detection function, if no interrupt flag is detected within a first preset time, determining that the communication bus is in an idle state.
[0011] In some embodiments, controlling a controller in the vehicle-mounted communication device to sleep or wake up according to the communication bus state includes: when the communication bus state is an idle state, controlling the controller to sleep.
[0012] In some embodiments, obtaining the communication bus state corresponding to the interrupt detection function includes: after turning off the interrupt detection function, if an interrupt flag is detected within a first preset time, determining that the communication bus is in an occupied state.
[0013] In some embodiments, controlling a controller in the vehicle-mounted communication device to sleep or wake up according to the communication bus state includes: when the communication bus state is an occupied state, controlling the controller to wake up.
[0014] In some embodiments, controlling the controller to sleep includes: controlling the communication transceiver in the vehicle-mounted communication device to enter a second sleep mode; after the time in the second sleep mode reaches a second preset time, controlling the communication transceiver to enter a third sleep mode; in the third sleep mode, the first setting pin of the communication transceiver is at a low level to control the controller to sleep after powering off.
[0015] In some embodiments, after controlling the controller to wake up, the method further includes: resetting the interrupt flag.
[0016] In some embodiments, detecting the interrupt flag includes: determining that a level jump occurs on a second setting pin of the controller.
[0017] In some embodiments, controlling the controller to wake up includes: receiving a first message; adjusting and converting the first message to output a digital signal; controlling the communication transceiver to switch from a third sleep mode to a setting mode according to the digital signal; in the setting mode, the power management module of the vehicle-mounted communication device controls the controller to wake up after receiving a high-level signal.
[0018] In order to achieve the above-mentioned purpose, an embodiment of the second aspect of the present invention proposes a vehicle-mounted communication device, which includes: a communication transceiver; a communication bus connected to the communication transceiver; a controller connected to the communication transceiver, used to determine that the interrupt detection function of the vehicle-mounted communication device is turned on, obtain the communication bus state corresponding to the interrupt detection function, and sleep or wake up according to the communication bus state; a power management module, respectively connected to the controller and the communication transceiver, for powering the controller and the communication transceiver.
[0019] The vehicle-mounted communication device according to an embodiment of the present invention effectively detects the state of the communication bus, i.e., whether there is message transmission, by using the interrupt detection function of the vehicle-mounted communication device, so that when there is message transmission on the communication bus, the controller is always kept awake, thereby achieving precise control over the controller's awakening or sleep, avoiding repeated sleep and awakening of the controller due to different transmission messages being transmitted on the communication bus, reducing the risk of the controller being repeatedly awakened or asleep, improving the stability of the controller's awakening or sleep, reducing the vehicle's energy consumption, and improving the user's vehicle experience.
[0020] In order to achieve the above-mentioned purpose, an embodiment of the third aspect of the present invention proposes an electronic device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores a communication bus detection program executable by the at least one processor, and when the communication bus detection program is executed by the at least one processor, the at least one processor executes the communication bus detection method as described in the above-mentioned embodiment.
[0021] The electronic device according to an embodiment of the present invention uses the interrupt detection function of the on-board communication device to effectively detect the state of the communication bus, that is, whether there is message transmission, so that when there is message transmission on the communication bus, the controller is always kept awake, thereby achieving precise control over the wake-up or sleep of the controller, avoiding repeated sleep and wake-up of the controller caused by different transmission messages on the communication bus, reducing the risk of the controller being repeatedly woken up or asleep, improving the stability of the controller being awakened or asleep, reducing the energy consumption of the vehicle, and improving the user's car experience.
[0022] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which: Figure 1 is a block diagram of a vehicle-mounted communication device according to an embodiment of the present invention; Figure 2 is a flow chart of a communication bus detection method according to an embodiment of the present invention; Figure 3 is a flow chart of a communication bus detection method according to another embodiment of the present invention; Figure 4 is a block diagram of a vehicle-mounted communication device according to another embodiment of the present invention; Figure 5 is a block diagram of an electronic device according to an embodiment of the present invention.
[0024] Reference numerals: On-vehicle communication device 105; Controller unit 80; CAN transceiver 81; power management system 82; CANH bus 84; CANL bus 83; Controller 100; communication transceiver 101; communication bus 102; power management module 103; Electronic equipment 90; Processor 92; Memory 93. DETAILED DESCRIPTION
[0025] The embodiments described with reference to the drawings are exemplary, and embodiments of the present invention are described in detail below.
[0026] As people pay more and more attention to environmental protection and low carbon, the pace of development of new energy vehicles has also accelerated significantly. The integration of automobiles with related technologies in the fields of energy, transportation, information and communications has accelerated, and electrification, networking and intelligence have become the development trend of the automobile industry. New technologies for new energy vehicles have sprung up, for example: The application number is CN202410658157.7, the publication number is CN118238797B, and the invention name is New energy vehicle energy intelligent management system, control method and related equipment; the application number is CN202410672579.X, the publication number is CN118597091A, and the invention name is New energy vehicle energy intelligent management method, system and related equipment; both describe electric-based hybrid technology, which has multiple advantages such as fast, economical, quiet, smooth and green.
[0027] The application number is CN202211678720.4, the publication number is CN117382629B, and the name of the invention is vehicle power control method, device, medium, vehicle controller and vehicle; the application number is CN202311164098.X, the publication number is CN116890770B, and the name of the invention is vehicle control system, method and vehicle; the application number is CN202311170393.6, the publication number is CN117533292B, and the name of the invention is vehicle control system, control method, controller and vehicle; all describe a new energy power system with four wheel-side motors independently driven as the core, which greatly improves the safety and power of new energy vehicles.
[0028] More and more controllers are deployed in the automotive electronic and electrical architecture, which means more functions can be realized, but also means more energy consumption. In addition, the increasingly complex network topology poses a huge challenge to how controllers work together. In order to save energy and reduce power consumption, controllers that do not need to work at certain times should sleep; but at certain times, controllers that need to sleep should wake up immediately to participate in work. Therefore, a control mechanism or strategy is needed to enable controller nodes in the communication topology network to sleep and wake up in an orderly manner, so as to ensure the functions of the car while saving as much power as possible.
[0029] In the related technology, taking the sleep or wake-up of MCU (microcontroller unit) as an example, the sleep or wake-up of MCU can be mainly achieved by judging whether there is a network management message. When there is no network management message on the bus and the MCU has no working demand, the network management module will set the network mode to sleep mode. At this time, after the power management module detects that the network mode is sleep, it will control the MCU to enter sleep mode. The sleep process will first change the STB (status pin, Set-Top Box) and EB (status pin) levels of the CAN transceiver to make it enter sleep mode. After the transceiver enters sleep mode, the INH (Inhibit, inhibit or disable pin) pin level will be pulled low. After the pin level becomes low, it will notify the power management module. The power management module controls the MCU to enter the power-off process to make it enter sleep mode.
[0030] When the MCU is in sleep mode, if a message frame is transmitted on the bus at this time, the CAN transceiver will pull up the level of the INH pin after receiving the CAN message sent from the bus. After the pin level becomes high, it will notify the power management module. After the power management module detects that INH is at a high level, it will power the MCU and control the MCU to enter the wake-up process. At this time, if the network management module detects that the transmitted message is a network management message, it can switch the network mode to the working mode. If it is other messages, the network mode will be switched to the sleep mode again.
[0031] However, there is a risk of repeatedly sleeping or waking up the controller using the above method. When the network management message disappears, the MCU will power off and enter sleep mode. At this time, if there are other messages on the bus, the transceiver will pull up the INH pin level. After detecting the high level, the power management module controls the MCU to enter the wake-up process. However, since the message received is not a network management message, the MCU will immediately enter the sleep process and switch the transceiver to sleep mode, resulting in poor stability of the controller's sleep or wake-up, increased energy consumption of the vehicle, and reduced user experience.
[0032] Therefore, the communication bus detection method of the embodiment of the present invention is adopted to effectively detect the communication bus status, that is, whether there is message transmission, by using the interrupt detection function of the vehicle-mounted communication device, so that when there is message transmission on the communication bus, the controller is always kept awake, thereby achieving precise control of the controller awakening or sleeping, avoiding repeated sleep and awakening of the controller due to different transmission messages transmitted on the communication bus, reducing the risk of the controller being repeatedly awakened or asleep, improving the stability of the controller awakening or sleeping, reducing the energy consumption of the vehicle, and improving the user's car experience.
[0033] The above communication bus detection method is based on the sleep or wake-up control controlled by the vehicle-mounted communication device, and the vehicle-mounted communication device is described below by way of example.
[0034] First, refer to Figure 1 A block diagram of a vehicle-mounted communication device according to an embodiment of the present invention is described.
[0035] like Figure 1 FIG. 1 is a block diagram of a vehicle-mounted communication device according to an embodiment of the present invention. The vehicle-mounted communication device 105 according to the embodiment of the present invention comprises: a controller unit 80, a CAN transceiver 81, a power management system 82, a CANH (Controller Area Network High) bus 84 and a CANL (Controller Area Network Low) bus 83.
[0036] Among them, the controller unit 80 has RXD (Receive Data), TXD (Transmit Data) and IO (Input / Output) ports; the CAN transceiver 81 has RXD, TXD, CANL, CANH, STB, EB and INH pins; and the power management system 82 has an IO port. The CAN transceiver 81 receives messages sent by the CANH bus 84 and the CANL bus 83 through the CANH and CANL pins; the sleep state change of the CAN transceiver 81 will cause the level change of the INH pin; the power management system 82 controls the power-on and wake-up of the controller unit 80 according to the level state of the INH pin; and controls the state switching of the CAN transceiver 81 through the STB and EB pins.
[0037] Based on the above vehicle-mounted communication device, the following Figure 1-Figure 3 A communication bus detection method according to an embodiment of the present invention is described.
[0038] like Figure 2 FIG. 1 is a flow chart of a communication bus detection method according to an embodiment of the present invention. The communication bus detection method according to the embodiment of the present invention is used for a vehicle-mounted communication device, and the method at least includes steps S1 to S3.
[0039] Step S1, when it is determined that the network mode of the vehicle-mounted communication device is the first sleep mode, an interruption detection function of the vehicle-mounted communication device is enabled.
[0040] In an embodiment, Figure 1 As shown, the first sleep mode is, for example, the Bus Sleep (low power state) mode; the interrupt detection function is, for example, the edge detection interrupt of the RXD pin; when there is no network management message on the CAN bus (CANH bus 84 and CANL bus 83), after a period of time, the network management module sets the network mode to the Bus Sleep mode, and when the power management system 82 finds that the network mode is Bus Sleep, it turns on the edge detection interrupt of RXD and detects the jump of the RXD pin. When the jump occurs, the controller unit 80 is triggered to enter a specific interrupt, and a flag bit is set in the interrupt address. The controller unit 80 software task polls the interrupt flag bit triggered by the edge detection. Each time the interrupt is triggered, the counter is added by 1 in the interrupt processing function, and the interrupt is turned off, so as to prepare for judging the state of the communication bus according to the interrupt detection function.
[0041] Step S2, obtaining the communication bus state corresponding to the interrupt detection function.
[0042] In an embodiment, Figure 1As shown, a communication bus such as a CAN bus (CANH bus 84 and CANL bus 83) starts timing from when the edge detection interrupt of RXD is turned on, and a time period for checking the counter is set according to factors such as requirements and experiments to detect the situation of triggering an interrupt within the interrupt turn-on time period. For example, it is set to 4s, and 4s after the edge detection interrupt of RXD is turned on, the count of the counter is checked. If the counter has counts, it means that an interrupt has occurred within 4s. It can be understood that the occurrence of an interrupt indicates that the CAN bus is not idle, so the controller unit 80 cannot enter the sleep state; if the counter has no counts, it means that no interrupt has occurred within 4s. It can be understood that no interrupt has occurred, which means that the CAN bus is already idle, no message is sent, and no message is sent. If there is interference and the power-off conditions are met, the controller unit 80 can enter a sleep state, wherein the time period for checking the counter can be increased or decreased as needed, the number of time periods for checking the counter can be set as needed and according to the number of times the interrupt detection function is enabled, and the number of times the interrupt detection function is enabled can also be enabled as needed. It can be understood that the longer the time period for checking the counter and the more times the time period for checking the counter is set, the more times the interrupt detection function is enabled, the more reliable and accurate the interrupt detection result is, and the interference of the communication bus can be avoided, thereby making the obtained communication bus status result more reliable and accurate, reducing the risk of the controller being repeatedly put to sleep or woken up, and improving the stability of the controller's sleep or wake-up.
[0043] Step S3, controlling the controller in the vehicle-mounted communication device to sleep or wake up according to the state of the communication bus.
[0044] In an embodiment, Figure 1 As shown, for example, if the communication bus status is that the CAN bus is not idle, the controller unit 80 cannot enter the sleep state. Specifically, if the communication bus status is non-awakened before the interrupt detection, the controller is awakened; if the communication bus status is awakened before the interrupt detection, it remains awakened. If the communication bus status is that the CAN bus is idle, the controller unit 80 enters the sleep state. The controller in the vehicle-mounted communication device is controlled to sleep or wake up through the communication bus status to accurately wake up or sleep the controller, reduce the risk of the controller being repeatedly awakened or asleep, improve the stability of the controller waking up or sleeping, reduce the energy consumption of the vehicle, and improve the user's car experience.
[0045] According to the vehicle control method of the embodiment of the present invention, by determining that the network mode of the on-board communication device is the first sleep mode, the interruption detection function of the on-board communication device is turned on, and the communication bus state corresponding to the interruption detection function is obtained so that the acquired communication bus state is more reliable and accurate. The controller in the on-board communication device is controlled to sleep or wake up according to the communication bus state to achieve accurate wake-up or sleep of the controller, reducing the risk of the controller being repeatedly woken up or put into sleep, improving the stability of the controller waking up or sleeping, reducing the energy consumption of the vehicle, and improving the user's car experience.
[0046] In some embodiments, obtaining the communication bus state corresponding to the interrupt detection function includes: after turning off the interrupt detection function, if no interrupt flag is detected within a first preset time, determining that the communication bus is in an idle state.
[0047] In an embodiment, Figure 1 As shown, the first preset time is to start timing from the time when the edge detection interrupt of RXD is turned on. A time period for checking the counter is set according to factors such as demand and experiment to detect the situation of triggering the interrupt during the interrupt opening time period, which is set to 4s; when the controller unit 80 does not receive the network management message and has no work demand, at this time, if the CAN transceiver 81 does not receive other messages from the bus for a period of time, then the RXD pin level of the CAN transceiver 81 will remain at a high level and will not jump, and the controller unit 80 will not be triggered to enter a specific interrupt; after the network management module switches the network mode to the Bus Sleep mode, the power management module 103 detects that the Bus Sleep mode, turn on the edge detection interrupt of RXD, detect the jump of RXD pin, when the jump occurs, trigger the controller unit 80 to enter a specific interrupt, set a flag in the interrupt address, the controller unit 80 software task polls the interrupt flag triggered by the edge detection, each time the interrupt is triggered, add 1 to the counter in the interrupt processing function, and turn off the interrupt, check the count of the counter 4s after turning on the edge detection interrupt of RXD, if there is no count, it means that the interrupt flag is not detected within 4s, that is, no interrupt occurs. It can be understood that no interrupt occurs, which means that the CAN bus is idle, no message is sent and there is no interference, so the communication bus is determined to be in an idle state, in preparation for controlling the controller to sleep according to the idle state of the communication bus.
[0048] In some embodiments, controlling a controller in the vehicle-mounted communication device to sleep or wake up according to the communication bus state includes: when the communication bus state is an idle state, controlling the controller to sleep.
[0049] In an embodiment, Figure 1As shown, when the communication bus is determined to be in an idle state, the power management system 82 controls the pin level on the CAN transceiver 81 through the IO port to control the controller to sleep, so as to realize a precise sleep controller, reduce the risk of the controller being repeatedly put into sleep, and improve the stability of the controller's sleep, thereby reducing the vehicle's energy consumption and improving the user's car experience.
[0050] In some embodiments, obtaining the communication bus state corresponding to the interrupt detection function includes: after turning off the interrupt detection function, if an interrupt flag is detected within a first preset time, determining that the communication bus is in an occupied state.
[0051] In an embodiment, Figure 1 As shown, the first preset time starts from the time when the edge detection interrupt of RXD is turned on. A time period for checking the counter is set according to factors such as demand and experiment to detect the situation of triggering an interrupt within the interrupt turn-on time period, which is set to 4s. After the network management module switches the network mode to the Bus Sleep mode, the power management system 82 detects the Bus Sleep mode, turns on the edge detection interrupt of RXD, and detects the jump of the RXD pin. When the jump occurs, the controller unit 80 is triggered to enter a specific interrupt, and a flag is set in the interrupt address. The controller unit 80 software task polls the interrupt flag triggered by the edge detection. Each time an interrupt is triggered, the counter is added by 1 in the interrupt processing function, and the interrupt is turned off. 4s after the edge detection interrupt of RXD is turned on, the count of the counter is checked. If there is a count, it means that the interrupt flag is detected within 4s, that is, an interrupt occurs. It can be understood that the occurrence of an interrupt indicates that the CAN bus is not idle, so it is determined that the communication bus is in an occupied state, and preparations are made for controlling the controller wake-up according to the occupied state of the communication bus.
[0052] In some embodiments, controlling a controller in the vehicle-mounted communication device to sleep or wake up according to the communication bus state includes: controlling the controller to wake up when the communication bus state is an occupied state.
[0053] In an embodiment, Figure 1 As shown, when it is determined that the communication bus state is occupied, the message received by the CAN transceiver 81 is processed, and then the mode of the CAN transceiver 81 is converted. Finally, the controller unit 80 is controlled to wake up through the power management system 82 to achieve accurate wake-up of the controller, reduce the risk of the controller being repeatedly woken up, and improve the stability of the controller wake-up, so as to reduce the energy consumption of the vehicle and improve the user's car experience.
[0054] In some embodiments, controlling the controller to sleep includes: controlling the communication transceiver in the vehicle-mounted communication device to enter a second sleep mode; after the time in the second sleep mode reaches a second preset time, controlling the communication transceiver to enter a third sleep mode; in the third sleep mode, the first setting pin of the communication transceiver is a low level to control the controller to sleep after powering off.
[0055] In an embodiment, Figure 1 As shown, the communication transceiver is, for example, a CAN transceiver 81; the second sleep mode is, for example, a Go to Sleep mode, which is a specific working mode of the CAN transceiver. When the nodes on the CAN bus do not need to communicate, this mode can be entered to reduce power consumption. In this mode, the CAN transceiver usually does not send or receive CAN messages unless triggered by a specific wake-up signal; the third sleep mode is, for example, a sleep mode, which is a deeper low-power state of the CAN transceiver. Compared with the Go to Sleep mode, it may have lower power consumption and stricter wake-up conditions. In the Sleep mode, the power consumption of the CAN transceiver will be further reduced, and it can usually only be awakened by a specific wake-up signal (such as a message on the CAN bus); the second preset time starts from the time when the CAN transceiver enters the second sleep mode and ends from the time when it enters the third sleep mode, which is set to 5us to 50us; the controller is, for example, the controller unit 80; the first setting pin, for example, the INH pin, is used to control the external regulator to achieve the wake-up and sleep management of the ECU.
[0056] The power management module will pull down the STB pin level of the CAN transceiver 81 and pull up the EN pin level through the IO port, and the CAN transceiver 81 will enter the Go to Sleep mode to prepare for entering the third sleep mode; when the CAN transceiver enters the Go to Sleep mode, after 5us to 50us, the CAN transceiver 81 will automatically enter the Sleep mode to prepare for controlling the controller to sleep; in the Sleep mode, the CAN transceiver 81 will change the INH pin of the CAN transceiver 81 from a high level to a low level and keep it at a low level. Since the INH pin of the CAN transceiver 81 is only at a low level in the Sleep mode and high levels in other modes, the power on and off of the controller unit 80 can be indirectly controlled by the level of the INH pin. When the power management system 82 detects that the INH pin is at a low level, it will cut off the power supply of the controller unit 80, causing the controller unit 80 to enter the power-off process. After the controller unit 80 is powered off, it enters the sleep mode and waits for the next wake-up process to reduce the energy consumption of the vehicle and improve the user's car experience.
[0057] In some embodiments, after the controller wakes up, the method further includes: resetting the interrupt flag.
[0058] In an embodiment, Figure 1 As shown, after the controller unit 80 is awakened, when other nodes do not send network management messages and only send other messages to the communication bus such as the CAN bus (CANH bus 84 and CANL bus 83), the interrupt detection function is used at the RXD pin of the controller unit 80 to detect the jump of the RXD pin. When the jump occurs, the controller unit 80 is triggered to enter a specific interrupt and a flag is set in the interrupt address. After the controller unit 80 detects the flag in the polling task, it will not enter sleep mode immediately after awakening, but remain awake and reset the flag. At this time, the CAN transceiver 81 will not be switched to Sleep mode by the controller unit 80 due to the absence of network management messages, causing the INH pin level to be pulled low, thereby reducing the risk of the controller being repeatedly asleep or awakened, and improving the stability of the controller's sleep or awakening.
[0059] In some embodiments, detecting the interrupt flag bit includes: determining that a level jump occurs on a second setting pin of the controller.
[0060] In an embodiment, Figure 1 As shown, the second setting pin, such as the RXD pin, is the data receiving pin of the CAN transceiver, which is responsible for receiving data signals from the CAN bus and converting these signals into level signals suitable for processing by the controller. During the CAN communication process, the RXD pin continuously monitors the signal changes on the CAN bus. When a valid data frame is received, an interrupt will be triggered to notify the controller that data has arrived so that the controller can read and process the data in time; a flag bit is set in the interrupt address of the interrupt detection to detect the jump of the RXD pin of the controller unit 80. When a jump occurs, the controller unit 80 is triggered to enter a specific interrupt. The controller unit 80 polls the task detection flag bit to provide a basis for determining the status of the communication bus.
[0061] In some embodiments, controlling the controller to wake up includes: receiving a first message; adjusting and converting the first message to output a digital signal; controlling the communication transceiver to switch from a third sleep mode to a setting mode according to the digital signal; in the setting mode, the power management module of the vehicle-mounted communication device receives a high-level signal and then controls the controller to wake up.
[0062] In an embodiment, Figure 1As shown, the first message is, for example, a message sent by a CAN bus (CANH bus 84 and CANL bus 83); the Normal mode is that the CAN transceiver can normally send and receive CAN messages, that is, the transceiver is in a fully working state; the setting mode is, for example, the Standby mode, which is between the Normal mode and the third sleep mode (for example, the sleep mode). In this mode, the transceiver may still keep some functions active in order to quickly respond to the wake-up signal and return to the normal working mode; the power management module is, for example, the power management system 82; the controller is, for example, the controller unit 80; the communication transceiver is, for example, the CAN transceiver 81.
[0063] When the control controller wakes up, the CAN transceiver 81 receives the message sent by the CAN bus, converts and adjusts the signal between the CAN controller and the CAN bus physical layer, converts the differential signal of the CAN bus into the digital signal of the CAN controller and outputs it, preparing for controlling the CAN transceiver 81 to switch modes; the CAN transceiver 81 will be converted from the Sleep mode to the Standby mode, and the INH pin of the CAN transceiver 81 will jump from a low level to a high level, and the connection relationship between the INH pin and the IO port on the power management system 82 will notify the power management module with the WAKE_MCU_PMIC (signal to wake up the controller) signal to prepare for the control controller to wake up; after the hardware circuit on the power management system 82 detects that INH is at a high level, it powers on the controller unit 80, and controls the controller unit 80 to enter the wake-up process. After the controller unit 80 is powered on and initialized, it will pull up the levels of the two pins STB and EB through the IO port to switch the CAN transceiver 81 from the Standby mode to the Normal mode. In this mode, CAN messages can be sent and received normally to complete the wake-up of the controller.
[0064] Reference below Figure 3 The communication bus detection method according to the embodiment of the present invention is described in detail.
[0065] like Figure 3 FIG. 2 is a flow chart of a communication bus detection method according to another embodiment of the present invention. The communication bus detection method according to the embodiment of the present invention at least includes steps S10-S30.
[0066] Step S10, start.
[0067] Step S11, determining whether the network mode of the vehicle-mounted communication device is the first sleep mode. If so, executing step S13; otherwise, executing step S12.
[0068] Step S12, end.
[0069] Step S13, starting the interruption detection function of the vehicle-mounted communication device.
[0070] Step S14, obtaining the communication bus state corresponding to the interrupt detection function.
[0071] Step S15, turning off the interrupt detection function.
[0072] Step S16, determining whether the interrupt flag is not detected within the first preset time. If so, executing step S24; otherwise, executing step S17.
[0073] Step S17, determining that a level jump occurs on the second setting pin of the controller.
[0074] Step S18, determining that the communication bus is in an occupied state.
[0075] Step S19, receiving a first message.
[0076] Step S20, adjusting and converting the first message, and outputting a digital signal.
[0077] Step S21, controlling the communication transceiver to switch from the third sleep mode to the setting mode according to the digital signal.
[0078] Step S22 , after receiving the high level signal, the power management module of the vehicle-mounted communication device controls the controller to wake up.
[0079] Step S23, reset the interrupt flag.
[0080] Step S24, determining whether the communication bus is in an idle state.
[0081] Step S25, controlling the communication transceiver in the vehicle-mounted communication device to enter a second sleep mode.
[0082] Step S26, determining whether the time in the second sleep mode reaches a second preset time. If so, executing step S28; otherwise, executing step S27.
[0083] Step S27: Do not enter the third sleep mode.
[0084] Step S28, controlling the communication transceiver to enter a third sleep mode.
[0085] Step S29, the first setting pin of the communication transceiver is at a low level.
[0086] Step S30, controlling the controller to sleep after powering off.
[0087] According to the communication bus detection method of an embodiment of the present invention, the interrupt detection function of the on-board communication device is used to effectively detect the communication bus status, that is, whether there is message transmission, so that the controller is always awake when there is message transmission on the communication bus, thereby achieving precise control of the controller awakening or sleeping, avoiding repeated sleep and awakening of the controller due to different transmission messages transmitted on the communication bus, reducing the risk of the controller being repeatedly awakened or asleep, improving the stability of the controller awakening or sleeping, reducing the energy consumption of the vehicle, and improving the user's car experience.
[0088] Reference below Figure 4 A vehicle-mounted communication device according to an embodiment of the present invention will be described.
[0089] like Figure 4 , which is a block diagram of a vehicle-mounted communication device according to another embodiment of the present invention. The vehicle-mounted communication device 105 of the embodiment of the present invention comprises: a communication transceiver 101; a communication bus 102, connected to the communication transceiver 101; a controller 100, connected to the communication transceiver 101, used to determine that the interruption detection function of the vehicle-mounted communication device is turned on, obtain the communication bus state corresponding to the interruption detection function, and sleep or wake up according to the communication bus state; a power management module 103, respectively connected to the controller 100 and the communication transceiver 101, used to power the controller 100 and the communication transceiver 101.
[0090] According to the vehicle-mounted communication device 105 of an embodiment of the present invention, when it is determined that the network mode of the vehicle-mounted communication device 105 is the first sleep mode, the interruption detection function of the vehicle-mounted communication device is turned on, and the communication bus state corresponding to the interruption detection function is obtained so that the acquired communication bus state is more reliable and accurate. The controller in the vehicle-mounted communication device is controlled to sleep or wake up according to the communication bus state to achieve accurate wake-up or sleep of the controller, thereby reducing the risk of the controller being repeatedly woken up or put into sleep, improving the stability of the controller being woken up or put into sleep, reducing the energy consumption of the vehicle, and improving the user's vehicle experience.
[0091] Reference below Figure 5 An electronic device according to an embodiment of the present invention is described.
[0092] like Figure 5 , which is a block diagram of an electronic device according to an embodiment of the present invention. The electronic device 90 according to the embodiment of the present invention comprises: at least one processor 92; and a memory 93 connected to the at least one processor 92 in communication; wherein the memory 93 stores a communication bus detection program executable by the at least one processor 92, and when the communication bus detection program is executed by the at least one processor 92, the at least one processor 92 executes the communication bus detection method according to the above embodiment.
[0093] The electronic device 90 according to the embodiment of the present invention uses the interrupt detection function of the vehicle-mounted communication device to effectively detect the state of the communication bus, that is, whether there is message transmission, so that when there is message transmission on the communication bus, the controller is always kept awake, thereby achieving precise control over the wake-up or sleep of the controller, avoiding repeated sleep and wake-up of the controller caused by different transmission messages on the communication bus, reducing the risk of the controller being repeatedly woken up or asleep, improving the stability of the controller being awakened or asleep, reducing the energy consumption of the vehicle, and improving the user's car experience.
[0094] In some embodiments, the processor 92 obtains the communication bus state corresponding to the interrupt detection function, including: after the interrupt detection function is turned off, if the interrupt flag is not detected within a first preset time, determining that the communication bus is in an idle state.
[0095] In some embodiments, the processor 92 controls the controller in the vehicle communication device to sleep or wake up according to the communication bus state, including: when the communication bus state is an idle state, controlling the controller to sleep.
[0096] In some embodiments, the processor 92 obtains the communication bus state corresponding to the interrupt detection function, including: after the interrupt detection function is turned off, if an interrupt flag is detected within a first preset time, determining that the communication bus is in an occupied state.
[0097] In some embodiments, the processor 92 controls the controller in the vehicle communication device to sleep or wake up according to the communication bus status, including: when the communication bus status is an occupied state, controlling the controller to wake up.
[0098] In some embodiments, the processor 92 controls the controller to sleep, including: controlling the communication transceiver in the vehicle-mounted communication device to enter a second sleep mode; after the time in the second sleep mode reaches a second preset time, controlling the communication transceiver to enter a third sleep mode; in the third sleep mode, the first setting pin of the communication transceiver is a low level to control the controller to sleep after powering off.
[0099] In some embodiments, after the processor 92 controls the controller to wake up, the process further includes: resetting the interrupt flag.
[0100] In some embodiments, the processor 92 detects the interrupt flag bit, including: determining that a level jump occurs on the second setting pin of the controller.
[0101] In some embodiments, the processor 92 controls the controller to wake up, including: receiving a first message; adjusting and converting the first message to output a digital signal; controlling the communication transceiver to switch from a third sleep mode to a setting mode according to the digital signal; in the setting mode, the power management module of the vehicle-mounted communication device controls the controller to wake up after receiving a high-level signal.
[0102] The electronic device 90 according to the embodiment of the present invention uses the interrupt detection function of the vehicle-mounted communication device to effectively detect the state of the communication bus, that is, whether there is message transmission, so that when there is message transmission on the communication bus, the controller is always kept awake, thereby achieving precise control over the wake-up or sleep of the controller, avoiding repeated sleep and wake-up of the controller caused by different transmission messages on the communication bus, reducing the risk of the controller being repeatedly woken up or asleep, improving the stability of the controller being awakened or asleep, reducing the energy consumption of the vehicle, and improving the user's car experience.
[0103] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials, or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example.
[0104] Although the embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the claims and their equivalents.
Claims
1. A communication bus detection method, characterized in that: For a vehicle-mounted communication device, the method comprises: When determining that the network mode of the vehicle-mounted communication device is the first sleep mode, enabling an interruption detection function of the vehicle-mounted communication device; Obtaining the communication bus state corresponding to the interrupt detection function; A controller in the vehicle-mounted communication device is controlled to sleep or wake up according to the communication bus state.
2. The communication bus detection method according to claim 1, characterized in that: Obtaining the communication bus state corresponding to the interrupt detection function includes: After the interrupt detection function is disabled, if no interrupt flag is detected within a first preset time, it is determined that the communication bus is in an idle state.
3. The communication bus detection method according to claim 1 or 2, characterized in that: Controlling a controller in the vehicle communication device to sleep or wake up according to the communication bus state includes: When the communication bus state is an idle state, the controller is controlled to sleep.
4. The communication bus detection method according to claim 1, characterized in that: Obtaining the communication bus state corresponding to the interrupt detection function includes: After the interrupt detection function is disabled, if an interrupt flag is detected within a first preset time, it is determined that the communication bus is in an occupied state.
5. The communication bus detection method according to claim 1 or 4, characterized in that: Controlling a controller in the vehicle communication device to sleep or wake up according to the communication bus state includes: When the communication bus state is an occupied state, the controller is controlled to wake up.
6. The communication bus detection method according to claim 3, characterized in that: Controlling the controller to sleep includes: Controlling the communication transceiver in the vehicle-mounted communication device to enter a second sleep mode; After the time in the second sleep mode reaches a second preset time, controlling the communication transceiver to enter a third sleep mode; In the third sleep mode, the first setting pin of the communication transceiver is at a low level to control the controller to sleep after powering off.
7. The communication bus detection method according to claim 5, characterized in that: After controlling the controller to wake up, the method further includes: resetting the interrupt flag.
8. The communication bus detection method according to claim 4, characterized in that: Interrupt flags are detected, including: It is determined that a level jump occurs on a second setting pin of the controller.
9. The communication bus detection method according to claim 1, characterized in that: Controlling the controller to wake up includes: receiving a first message; Adjusting and converting the first message and outputting a digital signal; Controlling the communication transceiver to switch from the third sleep mode to the setting mode according to the digital signal; In the setting mode, after receiving a high level signal, the power management module of the vehicle-mounted communication device controls the controller to wake up.
10. A vehicle-mounted communication device, characterized in that: include: Communications transceiver; A communication bus connected to the communication transceiver; a controller connected to the communication transceiver, configured to determine that after the interruption detection function of the vehicle-mounted communication device is turned on, obtain a communication bus state corresponding to the interruption detection function, and sleep or wake up according to the communication bus state; A power management module is connected to the controller and the communication transceiver respectively, and is used to supply power to the controller and the communication transceiver.
11. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores a communication bus detection program executable by the at least one processor, and when the communication bus detection program is executed by the at least one processor, the at least one processor executes the communication bus detection method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Vehicle control system, method and vehicle
CN116890770B
Vehicle power control method and device, medium, vehicle controller and vehicle
CN117382629A
Vehicle power control method, device, medium, vehicle controller and vehicle
CN117382629B
Vehicle control system, control method, controller and vehicle
CN117533292A
Vehicle control system, control method, controller and vehicle
CN117533292B