Communication Method, Device, Electronic Device and Medium Compatible with Multiple CAN Transceivers

By reading and comparing the parameters of the control chip and CAN transceiver, determining the matching read and write register driver, the problem of different CAN transceivers needing to reconfigure the software drivers is solved, achieving compatibility and cost-effectiveness.

CN116633382BActive Publication Date: 2025-07-25BEIJING ELECTRIC VEHICLE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310507800.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-08
Publication Date
2025-07-25
Estimated Expiration
2043-05-08

AI Technical Summary

Technical Problem

In the prior art, software drivers need to be reconfigured when selecting different CAN transceivers, resulting in high development and maintenance costs and it is difficult to achieve compatibility of the same version of software drivers.

Method used

By reading the parameters of the target control chip, obtaining preset multiple read and write register drivers, comparing and determining the read and write register drivers matching the target CAN transceiver, and realizing data transmission between the target control chip and the target CAN transceiver.

Benefits of technology

No need to reconfigure software drivers, it can be compatible with multiple CAN transceivers, reduce development and maintenance costs, and improve system operation efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116633382B_ABST
    Figure CN116633382B_ABST
Patent Text Reader

Abstract

The present application provides a communication method, device, electronic device and medium compatible with multiple CAN transceivers. The method includes: reading a first parameter of a target control chip; obtaining M read-write register driver programs preset, and respectively obtaining a second parameter of a target CAN transceiver based on each read-write register driver program to obtain M second parameters, where one read-write register driver program corresponds to one type of CAN transceiver; comparing the first parameter with the M second parameters to obtain a target second parameter that matches the first parameter, and the M second parameters include the target second parameter; determining the read-write register driver program corresponding to the target second parameter as the target read-write register driver program, where the target read-write register driver program is used to drive data transmission between the target control chip and the target CAN transceiver.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of wireless communication technologies, and in particular, to a communication method, device, electronic device, and medium compatible with multiple CAN transceivers. Background Art

[0002] The in-vehicle network bus management function enables the nodes of vehicle electronic control units (ECUs) to sleep and wake up orderly. For an ECU to support the network management function, it needs to have software logic that supports network wake-up, and the controller area network (CAN) transceiver also needs to have the network wake-up function to convert the communication signals of the ECU into CAN bus signals. Currently, although multiple CAN transceivers support the network wake-up function, the usage methods of different CAN transceivers are different. Therefore, when different CAN transceivers are selected, the software driver program needs to be reconfigured for this CAN transceiver, and the same version of the software driver program is difficult to be compatible, resulting in high development and maintenance costs. Summary of the Invention

[0003] Embodiments of the present application provide a communication method, device, electronic device, and medium compatible with multiple CAN transceivers, which can solve the problems in the prior art that when different CAN transceivers are selected, the software driver program needs to be reconfigured for this CAN transceiver, the same version of the software driver program is difficult to be compatible, and the development and maintenance costs are high.

[0004] To solve the above technical problems, the present application is implemented as follows:

[0005] In a first aspect, embodiments of the present application provide a communication method compatible with multiple controller area network (CAN) transceivers, which is applied to an in-vehicle network bus management system. The in-vehicle network bus management system includes N control chips and CAN transceivers corresponding to the N control chips one by one. The method includes:

[0006] Reading a first parameter of a target control chip, where the target control chip is any one of the N control chips;

[0007] Obtaining M read / write register driver programs preset, and respectively obtaining second parameters of the target CAN transceiver based on each of the read / write register driver programs to obtain M second parameters, where the target CAN transceiver is the CAN transceiver corresponding to the target control chip, one read / write register driver program corresponds to one type of CAN transceiver, and M is an integer greater than 1;

[0008] Compare the first parameter with the M second parameters to obtain a target second parameter that matches the first parameter, where the M second parameters include the target second parameter;

[0009] Determine the read / write register driver corresponding to the target second parameter as the target read / write register driver, where the target read / write register driver is used to drive data transmission between the target control chip and the target CAN transceiver.

