Communication anomaly protection method and device, system, motor controller and vehicle

By monitoring the power supply voltage and common-mode voltage of the CAN communication chip and adjusting its operating mode in real time, the communication interruption problem caused by CAN bus interference was solved, ensuring reliable data transmission of the CAN bus.

CN122120053APending Publication Date: 2026-05-29HEFEI SUNSHINE POWER TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HEFEI SUNSHINE POWER TECH CO LTD
Filing Date
2024-11-22
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Electrostatic interference on the CAN bus can easily cause the CAN communication chip to switch from wake-up mode to low-power mode, resulting in interruption of data exchange and affecting communication reliability.

Method used

By monitoring the power supply voltage of the CAN communication chip and the common-mode voltage of the CAN bus, the chip's operating mode is determined in real time, and when a low-power mode is detected, it is configured back to wake-up mode to ensure normal communication.

Benefits of technology

It achieves reliable communication between the CAN communication chip and the bus under CAN bus interference, ensuring the continuity and reliability of data interaction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122120053A_ABST
    Figure CN122120053A_ABST
Patent Text Reader

Abstract

The application relates to a communication abnormality protection method and device, a system, a motor controller and a vehicle. The method comprises the following steps: acquiring a current time power supply voltage of a power supply end of a CAN communication chip, and acquiring a current time common mode voltage on a CAN bus, wherein the CAN communication chip is in communication connection with the CAN bus; determining a current working mode of the CAN communication chip according to the current time power supply voltage and the current time common mode voltage, and configuring a next time working mode of the CAN communication chip as a wake-up mode in the case that the determined current working mode is a low-power-consumption mode; thus, communication abnormality protection is realized, so that the CAN communication chip and the CAN bus can reliably communicate.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to a communication anomaly protection method and device, system, motor controller and vehicle. Background Technology

[0002] CAN (Controller Area Network) bus protocol is a multi-node communication protocol that is widely used in automotive electronic control systems, industrial automation, and other applications requiring multi-node communication.

[0003] However, when multiple communication nodes are connected to the CAN bus, interference such as static electricity can easily occur on the CAN bus. These interferences can cause the CAN communication chip at the node to switch from Normal mode (i.e., normal working mode, also known as wake-up mode) to Standby mode (i.e., low power mode). When the CAN communication chip switches to Standby mode, it will not send data to the CAN bus, causing the CAN bus to be unable to receive data from the CAN communication chip, thus affecting data interaction. Summary of the Invention

[0004] Therefore, it is necessary to provide a communication anomaly protection method, device, system, motor controller, and vehicle that can realize communication anomaly protection to ensure reliable communication between the CAN communication chip and the CAN bus, thereby addressing the above-mentioned technical problems.

[0005] Firstly, this application provides a method for protecting against communication anomalies, the method comprising:

[0006] Obtain the current power supply voltage at the power supply terminal of the CAN communication chip and the current common-mode voltage on the CAN bus, wherein the CAN communication chip is communicatively connected to the CAN bus;

[0007] Based on the current power supply voltage and the current common-mode voltage, the current operating mode of the CAN communication chip is determined, and if the determined current operating mode is a low-power mode, the operating mode of the CAN communication chip at the next moment is configured as a wake-up mode.

[0008] In one embodiment, determining the current operating mode of the CAN communication chip based on the current power supply voltage and the current common-mode voltage includes:

[0009] If the power supply voltage is greater than 0 at the current moment and the common-mode voltage is equal to 0 at the current moment, the current operating mode is determined to be the low-power mode.

[0010] In one embodiment, determining the current operating mode of the CAN communication chip based on the current power supply voltage and the current common-mode voltage includes:

[0011] Under the condition that the current power supply voltage is greater than 0 and the current common-mode voltage is equal to 0, read the current operating mode of the CAN communication chip;

[0012] If the current operating mode read is the low-power mode, then the current operating mode is determined to be the low-power mode.

[0013] In one embodiment, obtaining the current power supply voltage of the CAN communication chip's power supply terminal includes:

[0014] The current power supply voltage of the CAN communication chip is read from the power supply terminal of the first voltage monitoring circuit, wherein the first voltage monitoring circuit is connected to the power supply terminal of the CAN communication chip.