[0010] Optionally, before reading the first parameter of the target control chip, it further includes:

[0011] Perform a system initialization operation on the in-vehicle network bus management system;

[0012] Configure and connect a preset pin on the target control chip to the corresponding target CAN transceiver through the Serial Peripheral Interface (SPI), and set a third parameter of the SPI, where the third parameter includes the baud rate.

[0013] Optionally, reading the first parameter of the target control chip includes:

[0014] Call a preset register in the target control chip;

[0015] Read the first parameter of the target control chip based on the preset register;

[0016] Wherein, the first parameter includes electrical parameters, physical parameters, the model of the preset register, and the first address of the target control chip.

[0017] Optionally, after determining the read / write register driver corresponding to the target second parameter as the target read / write register driver, it further includes:

[0018] In the case of network wake-up of the in-vehicle network bus management system, obtain a fourth parameter of the control chip to be woken up, where the fourth parameter includes the second address of the control chip to be woken up;

[0019] Compare the target second parameter determined based on the target read / write register driver with the fourth parameter;

[0020] In the case where the first address included in the target second parameter is the same as the second address included in the fourth parameter, wake up the target control chip corresponding to the second address.

[0021] Second aspect, an embodiment of the present application provides a communication device compatible with multiple Controller Area Network (CAN) transceivers, which is applied to a vehicle network bus management system. The vehicle network bus management system includes N control chips and CAN transceivers corresponding to the N control chips one by one. The device includes:

[0022] A first acquisition module, configured to read a first parameter of a target control chip, where the target control chip is any one of the N control chips;

[0023] A second acquisition module, configured to acquire M read / write register driver programs preset, and respectively acquire second parameters of the target CAN transceiver based on each of the read / write register driver programs, obtaining M second parameters. The target CAN transceiver is the CAN transceiver corresponding to the target control chip, one read / write register driver program corresponds to one type of CAN transceiver, and M is an integer greater than 1;

[0024] A comparison module, configured to compare the first parameter and the M second parameters, and acquire a target second parameter that matches the first parameter. The M second parameters include the target second parameter;

[0025] A determination module, configured to determine the read / write register driver program corresponding to the target second parameter as the target read / write register driver program, where the target read / write register driver program is used to drive data transmission between the target control chip and the target CAN transceiver.

[0026] Third aspect, an embodiment of the present application further provides an electronic device, including: a processor, a memory, and a program stored on the memory and executable on the processor. When the program is executed by the processor, the steps of the communication method compatible with multiple CAN transceivers described in the first aspect are implemented.

[0027] Fourth aspect, an embodiment of the present application further provides a readable storage medium, on which a program is stored. When the program is executed by a processor, the steps of the communication method compatible with multiple CAN transceivers described in the first aspect are implemented.

[0028] In an embodiment of the present application, a communication method compatible with multiple Controller Area Network (CAN) transceivers is provided. This method can be applied to an in-vehicle network bus management system, which includes N pairs of corresponding control chips and CAN transceivers. By reading the first parameter of the target control chip and then obtaining the second parameter of each CAN transceiver through each read / write register driver in the target CAN transceiver, and comparing the first parameter with each second parameter, the target read / write register driver corresponding to the target control chip can be determined. In this way, the communication between the target chip and the target CAN transceiver can be carried out through the target read / write register driver. When network wake-up is performed, the communication signal of the control chip can be communicated through the determined target CAN transceiver. For this CAN transceiver, there is no need to reconfigure the software driver system, and this CAN transceiver can be compatible with each read / write register driver, facilitating the development and maintenance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for describing the embodiments of the present application will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0030] Figure 1 is one of the flow diagrams of a communication method compatible with a CAN transceiver provided by an embodiment of the present application;

[0031] Figure 2 is Figure 1 a schematic diagram of the improvement points of a communication method compatible with a CAN transceiver provided in [reference] compared with the prior art;