[0015] In one embodiment, obtaining the current common-mode voltage on the CAN bus includes:

[0016] The current common-mode voltage on the CAN bus is read from the second voltage monitoring circuit, wherein the second voltage monitoring circuit is connected to the CAN bus to which the CAN communication chip is connected.

[0017] In one embodiment, the method further includes:

[0018] If both the current power supply voltage and the current common-mode voltage are greater than 0, the operating mode of the CAN communication chip at the next moment will be configured as wake-up mode.

[0019] When the power supply voltage is equal to 0 at the current moment, the operating mode of the CAN communication chip at the next moment is configured to sleep mode.

[0020] Secondly, this application also provides a communication anomaly protection system, the system including a microcontroller unit, a CAN communication chip and a CAN bus, the microcontroller unit being communicatively connected to the CAN communication chip, the CAN communication chip being communicatively connected to the CAN bus, wherein the microcontroller unit is used to implement the steps of the method described in the first aspect.

[0021] In one embodiment, the system further includes a first voltage monitoring circuit and a second voltage monitoring circuit. The acquisition terminal of the first voltage monitoring circuit is connected to the power supply terminal of the CAN communication chip, and the output terminal of the first voltage monitoring circuit is connected to the microcontroller unit. The acquisition terminal of the second voltage monitoring circuit is connected to the CAN bus to which the CAN communication chip is connected, and the output terminal of the second voltage monitoring circuit is connected to the microcontroller unit.

[0022] Thirdly, this application also provides a motor controller, including the communication anomaly protection system as described in the second aspect.

[0023] Fourthly, this application also provides a vehicle including a motor controller as described in the third aspect.

[0024] Fifthly, this application also provides a communication anomaly protection device, the device comprising:

[0025] A voltage monitoring module is used to obtain the current power supply voltage at the power supply terminal of the CAN communication chip and the current common-mode voltage on the CAN bus, wherein the CAN communication chip is communicatively connected to the CAN bus.

[0026] An abnormal mode configuration module is used to determine the current operating mode of the CAN communication chip based on the current power supply voltage and the current common-mode voltage, and if the determined current operating mode is a low-power mode, configure the operating mode of the CAN communication chip to wake-up mode for the next moment.

[0027] In a sixth aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the method described in the first aspect.

[0028] In a seventh aspect, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.

[0029] Eighthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described in the first aspect.

[0030] The aforementioned communication anomaly protection method, device, system, motor controller, vehicle, computer-readable storage medium, and computer program product, during the communication process between the CAN communication chip and the CAN bus, the CAN communication chip should operate in wake-up mode. Based on this, the current power supply voltage at the power supply terminal of the CAN communication chip and the current common-mode voltage on the CAN bus are monitored. If, based on the current power supply voltage at the power supply terminal of the CAN communication chip and the current common-mode voltage on the CAN bus, it is determined that the current operating mode of the CAN communication chip is low-power mode, it indicates that the CAN communication chip has switched from wake-up mode to low-power mode due to interference or other factors on the CAN bus, resulting in a communication anomaly. In this case, the embodiments of this application can configure the operating mode of the CAN communication chip to wake-up mode at the next moment, that is, configure the operating mode of the CAN communication chip back from low-power mode to wake-up mode, so that the CAN communication chip continues to communicate normally with the CAN bus in wake-up mode. This ensures reliable communication between the CAN communication chip and the CAN bus, thus realizing communication anomaly protection. Attached Figure Description

[0031] To more clearly illustrate the technical solutions in the embodiments of this application or the conventional technology, the drawings used in the description of the embodiments or the conventional technology will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0032] Figure 1 This is a flowchart illustrating a communication anomaly protection method in one embodiment;

[0033] Figure 2 This is one of the flowcharts illustrating step S104 in one embodiment;

[0034] Figure 3 This is a second flowchart illustrating step S104 in one embodiment;

[0035] Figure 4 This is one of the flowcharts illustrating step S102 in one embodiment;

[0036] Figure 5 This is a schematic diagram of the connection of the first voltage monitoring circuit in one embodiment;

[0037] Figure 6 This is a second flowchart illustrating step S102 in one embodiment;

[0038] Figure 7 This is a schematic diagram of the connection of the second voltage monitoring circuit in one embodiment;

[0039] Figure 8 This is a schematic diagram of the internal structure of the motor controller in one embodiment;

[0040] Figure 9 This is a schematic diagram of a communication anomaly protection system in one embodiment;

[0041] Figure 10 This is a schematic diagram of a communication anomaly protection device in one embodiment. Detailed Implementation

[0042] To facilitate understanding of this application, a more complete description will be provided below with reference to the accompanying drawings, which illustrate embodiments of the present application. However, the present application can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided so that the disclosure of this application will be thorough and complete.

[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application.

[0044] It is understood that the terms "first," "second," etc., used herein may be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of this application, a first resistor may be referred to as a second resistor, and similarly, a second resistor may be referred to as a first resistor. Both the first resistor and the second resistor are resistors, but they are not the same resistor.

[0045] It is understood that the term "connection" in the following embodiments should be understood as "electrical connection," "communication connection," etc., if the connected circuits, modules, units, etc., have electrical signal or data transmission with each other.

[0046] It is understandable that "at least one" refers to one or more, and "multiple" refers to two or more. "At least a part of an element" refers to part or all of an element.

[0047] When used herein, the singular forms of “a,” “an,” and “the” may also include the plural forms unless the context clearly indicates otherwise. It should also be understood that the terms “comprising / including” or “having,” etc., specify the presence of the stated features, wholes, steps, operations, components, parts, or combinations thereof, but do not preclude the possibility of the presence or addition of one or more other features, wholes, steps, operations, components, parts, or combinations thereof. Meanwhile, the term “and / or” as used in this specification includes any and all combinations of the associated listed items.

[0048] The communication anomaly protection method provided in this application can be applied to scenarios where communication anomalies occur during the communication process between the CAN communication chip and the CAN bus. In an exemplary application scenario, the CAN communication chip is the CAN communication chip in the vehicle's motor controller, and the CAN bus is the CAN bus in the vehicle. For example, the microcontroller unit (MCU) in the vehicle's motor controller interacts with the CAN bus through the CAN communication chip.

[0049] In one exemplary embodiment, such as Figure 1 As shown, a communication anomaly protection method is provided. Taking the application of this method in the aforementioned vehicle application scenario as an example, the method includes the following steps S102~S104.

[0050] S102: Obtain the current power supply voltage at the power supply terminal of the CAN communication chip and the current common-mode voltage on the CAN bus. The CAN communication chip is connected to the CAN bus for communication.

[0051] The CAN bus is used for data exchange with the outside world. It's a serial communication protocol commonly used in automotive and industrial control fields, widely applied in automotive electronic systems, industrial automation equipment, and other scenarios requiring high reliability and real-time performance. The CAN bus uses differential signal transmission, enabling communication between multiple nodes. Each node can send and receive messages without interfering with the normal communication of other nodes. The CAN bus features high anti-interference capability, reliability, and flexibility, making it widely used in various complex systems. Common-mode voltage is a crucial parameter in the CAN bus. Common-mode voltage refers to the average voltage value between the two differential signals, CANH and CANL. Under normal circumstances, the common-mode voltage of CANH and CANL should be 2.5V.

[0052] The power supply voltage received at the INH terminal of the CAN communication chip is primarily used to power the CAN communication chip. The CAN communication chip can be connected to both high-speed and low-speed CAN signal lines. The communication signals between the CAN communication chip and the CAN bus can be the standard differential signals CANH and CANL.

[0053] It can collect the power supply voltage of the power supply terminal INH of the CAN communication chip and the common-mode voltage on the CAN bus in real time.

[0054] S104: Based on the current power supply voltage and the current common-mode voltage, determine the current operating mode of the CAN communication chip, and if the determined current operating mode is low-power mode, configure the operating mode of the CAN communication chip to wake-up mode for the next moment.

[0055] The CAN communication chip includes three operating modes: Normal mode (wake-up mode), Standby mode (low-power mode), and Sleep mode (sleep mode). The different operating modes of the CAN communication chip correspond to different power supply voltages at the power supply terminal INH and / or common-mode voltages on the CAN bus. In other words, different power supply voltages at the power supply terminal INH and / or common-mode voltages on the CAN bus correspond to different operating modes of the CAN communication chip. Therefore, the operating mode of the CAN communication chip can be determined in real time based on the real-time acquisition of the power supply voltage at the power supply terminal INH and the common-mode voltage on the CAN bus.

[0056] During the communication process between the CAN communication chip and the CAN bus, the CAN communication chip should operate in wake-up mode. The CAN communication chip sends data to or receives data from the CAN bus to achieve data interaction between the MCU and the CAN bus. Therefore, if it is determined that the current operating mode of the CAN communication chip is low-power mode, it means that the CAN communication chip has switched from wake-up mode to low-power mode due to factors such as interference on the CAN bus, resulting in communication abnormalities and affecting data interaction. In this case, this embodiment will configure the operating mode of the CAN communication chip to wake-up mode at the next moment, that is, configure the operating mode of the CAN communication chip back from low-power mode to wake-up mode, so that the CAN communication chip continues to communicate normally with the CAN bus in wake-up mode. This ensures reliable communication between the CAN communication chip and the CAN bus, and also realizes communication abnormality protection.

[0057] In one exemplary embodiment, such as Figure 2 As shown, step S104 determines the current operating mode of the CAN communication chip based on the current power supply voltage and the current common-mode voltage, including the following step S202.

[0058] S202: If the power supply voltage is greater than 0 and the common-mode voltage is equal to 0 at the current moment, determine that the current operating mode is low power mode.

[0059] In this embodiment, when the power supply voltage of the power supply terminal INH of the CAN communication chip is greater than 0, the power supply voltage of the power supply terminal INH is at a high level, indicating that the CAN communication chip is being powered; when the common-mode voltage of the CAN bus is equal to 0, it indicates that the CAN communication chip is not communicating normally with the CAN bus; therefore, when the power supply voltage of the power supply terminal INH of the CAN communication chip is greater than 0 and the common-mode voltage of the CAN bus is equal to 0, it can be determined that the operating mode of the CAN communication chip is low-power mode.

[0060] In one exemplary embodiment, such as Figure 3 As shown, step S104 determines the current operating mode of the CAN communication chip based on the current power supply voltage and the current common-mode voltage, including the following steps S302~S304.

[0061] S302 reads the current operating mode of the CAN communication chip when the current power supply voltage is greater than 0 and the current common-mode voltage is equal to 0.

[0062] S304 If the current operating mode read is low power mode, then the current operating mode is determined to be low power mode.

[0063] In this embodiment, when the power supply voltage of the CAN communication chip's power supply terminal INH is greater than 0 and the common-mode voltage of the CAN bus is equal to 0, the operating mode of the CAN communication chip can be initially determined to be a low-power mode. To further improve the accuracy of determining the operating mode, the current operating mode of the CAN communication chip can be read from the CAN communication chip. If the read current operating mode is also a low-power mode, it can be completely determined that the current operating mode is a low-power mode. If the read current operating mode is not a low-power mode, it indicates that there may be an error in voltage monitoring or voltage fluctuations. In this case, it can be completely determined that the current operating mode is not a low-power mode. This further improves the accuracy of determining the operating mode and thus further improves the reliability of communication anomaly protection.

[0064] In one exemplary embodiment, such as Figure 4 As shown, obtaining the current power supply voltage of the CAN communication chip's power supply terminal in step S102 includes the following steps S402.

[0065] S402, read the current power supply voltage of the CAN communication chip's power supply terminal collected by the first voltage monitoring circuit, wherein the first voltage monitoring circuit is connected to the power supply terminal of the CAN communication chip.

[0066] In this embodiment, refer to Figure 5A dedicated first voltage monitoring circuit for acquiring the power supply voltage of the CAN communication chip can be set up at the power supply terminal INH. This first voltage monitoring circuit can be constructed using sampling resistors or GPIO (General Purpose Input / Output) digital sampling units; the specific structure of the first voltage monitoring circuit is not specifically limited here. By reading the power supply voltage of the CAN communication chip's power supply terminal INH acquired by the first voltage monitoring circuit, the power supply voltage of the CAN communication chip's power supply terminal INH can be obtained.

[0067] In one exemplary embodiment, such as Figure 6 As shown, obtaining the current common-mode voltage on the CAN bus in step S102 includes the following steps S602.

[0068] S602 reads the current common-mode voltage on the CAN bus collected by the second voltage monitoring circuit, wherein the second voltage monitoring circuit is connected to the CAN bus to which the CAN communication chip is connected.

[0069] In this embodiment, refer to Figure 7 This can be achieved by setting up a second voltage monitoring circuit on the CAN bus specifically for acquiring its common-mode voltage. This second voltage monitoring circuit can be constructed using sampling resistors or GPIO (General Purpose Input / Output) digital sampling units; the specific structure of the second voltage monitoring circuit is not specifically limited here. By reading the common-mode voltage on the CAN bus acquired by the second voltage monitoring circuit, the common-mode voltage on the CAN bus can be obtained.

[0070] In an exemplary embodiment, the communication anomaly protection method provided in this application further includes: when both the power supply voltage and the common-mode voltage at the current moment are greater than 0, configuring the operating mode of the CAN communication chip at the next moment to wake-up mode; and when the power supply voltage at the current moment is equal to 0, configuring the operating mode of the CAN communication chip at the next moment to sleep mode.

[0071] In this embodiment, when the power supply voltage of the CAN communication chip's power supply terminal INH is greater than 0, the power supply voltage of the power supply terminal INH is at a high level, indicating that the CAN communication chip is being powered. When the common-mode voltage of the CAN bus is greater than 0, it indicates that the CAN communication chip is communicating normally with the CAN bus. Therefore, when both the power supply voltage of the CAN communication chip's power supply terminal INH and the common-mode voltage of the CAN bus are greater than 0, the operating mode of the CAN communication chip can be determined and configured as wake-up mode. Conversely, when the power supply voltage of the CAN communication chip's power supply terminal IN is equal to 0, the power supply voltage of the power supply terminal INH is at a low level, indicating that the CAN communication chip is not being powered, and the operating mode of the CAN communication chip can be determined and configured as sleep mode.

[0072] The following is combined with Figure 1 and Figure 8 Taking the communication anomaly protection method provided in this application embodiment as an example applied to the aforementioned vehicle application scenario, the communication anomaly protection method will be further illustrated with an example:

[0073] The MCU is the microcontroller unit in the vehicle's motor controller; KL30 is the external input power supply for the motor controller; the step-down module is used to convert the higher voltage of the power supply KL30 to a lower voltage Vcc, which is used to power the MCU; in addition, the CAN bus communication interface can also be equipped with an EMC (Electromagnetic Compatibility) protection module.

[0074] The vehicle controller sends specific frame messages via the CAN bus. After receiving the specific frame message, the CAN communication chip controls the switch module to turn on, so that the power supply KL30 supplies power to the CAN communication chip through the power supply terminal INH and sets the power supply terminal INH high. On the other hand, it supplies power to the MCU through the step-down module. After the MCU and the CAN communication chip are powered on, the MCU configures the working mode of the CAN communication chip to wake-up mode through the SPI interface, so as to realize data interaction with the CAN bus through the CAN communication chip. At this time, the common mode voltage on the CAN bus is 2.5V.

[0075] As mentioned above, during the communication process between the CAN communication chip and the CAN bus, the CAN communication chip should operate in wake-up mode. The CAN communication chip sends data to or receives data from the CAN bus to enable data interaction between the MCU and the CAN bus. During this period, if the first voltage monitoring circuit detects that the power supply voltage of the power supply terminal INH is greater than 0 (i.e., the power supply terminal INH is set high), but the second voltage monitoring circuit detects that the common-mode voltage on the CAN bus is equal to 0, it is initially determined that the CAN communication chip has switched from wake-up mode to low-power mode due to interference on the CAN bus, resulting in communication abnormalities and affecting data interaction. To further improve the accuracy of determining the working mode, the MCU further reads the current working mode of the CAN communication chip. If the current working mode read is also low-power mode, the MCU can completely determine that the current working mode is low-power mode. At this time, in this embodiment, the MCU will configure the working mode of the CAN communication chip to wake-up mode for the next moment, that is, configure the working mode of the CAN communication chip from low-power mode back to wake-up mode, so that the CAN communication chip continues to communicate normally with the CAN bus in wake-up mode. This ensures reliable communication between the CAN communication chip and the CAN bus, that is, communication abnormality protection is realized.

[0076] Furthermore, when the vehicle controller stops sending specific frame messages via the CAN bus, the CAN communication chip cannot receive specific frame messages, the CAN communication chip control switch module is turned off, the power supply voltage of the power supply terminal INH is equal to 0, that is, the power supply terminal INH is set low, the CAN communication chip is powered off, the MCU is also powered off, and the MCU configures the working mode of the CAN communication chip to sleep mode through the SPI interface.

[0077] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0078] Based on the same inventive concept, this application also provides a communication anomaly protection system. The communication anomaly protection system and communication anomaly protection method provided in this application can solve the same technical problem and achieve the same technical effect. Repeated content will not be repeated.