[0032] Figure 3 is the second flow diagram of a communication method compatible with a CAN transceiver provided by an embodiment of the present application;

[0033] Figure 4 is the structural diagram of a communication device compatible with a CAN transceiver provided by an embodiment of the present application;

[0034] Figure 5 is the structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0035] The following will clearly describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all of them. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0036] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally means an "or" relationship between the associated objects before and after.

[0037] The following will, with reference to the accompanying drawings, detail a communication method, device, electronic device, and medium compatible with a CAN transceiver provided by the embodiments of the present application through specific embodiments and their application scenarios.

[0038] See Figure 1 , Figure 1 is one of the flowchart diagrams of a communication method compatible with a CAN transceiver provided by the embodiments of the present application. As Figure 1 shown, this method is applied to an in-vehicle network bus management system. The in-vehicle network bus management system includes N control chips and CAN transceivers corresponding to the N control chips one by one, and specifically includes the following steps:

[0039] Step 101, read the first parameter of the target control chip, where the target control chip is any one of the N control chips.

[0040] It is worth mentioning that the control chip in the present application can be an electronic control unit (ECU), or other control structures capable of performing control logic processing and sending application messages to the CAN bus. The above target control chip can be one of the control chips in the in-vehicle network management bus. The target control chip is correspondingly connected to a CAN transceiver, which is the target CAN transceiver. The CAN transceiver can serve as an interface between the control chip and the physical bus, converting the logic level of the control chip into the differential level of the CAN bus and transmitting data on two bus cables with differential voltages.

[0041] In the above steps, by reading the first parameter of the target control chip, the communication rule or command of the target control chip can be determined. Based on this, the first parameter is transmitted to the CAN transceiver that can receive and match this type of rule, so that the target control chip and the target CAN transceiver are corresponding. In this way, when there is a demand for the target control chip, the target control chip can be woken up through the target CAN transceiver, forming a high-speed and synchronous transmission channel.

[0042] Step 102: Obtain the preset M read / write register driver programs, and respectively obtain the second parameter of the target CAN transceiver based on each of the read / write register driver programs, obtaining M second parameters. Wherein, the target CAN transceiver is the CAN transceiver corresponding to the target control chip, one read / write register driver program corresponds to one type of CAN transceiver, and M is an integer greater than 1.

[0043] It should be noted that the embodiment of the present application is directed to the problem that it is difficult for the control chip to communicate with the CAN transceiver of different models, and it is necessary to reconfigure the register read / write driver program corresponding to this type of CAN transceiver. By presetting the read / write register driver programs of each model for the target CAN transceiver, a software version can be made compatible with multiple types of CAN transceivers. Please refer to Figure 2 , for example, the relationship between the existing CAN transceiver and the control chip is that 3 types of CAN transceivers require 3 hardware settings and 3 software settings. However, in the present application, by presetting the read / write register driver programs of each model such as TCAN, TJA, and UJC, writing TJA_1146_ReadReg(), and being ready at any time for the target CAN transceiver to call this read / write register. Finally, only 1 hardware setting and 1 software setting are required for 3 types of CAN transceivers.

[0044] In addition, since each read / write register driver program corresponds to one type of CAN transceiver, it is necessary to determine the register driver program of the target CAN transceiver corresponding to the target control chip. This can be achieved by determining the second parameter corresponding to each register driver program, and identifying the read / write register driver program required for the specific CAN transceiver to communicate with the control chip through the second parameter. In this way, various types of CAN transceivers can be made compatible through the preset read / write register driver programs corresponding to each type of CAN transceiver. After replacing different CAN transceivers, there is no need to configure the driver program for this type, which can reduce the development and maintenance costs and improve the system operation efficiency.

[0045] Step 103: Compare the first parameter and the M second parameters, and obtain the target second parameter that matches the first parameter. The M second parameters include the target second parameter.