[0079] In one exemplary embodiment, such as Figure 9 As shown, a communication anomaly protection system is provided. The system includes a microcontroller unit (MCU) 910, a CAN communication chip 920, and a CAN bus 930. The microcontroller unit 910 is communicatively connected to the CAN communication chip 920, and the CAN communication chip 920 is communicatively connected to the CAN bus 930. The microcontroller unit 910 is used to implement the communication anomaly protection method described in any of the above embodiments.

[0080] In one exemplary embodiment, reference is made to Figure 8 The communication anomaly protection system also includes a first voltage monitoring circuit and a second voltage monitoring circuit. The acquisition end of the first voltage monitoring circuit is connected to the power supply terminal INH of the CAN communication chip 920, and the output end of the first voltage monitoring circuit is connected to the microcontroller unit 910. The acquisition end of the second voltage monitoring circuit is connected to the CAN bus 930 to which the CAN communication chip 920 is connected, and the output end of the second voltage monitoring circuit is connected to the microcontroller unit 910.

[0081] Based on the same inventive concept, this application also provides a motor controller, which includes the communication anomaly protection system provided in any of the above embodiments. The motor controller and communication anomaly protection method provided in this application can solve the same technical problem and achieve the same technical effect, and the repeated content will not be described again.

[0082] Based on the same inventive concept, this application also provides a vehicle, which includes a motor controller as provided in the above embodiments. The vehicle and communication anomaly protection method provided in this application can solve the same technical problem and achieve the same technical effect. Repeated content will not be repeated.

[0083] Based on the same inventive concept, this application also provides a communication anomaly protection device for implementing the communication anomaly protection method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations in one or more communication anomaly protection device embodiments provided below can be found in the limitations of the communication anomaly protection method described above, and will not be repeated here.

[0084] In one exemplary embodiment, such as Figure 10 As shown, a communication anomaly protection device is provided, comprising:

[0085] The voltage monitoring module 1010 is used to obtain the current power supply voltage at the power supply terminal of the CAN communication chip and the current common-mode voltage on the CAN bus. The CAN communication chip is connected to the CAN bus for communication.

[0086] The abnormal mode configuration module 1020 is used to determine the current operating mode of the CAN communication chip based on the current power supply voltage and the current common mode voltage, and if the determined current operating mode is low power mode, configure the operating mode of the CAN communication chip to wake-up mode in the next moment.

[0087] In an exemplary embodiment, the voltage monitoring module 1010 is further configured to read the current power supply voltage of the power supply terminal of the CAN communication chip acquired by the first voltage monitoring circuit, wherein the first voltage monitoring circuit is connected to the power supply terminal of the CAN communication chip.

[0088] In an exemplary embodiment, the voltage monitoring module 1010 is further configured to read the current common-mode voltage on the CAN bus acquired by the second voltage monitoring circuit, wherein the second voltage monitoring circuit is connected to the CAN bus to which the CAN communication chip is connected.