[0046] In this step, based on the first parameter of the obtained target control chip and the second parameter corresponding to each register driver, the first parameter and the second parameter are compared and matched. The comparison and matching between the first parameter and the second parameter can specifically be that the rule corresponding to the first parameter is the same as the rule corresponding to the second parameter, or the instruction setting of the first parameter is the same as the instruction setting of the second parameter.

[0047] Step 104: Determine the read / write register driver corresponding to the target second parameter as the target read / write register driver, where the target read / write register driver is used to drive data transmission between the target control chip and the target CAN transceiver.

[0048] In a specific implementation, the target second parameter can represent the specific applicable rules of the read / write register driver in a type of CAN transceiver. When the first parameter matches the target second parameter, it can be determined that the read / write register driver corresponding to the target second parameter can drive the wake-up of the target control chip. When communication is required, it can transmit communication signals to the target control chip and also receive the communication signals sent by the target control chip to the CAN bus. In this way, the read / write register driver corresponding to the target second parameter can be used as the target read / write register driver to drive data transmission between the target control chip and the target CAN transceiver. Even if different types of CAN transceivers are replaced, through the specific method of the embodiments of the present application, a communication channel can be established between the target control chip and the target CAN transceiver, and the target read / write register driver in the replaced CAN transceiver can be determined. Therefore, the present application can be compatible with different models of CAN transceivers, and the communication connection to the control chip can be realized through the CAN transceiver.

[0049] Optionally, before reading the first parameter of the target control chip, it further includes:

[0050] Perform a system initialization operation on the in-vehicle network bus management system;

[0051] Configure and connect a preset pin on the target control chip to the corresponding target CAN transceiver through the Serial Peripheral Interface (SPI), and set a third parameter of the SPI, where the third parameter includes the baud rate.

[0052] In a specific implementation, first, an initialization operation is performed on the in-vehicle network bus management system to facilitate the configuration and identification between the subsequent control chip and its corresponding CAN transceiver, reduce the interference of other operations, and improve the identification and communication efficiency. In addition, configuring the corresponding target control chip and target CAN transceiver includes two aspects: on the one hand, in terms of hardware settings, each control chip can select the same pin to connect to the Serial Peripheral Interface (SPI). Four consistent lines are occupied on the pins of each control chip. In this way, the control chip uses SPI configuration, which can save pins, save space for the Printed Circuit Board (PCB) where it is located, and can also provide a high-speed and synchronous communication channel. On the other hand, in terms of software settings, the communication channel between the control chip and its corresponding CAN transceiver can transmit communication signals quickly and synchronously by configuring the SPI parameters between them. For example, by configuring the baud rate of SPI, the rate of transmitting symbols between the control chip and its corresponding CAN transceiver can be preset, which is convenient for the subsequent identification between the target control chip and its corresponding target CAN transceiver and for waking up in time after identification.

[0053] Optionally, the reading of the first parameter of the target control chip includes:

[0054] Invoking the preset register in the target control chip;

[0055] Reading the first parameter of the target control chip based on the preset register;

[0056] Wherein, the first parameter includes electrical parameters, physical parameters, the model of the preset register, and the first address of the target control chip.

[0057] It should be noted that the acquisition of the first parameter of the above-mentioned target control chip can be based on the preset register built in the target control chip. By invoking this preset register, the first parameter related to this target control chip can be obtained. This first parameter can be the parameter information included in the Datasheet of the control chip, specifically, it can be the pin configuration, electrical parameters, physical parameters, etc. of the control chip. Since the factory configurations of different control chips are different, their Datasheet contents are different, and their specific characteristic specifications are also different, a CAN transceiver suitable for the corresponding control chip is required. Therefore, the CAN transceiver needs to invoke a read-write register driver program that can match this control chip to achieve the communication transfer between this control chip and the CAN transceiver.

[0058] Optionally, after determining that the read / write register driver corresponding to the target second parameter is the target read / write register driver, the method further includes:

[0059] When the in-vehicle network bus management system wakes up the network, obtain a fourth parameter of the control chip to be woken up, where the fourth parameter includes a second address of the control chip to be woken up;

[0060] Compare the target second parameter determined based on the target read / write register driver with the fourth parameter;

[0061] When the first address included in the target second parameter is the same as the second address included in the fourth parameter, wake up the target control chip corresponding to the second address.

[0062] It is worth mentioning that the network wake-up management in this application is set for the consideration of power saving of new energy vehicles. Since all electronic control units on new energy vehicles communicate with each other through CAN bus, Ethernet, etc., network management is to achieve coordinated sleep or wake-up of each ECU on the network of each ECU by setting fixed rules or commands. Sleep when there is no communication requirement and wake up when communication is needed, which is convenient for saving the battery power of new energy vehicles. In addition, when the vehicle has a demand for the ECU, the CAN transceiver can be woken up at any time to receive the vehicle's message and send the application message of the ECU.

[0063] In a specific implementation, after the target control chip and the target CAN transceiver establish a communication connection, when the vehicle needs to wake up the target control chip, the fourth parameter of the target control chip can be transmitted, and the fourth parameter can specifically be the second address of the target control chip. Subsequently, the fourth parameter can be given to the CAN bus, and the CAN bus sends this second address to each CAN transceiver. Each CAN transceiver identifies whether this second address is associated with the target second parameter of the target read / write register driver inside it. If the comparison result between the target second parameter determined by the target read / write register driver and the fourth parameter shows a match, at this time, it can be determined that the target control chip to be woken up is the control chip corresponding to the target read / write register driver, and the target control chip can be directly woken up through the target CAN transceiver. In this way, the wake-up of the target control chip is completed. Therefore, by setting the target read / write register driver in this application, it is possible to achieve compatible connection and configuration of control chips between different models of CAN transceivers, which is convenient for production management and control and reduces the development and maintenance costs.

[0064] Please refer specifically to Figure 3 , Figure 3FIG. 2 is a second schematic flowchart of a communication method compatible with a CAN transceiver provided by an embodiment of the present application. The method specifically includes the following steps:

[0065] Step 201, perform a system initialization operation on the in-vehicle network bus management system;

[0066] Step 202, configure and connect a preset pin on the target control chip to the corresponding target CAN transceiver through a Serial Peripheral Interface (SPI), and set a third parameter of the SPI;

[0067] Step 203, read a first parameter of the target control chip;

[0068] Step 204, obtain M read / write register driver programs preset in the target CAN transceiver, and respectively obtain a second parameter of the target CAN transceiver based on each of the read / write register driver programs to obtain M second parameters;

[0069] Step 205, compare the first parameter with the M second parameters, and obtain a target second parameter that matches the first parameter;

[0070] Step 206, determine the read / write register driver program corresponding to the target second parameter as the target read / write register driver program.

[0071] In the above specific embodiment, it is a specific process of establishing a communication connection between a target control chip and its corresponding target CAN transceiver in the in-vehicle network bus management system, and waking up the target control chip by transmitting a wake-up signal through the target CAN transceiver. For specific implementation, reference can be made to the foregoing embodiments, and details are not elaborated herein. Thus, the embodiment of the present application enables the control chip to identify and communicate with different models of CAN transceivers, select and determine the corresponding target read / write register driver program, without the need to re-develop software programs, facilitating the wake-up control of the control chip, improving the operation efficiency of the entire vehicle, and reducing the costs of production management and development maintenance.

[0072] An embodiment of the present application further provides a communication device compatible with multiple Controller Area Network (CAN) transceivers, which is applied to an in-vehicle network bus management system. The in-vehicle network bus management system includes N control chips and CAN transceivers corresponding to the N control chips one by one. As Figure 4 shown, the device specifically includes:

[0073] A first acquisition module 301, configured to read a first parameter of a target control chip, where the target control chip is any one of the N control chips;