[0089] In an exemplary embodiment, the abnormal mode configuration module 1020 is further configured to determine that the current operating mode is a low-power mode when the current power supply voltage is greater than 0 and the current common-mode voltage is equal to 0.

[0090] In an exemplary embodiment, the abnormal mode configuration module 1020 is further configured to read the current operating mode of the CAN communication chip when the current power supply voltage is greater than 0 and the current common mode voltage is equal to 0; if the read current operating mode is a low power mode, then the current operating mode is determined to be a low power mode.

[0091] In an exemplary embodiment, the abnormal mode configuration module 1020 is further configured to configure the working mode of the CAN communication chip to wake-up mode when both the power supply voltage and the common-mode voltage are greater than 0 at the current moment; and to configure the working mode of the CAN communication chip to sleep mode when the power supply voltage is equal to 0 at the current moment.

[0092] Each module in the aforementioned communication anomaly protection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0093] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the communication anomaly protection method provided in any of the above embodiments.

[0094] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the communication anomaly protection method as provided in any of the above embodiments.

[0095] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the communication anomaly protection method as provided in any of the above embodiments.

[0096] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.

[0097] In the description of this specification, references to terms such as "some embodiments," "other embodiments," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative descriptions of the above terms do not necessarily refer to the same embodiments or examples.

[0098] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0099] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for protecting against communication anomalies, characterized in that, The method includes: Obtain the current power supply voltage at the power supply terminal of the CAN communication chip and the current common-mode voltage on the CAN bus, wherein the CAN communication chip is communicatively connected to the CAN bus; Based on the current power supply voltage and the current common-mode voltage, the current operating mode of the CAN communication chip is determined, and if the determined current operating mode is a low-power mode, the operating mode of the CAN communication chip at the next moment is configured as a wake-up mode.

2. The method according to claim 1, characterized in that, Determining the current operating mode of the CAN communication chip based on the current power supply voltage and the current common-mode voltage includes: If the power supply voltage is greater than 0 at the current moment and the common-mode voltage is equal to 0 at the current moment, the current operating mode is determined to be the low-power mode.

3. The method according to claim 1, characterized in that, Determining the current operating mode of the CAN communication chip based on the current power supply voltage and the current common-mode voltage includes: Under the condition that the current power supply voltage is greater than 0 and the current common-mode voltage is equal to 0, read the current operating mode of the CAN communication chip; If the current operating mode read is the low-power mode, then the current operating mode is determined to be the low-power mode.

4. The method according to claim 1, characterized in that, The step of obtaining the current power supply voltage at the power supply terminal of the CAN communication chip includes: The current power supply voltage of the CAN communication chip is read from the power supply terminal of the first voltage monitoring circuit, wherein the first voltage monitoring circuit is connected to the power supply terminal of the CAN communication chip.

5. The method according to claim 1, characterized in that, The process of obtaining the current common-mode voltage on the CAN bus includes: The current common-mode voltage on the CAN bus is read from the second voltage monitoring circuit, wherein the second voltage monitoring circuit is connected to the CAN bus to which the CAN communication chip is connected.

6. The method according to any one of claims 1-5, characterized in that, The method further includes: If both the current power supply voltage and the current common-mode voltage are greater than 0, the operating mode of the CAN communication chip at the next moment will be configured as wake-up mode. When the power supply voltage is equal to 0 at the current moment, the operating mode of the CAN communication chip at the next moment is configured to sleep mode.

7. A communication anomaly protection system, characterized in that, The system includes a microcontroller unit, a CAN communication chip, and a CAN bus. The microcontroller unit is communicatively connected to the CAN communication chip, and the CAN communication chip is communicatively connected to the CAN bus. The microcontroller unit is used to implement the steps of the method according to any one of claims 1 to 6.

8. The system according to claim 7, characterized in that, The system further includes a first voltage monitoring circuit and a second voltage monitoring circuit. The acquisition terminal of the first voltage monitoring circuit is connected to the power supply terminal of the CAN communication chip, and the output terminal of the first voltage monitoring circuit is connected to the microcontroller unit. The acquisition terminal of the second voltage monitoring circuit is connected to the CAN bus to which the CAN communication chip is connected, and the output terminal of the second voltage monitoring circuit is connected to the microcontroller unit.

9. A motor controller, characterized in that, Includes the communication anomaly protection system as described in claim 7 or 8.

10. A vehicle, characterized in that, Includes the motor controller as described in claim 9.

11. A communication anomaly protection device, characterized in that, The device includes: A voltage monitoring module is used to obtain the current power supply voltage at the power supply terminal of the CAN communication chip and the current common-mode voltage on the CAN bus, wherein the CAN communication chip is communicatively connected to the CAN bus. An abnormal mode configuration module is used to determine the current operating mode of the CAN communication chip based on the current power supply voltage and the current common-mode voltage, and if the determined current operating mode is a low-power mode, configure the operating mode of the CAN communication chip to wake-up mode for the next moment.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.