[0074] A second acquisition module 302, configured to acquire M pre-set read / write register drivers, and respectively acquire second parameters of the target CAN transceiver based on each of the read / write register drivers, so as to obtain M second parameters, where the target CAN transceiver is the CAN transceiver corresponding to the target control chip, one read / write register driver corresponds to one type of CAN transceiver, and M is an integer greater than 1;

[0075] A comparison module 303, configured to compare the first parameter with the M second parameters, and acquire a target second parameter that matches the first parameter, where the M second parameters include the target second parameter;

[0076] A determination module 304, configured to determine the read / write register driver corresponding to the target second parameter as the target read / write register driver, where the target read / write register driver is used to drive data transmission between the target control chip and the target CAN transceiver.

[0077] Optionally, the device further includes a connection configuration module, and the connection configuration module is configured to:

[0078] Perform a system initialization operation on the in-vehicle network bus management system;

[0079] Configure and connect a preset pin on the target control chip to the corresponding target CAN transceiver through a Serial Peripheral Interface (SPI), and set a third parameter of the SPI, where the third parameter includes a baud rate.

[0080] Optionally, the first acquisition module 301 is configured to:

[0081] Call a preset register in the target control chip;

[0082] Read a first parameter of the target control chip based on the preset register;

[0083] Wherein, the first parameter includes an electrical parameter, a physical parameter, a model of the preset register, and a first address of the target control chip.

[0084] Optionally, the determination module 304 is further configured to:

[0085] In the case that the in-vehicle network bus management system undergoes network wake-up, acquire a fourth parameter of the control chip to be woken up, where the fourth parameter includes a second address of the control chip to be woken up;

[0086] Compare the target second parameter determined based on the target read / write register driver with the fourth parameter;

[0087] When the first address included in the target second parameter is the same as the second address included in the fourth parameter, wake up the target control chip corresponding to the second address.

[0088] It should be understood that when the communication device compatible with multiple Controller Area Network (CAN) transceivers in the embodiments of the present application runs, it can implement each process in the above-mentioned embodiments of the communication method compatible with multiple Controller Area Network (CAN) transceivers, and can achieve the beneficial effects in the above-mentioned embodiments. To avoid repetition, it will not be elaborated here.

[0089] See Figure 5 , the embodiments of the present application further provide an electronic device 400, including a processor 401, a memory 402, and a computer program stored on the memory 402 and executable on the processor 401. When the computer program is executed by the processor 401, it implements each process in the above-mentioned embodiments of the communication method compatible with multiple Controller Area Network (CAN) transceivers, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0090] The embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements each process in the above-mentioned embodiments of the communication method compatible with multiple Controller Area Network (CAN) transceivers, and can achieve the same technical effects. To avoid repetition, it will not be elaborated here. Among them, the computer-readable storage medium can be, for example, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disc, etc.

[0091] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "illustrative embodiments", "preferred embodiments", "specific implementation manners", or "preferred implementation manners" etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic descriptions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.

[0092] The above is the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the principle described in the present invention, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of the present invention.

Claims

1. A communication method compatible with multiple Controller Area Network (CAN) transceivers, applied to an in-vehicle network bus management system. The in-vehicle network bus management system includes N control chips and CAN transceivers corresponding to the N control chips one by one, characterized in that, The method includes: Reading a first parameter of a target control chip, where the target control chip is any one of the N control chips; Obtaining M preset read / write register driver programs, and respectively obtaining second parameters of a target CAN transceiver based on each of the read / write register driver programs, to obtain M second parameters, where the target CAN transceiver is the CAN transceiver corresponding to the target control chip, one read / write register driver program corresponds to one type of CAN transceiver, and M is an integer greater than 1; Comparing the first parameter with the M second parameters, and obtaining a target second parameter that matches the first parameter, where the M second parameters include the target second parameter; Determining the read / write register driver program corresponding to the target second parameter as a target read / write register driver program, where the target read / write register driver program is used to drive data transmission between the target control chip and the target CAN transceiver.

2. The method according to claim 1, characterized in that Before reading the first parameter of the target control chip, it further includes: Performing a system initialization operation on the in-vehicle network bus management system; Configuring and connecting a preset pin on the target control chip to the corresponding target CAN transceiver through a Serial Peripheral Interface (SPI), and setting a third parameter of the SPI, where the third parameter includes a baud rate.

3. The method according to claim 1, characterized in that, The reading of the first parameter of the target control chip includes: Invoking a preset register in the target control chip; Reading the first parameter of the target control chip based on the preset register; Wherein, the first parameter includes an electrical parameter, a physical parameter, the model of the preset register, and the first address of the target control chip.

4. The method according to claim 3, wherein After determining the read / write register driver program corresponding to the target second parameter as the target read / write register driver program, it further includes: When the in-vehicle network bus management system wakes up the network, obtaining a fourth parameter of the control chip to be woken up, where the fourth parameter includes the second address of the control chip to be woken up; Comparing the target second parameter determined based on the target read / write register driver program with the fourth parameter; When the first address included in the target second parameter is the same as the second address included in the fourth parameter, waking up the target control chip corresponding to the second address.

5. A communication device compatible with multiple Controller Area Network (CAN) transceivers, which is applied to an in-vehicle network bus management system. The in-vehicle network bus management system includes N control chips and CAN transceivers corresponding to the N control chips one by one, and is characterized in that, The device includes: A first acquisition module, configured to read a first parameter of a target control chip, where the target control chip is any one of the N control chips; A second acquisition module, configured to obtain M preset read / write register driver programs, and respectively obtain second parameters of a target CAN transceiver based on each of the read / write register driver programs, to obtain M second parameters, where the target CAN transceiver is the CAN transceiver corresponding to the target control chip, one read / write register driver program corresponds to one type of CAN transceiver, and M is an integer greater than 1; A comparison module, configured to compare the first parameter and the M second parameters, and obtain a target second parameter that matches the first parameter, where the M second parameters include the target second parameter; A determination module, configured to determine that the read-write register driver corresponding to the target second parameter is a target read-write register driver, where the target read-write register driver is used to drive data transmission between the target control chip and the target CAN transceiver.

6. The device according to claim 5, characterized in that, The device further includes a connection configuration module, and the connection configuration module is configured to: Perform a system initialization operation on the in-vehicle network bus management system; Configure and connect a preset pin on the target control chip to the corresponding target CAN transceiver through a Serial Peripheral Interface (SPI), and set a third parameter of the SPI, where the third parameter includes a baud rate.

7. The device according to claim 5, characterized in that The first acquisition module is configured to: Call a preset register in the target control chip; Read a first parameter of the target control chip based on the preset register; Wherein, the first parameter includes an electrical parameter, a physical parameter, a model of the preset register, and a first address of the target control chip.

8. The device according to claim 7, wherein The determination module is further configured to: In the case where the in-vehicle network bus management system wakes up the network, obtain a fourth parameter of the control chip to be woken up, where the fourth parameter includes a second address of the control chip to be woken up; Compare the target second parameter determined based on the target read-write register driver and the fourth parameter; In the case where the first address included in the target second parameter is the same as the second address included in the fourth parameter, wake up the target control chip corresponding to the second address.

9. An electronic device, characterized in that, including: A processor, a memory, and a program stored on the memory and executable on the processor, where when the program is executed by the processor, the steps of the communication method for compatible with multiple CAN transceivers according to any one of claims 1 to 4 are implemented.

10. A readable storage medium, characterized in that, A program is stored on the readable storage medium, and when the program is executed by the processor, the steps of the communication method for compatible with multiple CAN transceivers according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Diagnosis equipment, diagnosis request processing method and computer readable storage medium

    CN108445860A

  • Vehicle control unti data process system

    CN205103653U