[go: up one dir, main page]

CN116633382A - Communication method, device, electronic equipment and medium compatible with various CAN transceivers - Google Patents

Communication method, device, electronic equipment and medium compatible with various CAN transceivers Download PDF

Info

Publication number
CN116633382A
CN116633382A CN202310507800.1A CN202310507800A CN116633382A CN 116633382 A CN116633382 A CN 116633382A CN 202310507800 A CN202310507800 A CN 202310507800A CN 116633382 A CN116633382 A CN 116633382A
Authority
CN
China
Prior art keywords
target
parameter
control chip
read
write register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310507800.1A
Other languages
Chinese (zh)
Other versions
CN116633382B (en
Inventor
王晓媛
孟江涛
肖胜然
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Electric Vehicle Co Ltd
Original Assignee
Beijing Electric Vehicle Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Electric Vehicle Co Ltd filed Critical Beijing Electric Vehicle Co Ltd
Priority to CN202310507800.1A priority Critical patent/CN116633382B/en
Publication of CN116633382A publication Critical patent/CN116633382A/en
Application granted granted Critical
Publication of CN116633382B publication Critical patent/CN116633382B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B1/00Details of transmission systems, not covered by a single one of groups H04B3/00 - H04B13/00; Details of transmission systems not characterised by the medium used for transmission
    • H04B1/38Transceivers, i.e. devices in which transmitter and receiver form a structural unit and in which at least one part is used for functions of transmitting and receiving
    • H04B1/40Circuits
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40208Bus networks characterized by the use of a particular bus standard
    • H04L2012/40215Controller Area Network CAN
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/40273Bus for use in transportation systems the transportation system being a vehicle
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Communication Control (AREA)

Abstract

The application provides a communication method, a device, electronic equipment and a medium compatible with a plurality of CAN transceivers, wherein the method comprises the following steps: reading a first parameter of a target control chip; acquiring preset M read-write register driving programs, and acquiring second parameters of a target CAN transceiver based on each read-write register driving program respectively to acquire M second parameters, wherein one read-write register driving program corresponds to one CAN transceiver; comparing the first parameter with M second parameters, and obtaining a target second parameter matched with the first parameter, wherein the M second parameters comprise the target second parameter; and determining a read-write register driver corresponding to the target second parameter as a target read-write register driver, wherein the target read-write register driver is used for driving data transmission between a target control chip and a target CAN transceiver.

Description

兼容多种CAN收发器的通信方法、装置、电子设备及介质Communication method, device, electronic equipment and medium compatible with various CAN transceivers

技术领域technical field

本发明涉及无线通信技术领域,尤其涉及一种兼容多种CAN收发器的通信方法、装置、电子设备及介质。The invention relates to the technical field of wireless communication, in particular to a communication method, device, electronic equipment and medium compatible with various CAN transceivers.

背景技术Background technique

车载网络总线管理功能能够使车辆电子控制器单元(Electronic Control Unit,ECU)的节点有序地睡眠和唤醒。而ECU支持网络管理功能需要拥有支持网络唤醒的软件逻辑,还需要控制器局域网总线(Controller Area Network,CAN)收发器具备网络唤醒功能,将ECU的通讯信号转化成CAN总线信号。目前,虽然多种CAN收发器均支持网络唤醒功能,但不同的CAN收发器的使用方法不相同。因此在选用不同的CAN收发器时,针对此CAN收发器需要重新配置软件驱动程序,同一版软件驱动程序难以兼容,开发维护成本较高。The vehicle network bus management function enables the nodes of the vehicle Electronic Control Unit (ECU) to sleep and wake up in an orderly manner. The ECU’s network management function requires software logic that supports network wake-up, and the Controller Area Network (CAN) transceiver has the network wake-up function, which converts the ECU’s communication signals into CAN bus signals. At present, although various CAN transceivers support the wake-on-lan function, different CAN transceivers have different usage methods. Therefore, when selecting different CAN transceivers, the software driver needs to be reconfigured for this CAN transceiver. The same version of the software driver is difficult to be compatible, and the development and maintenance costs are relatively high.

发明内容Contents of the invention

本申请实施例提供了一种兼容多种CAN收发器的通信方法、装置、电子设备及介质,能够解决现有技术在选用不同的CAN收发器时,针对此CAN收发器需要重新配置软件驱动程序,同一版软件驱动程序难以兼容,开发维护成本较高的问题。The embodiment of the present application provides a communication method, device, electronic equipment and medium compatible with multiple CAN transceivers, which can solve the problem of reconfiguring the software driver for the CAN transceiver when different CAN transceivers are selected in the prior art , the same version of software drivers is difficult to be compatible, and the development and maintenance costs are relatively high.

为了解决上述技术问题,本申请是这样实现的:In order to solve the above-mentioned technical problems, the application is implemented as follows:

第一方面,本申请实施例提供了一种兼容多种控制器局域网总线CAN收发器的通信方法,应用于车载网络总线管理系统,所述车载网络总线管理系统包括N个控制芯片和与所述N个控制芯片一一对应的CAN收发器,该方法包括:In the first aspect, the embodiment of the present application provides a communication method compatible with various controller area network bus CAN transceivers, which is applied to a vehicle-mounted network bus management system, and the vehicle-mounted network bus management system includes N control chips and the N control chips one-to-one corresponding CAN transceiver, the method includes:

读取目标控制芯片的第一参数,其中,所述目标控制芯片为所述N个控制芯片中的任一个;Reading the first parameter of the target control chip, wherein the target control chip is any one of the N control chips;

获取预置的M个读写寄存器驱动程序,分别基于每个所述读写寄存器驱动程序获取所述目标CAN收发器的第二参数,得到M个第二参数,其中,所述目标CAN收发器为所述目标控制芯片对应的CAN收发器,一个所述读写寄存器驱动程序对应一种CAN收发器,M为大于1的整数;Obtaining preset M read-write register drivers, respectively obtaining second parameters of the target CAN transceiver based on each of the read-write register drivers, and obtaining M second parameters, wherein the target CAN transceiver For the CAN transceiver corresponding to the target control chip, one of the read-write register drivers corresponds to a CAN transceiver, and M is an integer greater than 1;

比对所述第一参数和所述M个第二参数,获取与所述第一参数匹配的目标第二参数,所述M个第二参数包括所述目标第二参数;comparing the first parameter and the M second parameters to obtain a target second parameter matching the first parameter, the M second parameters including the target second parameter;

确定所述目标第二参数对应的所述读写寄存器驱动程序为所述目标读写寄存器驱动程序,其中,所述目标读写寄存器驱动程序用于驱动所述目标控制芯片与所述目标CAN收发器之间的数据传输。It is determined that the read-write register driver corresponding to the target second parameter is the target read-write register driver, wherein the target read-write register driver is used to drive the target control chip to transmit and receive with the target CAN Data transmission between devices.

可选地,所述读取所述目标控制芯片的第一参数之前,还包括:Optionally, before reading the first parameter of the target control chip, it also includes:

对所述车载网络总线管理系统进行系统初始化操作;Carry out system initialization operation to described vehicle-mounted network bus management system;

通过串行外围设备接口SPI配置连接所述目标控制芯片上的预设管脚与对应的所述目标CAN收发器,并设定所述SPI的第三参数,其中,所述第三参数包括波特率。Connect the preset pins on the target control chip to the corresponding target CAN transceiver through the serial peripheral interface SPI configuration, and set the third parameter of the SPI, wherein the third parameter includes wave special rate.

可选地,所述读取所述目标控制芯片的第一参数,包括:Optionally, the reading the first parameter of the target control chip includes:

调用所述目标控制芯片内的预置寄存器;calling the preset registers in the target control chip;

基于所述预置寄存器读取所述目标控制芯片的第一参数;reading 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.

可选地,所述确定所述目标第二参数对应的所述读写寄存器驱动程序为所述目标读写寄存器驱动程序之后,还包括: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:

在所述车载网络总线管理系统发生网络唤醒的情况下,获取待唤醒的所述控制芯片的第四参数,其中,所述第四参数包括待唤醒的所述控制芯片的第二地址;In the case of network wake-up occurring in the vehicle-mounted network bus management system, obtain a fourth parameter of the control chip to be woken up, wherein the fourth parameter includes a 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;

在所述目标第二参数包括的所述第一地址和所述第四参数包括的所述第二地址一致的情况下,唤醒所述第二地址对应的所述目标控制芯片。If the first address included in the target second parameter is consistent with the second address included in the fourth parameter, wake up the target control chip corresponding to the second address.

第二方面,本申请实施例提供了一种兼容多种控制器局域网总线CAN收发器的通信装置,应用于车载网络总线管理系统,所述车载网络总线管理系统包括N个控制芯片和与所述N个控制芯片一一对应的CAN收发器,该装置包括:In the second aspect, the embodiment of the present application provides a communication device compatible with various controller area network bus CAN transceivers, which is applied to a vehicle network bus management system, and the vehicle network bus management system includes N control chips and the N control chips one-to-one corresponding CAN transceiver, the device includes:

第一获取模块,用于读取目标控制芯片的第一参数,其中,所述目标控制芯片为所述N个控制芯片中的任一个;A first acquisition module, configured to read a first parameter of a target control chip, wherein the target control chip is any one of the N control chips;

第二获取模块,用于获取预置的M个读写寄存器驱动程序,分别基于每个所述读写寄存器驱动程序获取所述目标CAN收发器的第二参数,得到M个第二参数,其中,所述目标CAN收发器为所述目标控制芯片对应的CAN收发器,一个所述读写寄存器驱动程序对应一种CAN收发器,M为大于1的整数;The second acquiring module is used to acquire preset M read-write register drivers, obtain the second parameters of the target CAN transceiver based on each of the read-write register drivers respectively, and obtain M second parameters, wherein , the target CAN transceiver is the CAN transceiver corresponding to the target control chip, one read-write register driver corresponds to a CAN transceiver, and M is an integer greater than 1;

比对模块,用于比对所述第一参数和所述M个第二参数,获取与所述第一参数匹配的目标第二参数,所述M个第二参数包括所述目标第二参数;A comparison module, configured to compare the first parameter and the M second parameters, and obtain a target second parameter matching the first parameter, and the M second parameters include the target second parameter ;

确定模块,用于确定所述目标第二参数对应的所述读写寄存器驱动程序为所述目标读写寄存器驱动程序,其中,所述目标读写寄存器驱动程序用于驱动所述目标控制芯片与所述目标CAN收发器之间的数据传输。A determining module, configured to determine that the read-write register driver corresponding to the target second parameter is the target read-write register driver, wherein the target read-write register driver is used to drive the target control chip and Data transfer between the target CAN transceivers.

第三方面,本申请实施例还提供了一种电子设备,包括:处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序,所述程序被所述处理器执行时实现如第一方面中所述的兼容多种CAN收发器的通信方法的步骤。In the third aspect, the embodiment of the present application also provides an electronic device, including: a processor, a memory, and a program stored in the memory and operable on the processor, and the program is executed by the processor The step of implementing the communication method compatible with multiple CAN transceivers as described in the first aspect.

第四方面,本申请实施例还提供了一种可读存储介质,所述可读存储介质上存储有程序,所述程序被处理器执行时实现如第一方面中所述的兼容多种CAN收发器的通信方法的步骤。In the fourth aspect, the embodiment of the present application also provides a readable storage medium, on which a program is stored, and when the program is executed by a processor, it realizes compatibility with multiple CANs as described in the first aspect. The steps of the communication method of the transceiver.

在本申请实施例中提供了一种兼容多种控制器局域网总线CAN收发器的通信方法,该方法能够应用于车载网络总线管理系统,该系统包括N对一一对应的控制芯片和CAN收发器。通过读取目标控制芯片的第一参数,再通过目标CAN收发器内的每一个读写寄存器驱动程序获取该CAN收发器的第二参数,将第一参数和每一个第二参数进行比较,能够确定该目标控制芯片所对应的目标读写寄存器驱动程序。这样,目标芯片和目标CAN收发器之间的通信可以通过该目标读写寄存器驱动程序进行,当进行网络唤醒时,能够将控制芯片的通讯信号通过该确定的目标CAN收发器进行通信。针对该CAN收发器无需重新配置软件驱动系统,该CAN收发器能够兼容每一种读写寄存器驱动程序,便于系统的开发和维护。In the embodiment of the present application, a communication method compatible with various controller area network bus CAN transceivers is provided, which can be applied to the vehicle network bus management system, and the system includes N-to-one corresponding control chips and CAN transceivers . By reading the first parameter of the target control chip, and then obtaining the second parameter of the CAN transceiver through each read-write register driver in the target CAN transceiver, the first parameter is compared with each second parameter, which can Determine the target read-write register driver corresponding to the target control chip. 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, and when the network wakes up, the communication signal of the control chip can be communicated through the determined target CAN transceiver. There is no need to reconfigure the software driver system for the CAN transceiver, and the CAN transceiver is compatible with every read-write register driver, which is convenient for system development and maintenance.

附图说明Description of drawings

为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获取其他的附图。In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that need to be used in the description of 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 skilled in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1是本申请实施例提供的一种兼容CAN收发器的通信方法的流程示意图之一;Fig. 1 is one of the flow diagrams of a communication method compatible with a CAN transceiver provided by the embodiment of the present application;

图2是图1中提供的一种兼容CAN收发器的通信方法相较于现有技术的改进点的示意图;Fig. 2 is a schematic diagram of improvements of a communication method compatible with a CAN transceiver provided in Fig. 1 compared with the prior art;

图3是本申请实施例提供的一种兼容CAN收发器的通信方法的流程示意图之二;FIG. 3 is the second schematic flow diagram of a communication method compatible with a CAN transceiver provided by an embodiment of the present application;

图4是本申请实施例提供的一种兼容CAN收发器的通信装置的结构示意图;FIG. 4 is a schematic structural diagram of a communication device compatible with a CAN transceiver provided by an embodiment of the present application;

图5是本申请实施例提供的一种电子设备的结构示意图。Fig. 5 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.

具体实施方式Detailed ways

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。The following will clearly describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, but not all of them. All other embodiments obtained by persons of ordinary skill in the art based on the embodiments in this application belong to the protection scope of this application.

本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It should be understood that the terms so used are interchangeable under appropriate circumstances such that the embodiments of the application can be practiced in sequences other than those illustrated or described herein, and that references to "first," "second," etc. distinguish Objects are generally of one type, and the number of objects is not limited. For example, there may be one or more first objects. In addition, "and/or" in the specification and claims means at least one of the connected objects, and the character "/" generally means that the related objects are an "or" relationship.

下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的一种兼容CAN收发器的通信方法、装置、电子设备及介质进行详细地说明。A CAN transceiver-compatible communication method, device, electronic device, and medium provided in the embodiments of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.

参见图1,图1是本申请实施例提供的一种兼容CAN收发器的通信方法的流程图示意图之一,如图1所示,该方法应用于车载网络总线管理系统,所述车载网络总线管理系统包括N个控制芯片和与所述N个控制芯片一一对应的CAN收发器,具体包括以下步骤:Referring to Fig. 1, Fig. 1 is one of the flowchart diagrams of a communication method compatible with CAN transceivers provided in the embodiment of the present application. As shown in Fig. 1, the method is applied to a vehicle network bus management system, and the vehicle network bus The management system includes N control chips and CAN transceivers corresponding to the N control chips one by one, specifically including the following steps:

步骤101、读取目标控制芯片的第一参数,其中,所述目标控制芯片为所述N个控制芯片中的任一个。Step 101. Read a first parameter of a target control chip, wherein the target control chip is any one of the N control chips.

值得一提的是,本申请中的控制芯片可以是电子控制单元ECU,也可以是其他能够进行控制逻辑处理、发送应用报文给CAN总线的控制结构。上述目标控制芯片可以为车载网络管理总线其中的一个控制芯片,目标控制芯片对应连接有一个CAN收发器,即为目标CAN收发器。CAN收发器能够作为控制芯片和物理总线之间的接口,将控制芯片的逻辑电平转换为CAN总线的差分电平,在两条有差分电压的总线电缆上传输数据。It is worth mentioning that the control chip in this 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-mentioned target control chip can be one of the control chips in the vehicle network management bus, and the target control chip is correspondingly connected with a CAN transceiver, that is, the target CAN transceiver. The CAN transceiver can be used as the interface between the control chip and the physical bus, convert the logic level of the control chip into the differential level of the CAN bus, and transmit data on two bus cables with differential voltages.

在上述步骤中,通过读取目标控制芯片的第一参数,能够确定该目标控制芯片的通信规则或者命令,基于此第一参数传到给能够接收匹配该种类规则的CAN收发器,使得目标控制芯片和目标CAN收发器对应起来。这样,在收到对目标控制芯片的需求时,能够通过目标CAN收发器将目标控制芯片进行唤醒,形成高速、同步的传输通道。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, and based on the first parameter, it is transmitted to the CAN transceiver that can receive the matching rule of this type, so that the target control The chip corresponds to the target CAN transceiver. In this way, when the demand for the target control chip is received, the target control chip can be woken up through the target CAN transceiver to form a high-speed, synchronous transmission channel.

步骤102、获取预置的M个读写寄存器驱动程序,分别基于每个所述读写寄存器驱动程序获取所述目标CAN收发器的第二参数,得到M个第二参数,其中,所述目标CAN收发器为所述目标控制芯片对应的CAN收发器,一个所述读写寄存器驱动程序对应一种CAN收发器,M为大于1的整数。Step 102, obtain preset M read-write register drivers, respectively obtain the second parameters of the target CAN transceiver based on each of the read-write register drivers, and obtain M second parameters, wherein the target The CAN transceiver is the CAN transceiver corresponding to the target control chip, one read-write register driver corresponds to a CAN transceiver, and M is an integer greater than 1.

值得注意的是,本申请实施例是针对适用不同型号的CAN收发器,控制芯片难以与该CAN收发器之间进行通信,需要重新配置该类型的CAN收发器对应的寄存器读写驱动程序的问题。针对目标CAN收发器预置各个型号的读写寄存器驱动程序,实现一个软件版本能够兼容多种类的型号的CAN收发器。请参考图2,例如,在现有CAN收发器和控制芯片之间的关系是3种型号的CAN收发器需要3种硬件设置和3种软件设置,而本申请通过预置TCAN、TJA、UJC等各个型号CAN收发器的读写寄存器驱动程序,写入TJA_1146_ReadReg(),随时准备目标CAN收发器对该读写寄存器的调用,最后,3种型号的CAN收发器只需要1种硬件设置和1个软件设置即可。It is worth noting that the embodiment of this application is aimed at the application of different types of CAN transceivers. It is difficult for the control chip to communicate with the CAN transceiver, and it is necessary to reconfigure the register read and write driver corresponding to this type of CAN transceiver. . Preset read and write register drivers of various models for the target CAN transceiver, and implement a software version that is compatible with multiple types of CAN transceivers. Please refer to Figure 2, for example, the relationship between existing CAN transceivers and control chips is that 3 types of CAN transceivers require 3 hardware settings and 3 software settings, and this application pre-sets TCAN, TJA, UJC Wait for the read-write register driver program of each type of CAN transceiver, write TJA_1146_ReadReg(), and prepare the call of the read-write register by the target CAN transceiver at any time. Finally, the 3 types of CAN transceivers only need 1 hardware setting and 1 software settings.

另外,由于每一个读写寄存器驱动程序均对应了一种类型的CAN收发器,需要确定将目标控制芯片对应的该目标CAN收发器的寄存器驱动程序,可以通过确定每一个寄存器驱动程序对应的第二参数,通过第二参数识别具体的CAN收发器能够和控制芯片进行通信所需的读写寄存器驱动程序。这样,能够通过预置的各类型CAN收发器对应的读写寄存器驱动程序兼容各种类的CAN收发器,在替换了不同的CAN收发器之后,无需针对该种类配置驱动程序,能够减少开发维护成本,提高系统运行效率。In addition, since each read-write register driver corresponds to a type of CAN transceiver, it is necessary to determine the register driver of the target CAN transceiver corresponding to the target control chip, which can be determined by determining the first register driver corresponding to each register driver. Two parameters, through the second parameter to identify the read and write register driver required by the specific CAN transceiver to communicate with the control chip. In this way, the preset read and write register drivers corresponding to various types of CAN transceivers can be compatible with various types of CAN transceivers. After replacing different CAN transceivers, there is no need to configure drivers for this type, which can reduce development and maintenance. cost and improve system efficiency.

步骤103、比对所述第一参数和所述M个第二参数,获取与所述第一参数匹配的目标第二参数,所述M个第二参数包括所述目标第二参数。Step 103: Compare the first parameter and the M second parameters, and obtain a target second parameter matching the first parameter, and the M second parameters include the target second parameter.

在本步骤中,基于前述获取的目标控制芯片的第一参数和每一个寄存器驱动程序对应的第二参数,将该第一参数和第二参数进行比较匹配。而第一参数和第二参数之间的比较匹配具体可以是第一参数对应的规则设置于第二参数对应的规则设置一致,也可以是第一参数的指令设定于第二参数的指令设定一致。In this step, based on the obtained first parameter of the 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 may specifically be that the rule setting corresponding to the first parameter is consistent with the rule setting corresponding to the second parameter, or that the instruction setting of the first parameter is consistent with the instruction setting of the second parameter. be consistent.

步骤104、确定所述目标第二参数对应的所述读写寄存器驱动程序为所述目标读写寄存器驱动程序,其中,所述目标读写寄存器驱动程序用于驱动所述目标控制芯片与所述目标CAN收发器之间的数据传输。Step 104: Determine that the read-write register driver corresponding to the target second parameter is the target read-write register driver, wherein the target read-write register driver is used to drive the target control chip and the Data transfer between target CAN transceivers.

在具体实施中,目标第二参数可以表示一类型的CAN收发器内的读写寄存器驱动程序的具体适用规则,而当第一参数与目标第二参数发生匹配时,能够确定该目标第二参数对应的读写寄存器驱动程序能够驱动唤醒目标控制芯片,在需要进行通信时,能够传递通讯信号给目标控制芯片,也能够接收目标控制芯片发送的通讯信号给CAN总线,这样,目标第二参数对应的读写寄存器驱动程序作为目标读写寄存器驱动程序能够驱动目标控制芯片与目标CAN收发器之间的数据传输。即便替换不同类型的CAN收发器,通过本申请实施例的具体方法可以在目标控制芯片和目标CAN收发器之间建立起通信通道,能够确定替换后的CAN收发器中的目标读写寄存器驱动程序,由此本申请能够兼容不同型号的CAN收发器,通过该CAN收发器实现对控制芯片的通信连接。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, and when the first parameter matches the target second parameter, the target second parameter can be determined The corresponding read-write register driver can drive and wake up the target control chip. When communication is required, it can transmit the communication signal to the target control chip, and can also receive the communication signal sent by the target control chip to the CAN bus. In this way, the second parameter of the target corresponds to The read-write register driver as the target read-write register driver can drive the data transmission between the target control chip and the target CAN transceiver. Even if different types of CAN transceivers are replaced, a communication channel can be established between the target control chip and the target CAN transceiver through the specific method of the embodiment of the present application, and the target read-write register driver in the replaced CAN transceiver can be determined Therefore, the present application can be compatible with different types of CAN transceivers, and the communication connection to the control chip can be realized through the CAN transceivers.

可选地,所述读取所述目标控制芯片的第一参数之前,还包括:Optionally, before reading the first parameter of the target control chip, it also includes:

对所述车载网络总线管理系统进行系统初始化操作;Carry out system initialization operation to described vehicle-mounted network bus management system;

通过串行外围设备接口SPI配置连接所述目标控制芯片上的预设管脚与对应的所述目标CAN收发器,并设定所述SPI的第三参数,其中,所述第三参数包括波特率。Connect the preset pins on the target control chip to the corresponding target CAN transceiver through the serial peripheral interface SPI configuration, and set the third parameter of the SPI, wherein the third parameter includes wave special rate.

在具体实施中,首先对车载网络总线管理系统进行初始化操作,便于后续控制芯片和其对应的CAN收发器之间进行配置和识别,减少其他操作的干扰,提高识别通信效率。另外,配置一一对应的目标控制芯片和目标CAN收发器包括两方面内容:一方面,在硬件设置上,每一个控制芯片可以选用一致的管脚连接串行外围设备接口(Serial PeripheralInterface,SPI),在每一个控制芯片的管脚上占用一致的四根线。这样,控制芯片采用SPI配置,能够节约管脚,为所在的印制电路板(Printed Circuit Board,PCB)节省空间,也能够提供高速、同步的通信通道。另一方面,在软件设置上,可以通过配置控制芯片与其对应的CAN收发器之间的SPI的参数,使得控制芯片和CAN收发器之间的通信通道能够快速、同步传递通讯信号,例如,配置SPI的波特率,能够预先设定控制芯片与其对应的CAN收发器之间传输符号的速率,便于后续目标控制芯片和其对应的目标CAN收发器之间进行识别,以及识别之后及时进行唤醒。In the specific implementation, first, the vehicle network bus management system is initialized 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 efficiency of identification and communication. In addition, configuring one-to-one correspondence between the target control chip and the target CAN transceiver includes two aspects: On the one hand, in terms of hardware settings, each control chip can use consistent pins to connect to the Serial Peripheral Interface (SPI) , occupy four consistent wires on the pins of each control chip. In this way, the control chip adopts SPI configuration, which can save pins, save space for a printed circuit board (PCB) where it is located, and can also provide a high-speed, synchronous communication channel. On the other hand, in terms of software settings, by configuring the parameters of the SPI between the control chip and its corresponding CAN transceiver, the communication channel between the control chip and the CAN transceiver can transmit communication signals quickly and synchronously, for example, configure The baud rate of SPI can pre-set the rate of symbol transmission between the control chip and its corresponding CAN transceiver, which facilitates identification between the subsequent target control chip and its corresponding target CAN transceiver, and wakes up in time after identification.

可选地,所述读取所述目标控制芯片的第一参数,包括:Optionally, the reading the first parameter of the target control chip includes:

调用所述目标控制芯片内的预置寄存器;calling the preset registers in the target control chip;

基于所述预置寄存器读取所述目标控制芯片的第一参数;reading 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.

需要说明的是,上述目标控制芯片的第一参数的获取可以基于目标控制芯片内置的预置寄存器,通过调用该预置寄存器能够获取与该目标控制芯片相关的第一参数,该第一参数可以是控制芯片的规格说明书(Datasheet)内包含的参数信息,具体可以是该控制芯片的引脚配置、电性参数、物理参数等。由于不同的控制芯片的出厂配置不相同,其Datasheet内容不同,具体的特性规格也不相同,需要适用与该控制芯片对应的CAN收发器。因此,CAN收发器需要调用能够与该控制芯片匹配的读写寄存器驱动程序,才能实现该控制芯片与CAN收发器之间的通信传递。It should be noted that the acquisition of the first parameter of the above-mentioned target control chip can be based on the built-in preset register of the target control chip, and the first parameter related to the target control chip can be obtained by calling the preset register, and the first parameter can be It is the parameter information included in the specification sheet (Datasheet) of the control chip, specifically, it may be the pin configuration, electrical parameters, physical parameters, etc. of the control chip. Since the factory configuration of different control chips is different, the datasheet content is different, and the specific characteristic specifications are also different, so it is necessary to apply the CAN transceiver corresponding to the control chip. Therefore, the CAN transceiver needs to call the read-write register driver that can match the control chip, so as to realize the communication between the control chip and the CAN transceiver.

可选地,所述确定所述目标第二参数对应的所述读写寄存器驱动程序为所述目标读写寄存器驱动程序之后,还包括: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:

在所述车载网络总线管理系统发生网络唤醒的情况下,获取待唤醒的所述控制芯片的第四参数,其中,所述第四参数包括待唤醒的所述控制芯片的第二地址;In the case of network wake-up occurring in the vehicle-mounted network bus management system, obtain a fourth parameter of the control chip to be woken up, wherein the fourth parameter includes a 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;

在所述目标第二参数包括的所述第一地址和所述第四参数包括的所述第二地址一致的情况下,唤醒所述第二地址对应的所述目标控制芯片。If the first address included in the target second parameter is consistent with the second address included in the fourth parameter, wake up the target control chip corresponding to the second address.

值得一提的是,本申请中进行网络唤醒管理是出于对新能源汽车省电的考虑设置的,由于新能源汽车上所有的电子控制单元之间会通过CAN总线、以太网等方式进行相互通信,而网络管理就是在各个ECU的网络上,通过设定固定的规则或者命令,来实现各个ECU的协同睡眠或唤醒。在没有通信需求的时候进行睡眠,在需要通信的时候唤醒,便于节约新能源汽车的电池电量。此外,在整车对ECU有需求时,CAN收发器能够被随时唤醒,接收整车的报文,并发送ECU的应用报文。It is worth mentioning that the network wake-up management in this application is set out of the consideration of power saving for new energy vehicles, because all electronic control units on new energy vehicles will communicate with each other through CAN bus, Ethernet, etc. Communication, and network management is to realize the cooperative sleep or wake-up of each ECU by setting fixed rules or commands on the network of each ECU. Sleeping when there is no need for communication, and waking up when communication is required, is convenient for saving battery power of new energy vehicles. In addition, when the vehicle needs the ECU, the CAN transceiver can be woken up at any time, receive the message of the vehicle, and send the application message of the ECU.

在具体实施中,在目标控制芯片和目标CAN收发器建立通信连接之后,当整车需要对目标控制芯片进行唤醒时,可以传递该目标控制芯片的第四参数,该第四参数具体可以是该目标控制芯片的第二地址。随后,可以将该第四参数给CAN总线,CAN总线将此第二地址发送给各个CAN收发器,每个CAN收发器识别是否该第二地址与其内部的目标读写寄存器驱动程序的目标第二参数存在关联,若该目标读写寄存器驱动程序确定的目标第二参数与该第四参数之间的比对结果显示相匹配,此时,则能够确定需要唤醒的目标控制芯片是该目标读写寄存器驱动程序对应的控制芯片,通过该目标CAN收发器直接对该目标控制芯片进行唤醒,这样,就完成了对目标控制芯片的唤醒。由此,本申请通过设置目标读写寄存器驱动程序,能够实现在不同型号的CAN收发器之间兼容连接配置控制芯片,便于生产管控,降低开发维护成本。In a specific implementation, after the target control chip and the target CAN transceiver establish a communication connection, when the entire vehicle needs to wake up the target control chip, the fourth parameter of the target control chip can be transferred, and the fourth parameter can specifically be the The second address of the target control chip. Subsequently, the fourth parameter can be given to the CAN bus, and the CAN bus sends the second address to each CAN transceiver, and each CAN transceiver identifies whether the second address is second to the target address of the internal target read-write register driver. Parameters are associated, if the target second parameter determined by the target read-write register driver program matches the comparison result between the fourth parameter, at this time, it can be determined that the target control chip that needs to be woken up is the target read-write register driver. The control chip corresponding to the register driver directly wakes up the target control chip through the target CAN transceiver, thus completing the wake-up of the target control chip. Therefore, by setting the target read-write register driver, the application can realize the compatible connection and configuration control chip between different types of CAN transceivers, which facilitates production control and reduces development and maintenance costs.

请具体参考图3,图3是本申请实施例提供的一种兼容CAN收发器的通信方法的流程示意图之二,该方法具体包括以下步骤:Please refer to FIG. 3 in detail. FIG. 3 is the second schematic flow diagram of a communication method compatible with a CAN transceiver provided in the embodiment of the present application. The method specifically includes the following steps:

步骤201、对所述车载网络总线管理系统进行系统初始化操作;Step 201, performing a system initialization operation on the vehicle-mounted network bus management system;

步骤202、通过串行外围设备接口SPI配置连接所述目标控制芯片上的预设管脚与对应的所述目标CAN收发器,并设定所述SPI的第三参数;Step 202, configure and connect the preset pins on the target control chip with the corresponding target CAN transceiver through the serial peripheral interface SPI, and set the third parameter of the SPI;

步骤203、读取目标控制芯片的第一参数;Step 203, reading the first parameter of the target control chip;

步骤204、获取目标CAN收发器内预置的M个读写寄存器驱动程序,分别基于每个所述读写寄存器驱动程序获取所述目标CAN收发器的第二参数,得到M个第二参数;Step 204, obtaining the M read-write register drivers preset in the target CAN transceiver, and obtaining the second parameters of the target CAN transceiver based on each of the read-write register drivers respectively, to obtain M second parameters;

步骤205、比对所述第一参数和所述M个第二参数,获取与所述第一参数匹配的目标第二参数;Step 205, comparing the first parameter and the M second parameters, and obtaining a target second parameter matching the first parameter;

步骤206、确定所述目标第二参数对应的所述读写寄存器驱动程序为所述目标读写寄存器驱动程序。Step 206. Determine the read/write register driver corresponding to the target second parameter as the target read/write register driver.

在上述具体实施例中,是对车载网络总线管理系统中目标控制芯片与其对应的目标CAN收发器之间进行通信连接,并通过该目标CAN收发器传递唤醒信号对目标控制芯片进行唤醒的具体过程,具体实施可以参考前述实施例,在此不作过多赘述。由此,本申请实施例能够使得控制芯片对于不同型号的CAN收发器进行识别通信,选择确定对应的目标读写寄存器驱动程序,无需重新开发软件程序,便于对控制芯片进行唤醒控制,提升整车运行效率,降低生产管控和开发维护的成本。In the above-mentioned specific embodiments, the target control chip in the vehicle-mounted network bus management system is communicated with its corresponding target CAN transceiver, and the specific process of waking up the target control chip by transmitting a wake-up signal through the target CAN transceiver For specific implementation, reference may be made to the foregoing embodiments, and details are not repeated here. Thus, the embodiment of the present application can enable the control chip to identify and communicate with different types of CAN transceivers, select and determine the corresponding target read-write register driver, without re-development of software programs, which is convenient for wake-up control of the control chip and improves the overall vehicle performance. Operational efficiency, reducing the cost of production control and development and maintenance.

本申请实施例还提供一种兼容多种控制器局域网总线CAN收发器的通信装置,应用于车载网络总线管理系统,所述车载网络总线管理系统包括N个控制芯片和与所述N个控制芯片一一对应的CAN收发器,如图4所示,该装置具体包括:The embodiment of the present application also provides a communication device compatible with various controller local area network bus CAN transceivers, which is applied to a vehicle network bus management system, and the vehicle network bus management system includes N control chips and the N control chips One-to-one corresponding CAN transceiver, as shown in Figure 4, the device specifically includes:

第一获取模块301,用于读取目标控制芯片的第一参数,其中,所述目标控制芯片为所述N个控制芯片中的任一个;The first acquiring module 301 is configured to read the first parameter of the target control chip, wherein the target control chip is any one of the N control chips;

第二获取模块302,用于获取预置的M个读写寄存器驱动程序,分别基于每个所述读写寄存器驱动程序获取所述目标CAN收发器的第二参数,得到M个第二参数,其中,所述目标CAN收发器为所述目标控制芯片对应的CAN收发器,一个所述读写寄存器驱动程序对应一种CAN收发器,M为大于1的整数;The second acquiring module 302 is used to acquire preset M read-write register drivers, obtain the second parameters of the target CAN transceiver based on each of the read-write register drivers respectively, and obtain M second parameters, Wherein, the target CAN transceiver is a CAN transceiver corresponding to the target control chip, and one read-write register driver corresponds to a CAN transceiver, and M is an integer greater than 1;

比对模块303,用于比对所述第一参数和所述M个第二参数,获取与所述第一参数匹配的目标第二参数,所述M个第二参数包括所述目标第二参数;A comparing module 303, configured to compare the first parameter and the M second parameters, and obtain target second parameters that match the first parameters, and the M second parameters include the target second parameters. parameter;

确定模块304,用于确定所述目标第二参数对应的所述读写寄存器驱动程序为所述目标读写寄存器驱动程序,其中,所述目标读写寄存器驱动程序用于驱动所述目标控制芯片与所述目标CAN收发器之间的数据传输。A determining module 304, configured to determine that the read-write register driver corresponding to the target second parameter is the target read-write register driver, wherein the target read-write register driver is used to drive the target control chip Data transmission with the target CAN transceiver.

可选地,所述装置还包括连接配置模块,所述连接配置模块用于:Optionally, the device further includes a connection configuration module, and the connection configuration module is used for:

对所述车载网络总线管理系统进行系统初始化操作;Carry out system initialization operation to described vehicle-mounted network bus management system;

通过串行外围设备接口SPI配置连接所述目标控制芯片上的预设管脚与对应的所述目标CAN收发器,并设定所述SPI的第三参数,其中,所述第三参数包括波特率。Connect the preset pins on the target control chip to the corresponding target CAN transceiver through the serial peripheral interface SPI configuration, and set the third parameter of the SPI, wherein the third parameter includes wave special rate.

可选地,所述第一获取模块301用于:Optionally, the first obtaining module 301 is used for:

调用所述目标控制芯片内的预置寄存器;calling the preset registers in the target control chip;

基于所述预置寄存器读取所述目标控制芯片的第一参数;reading 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.

可选地,所述确定模块304还用于:Optionally, the determining module 304 is further configured to:

在所述车载网络总线管理系统发生网络唤醒的情况下,获取待唤醒的所述控制芯片的第四参数,其中,所述第四参数包括待唤醒的所述控制芯片的第二地址;In the case of network wake-up occurring in the vehicle-mounted network bus management system, obtain a fourth parameter of the control chip to be woken up, wherein the fourth parameter includes a 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;

在所述目标第二参数包括的所述第一地址和所述第四参数包括的所述第二地址一致的情况下,唤醒所述第二地址对应的所述目标控制芯片。If the first address included in the target second parameter is consistent with the second address included in the fourth parameter, wake up the target control chip corresponding to the second address.

应理解的是,本申请实施例中的一种兼容多种控制器局域网总线CAN收发器的通信装置运行时能够实现上述一种兼容多种控制器局域网总线CAN收发器的通信方法实施例中的各个过程,且能够达到上述实施例中的有益效果,为避免重复,这里不再赘述。It should be understood that a communication device compatible with various controller area network bus CAN transceivers in the embodiment of the present application can implement the above-mentioned communication method embodiment compatible with various controller area network bus CAN transceivers during operation. Each process, and can achieve the beneficial effects in the above embodiments, in order to avoid repetition, no more details are given here.

参见图5,本申请实施例还提供一种电子设备400,包括处理器401,存储器402,存储在存储器402上并可在所述处理器401上运行的计算机程序,该计算机程序被处理器401执行时实现上述一种兼容多种控制器局域网总线CAN收发器的通信方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Referring to FIG. 5 , the embodiment of the present application also provides an electronic device 400, including a processor 401, a memory 402, and a computer program stored in the memory 402 and operable on the processor 401. The computer program is executed by the processor 401 During execution, each process of the above-mentioned embodiment of a communication method compatible with multiple CAN transceivers can be realized, and the same technical effect can be achieved. In order to avoid repetition, details are not repeated here.

本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述一种兼容多种控制器局域网总线CAN收发器的通信方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned communication method compatible with various controller local area network bus CAN transceivers is implemented. The various processes of the embodiment can achieve the same technical effect, so in order to avoid repetition, details are not repeated here. Wherein, the computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM), a random access memory (Random Access Memory, RAM), a magnetic disk or an optical disk, and the like.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示意性实施例”、“优选实施例”、“具体实施方式”、或“优选实施方式”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施例或示例中以合适的方式结合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "exemplary embodiment", "preferred embodiment", "specific implementation", or "preferred embodiment" etc. mean It means that a specific feature, structure, material or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明所述原理的前提下,还可以作出若干改进和润饰,这些改进和润饰也应视为本发明的保护范围。The above description is a preferred embodiment of the present invention, it should be pointed out that for those of ordinary skill in the art, without departing from the principle of the present invention, some improvements and modifications can also be made, and these improvements and modifications can also be made. It should be regarded as the protection scope of the present invention.

Claims (10)

1. The communication method compatible with the CAN transceivers of the local area network buses of the various controllers is applied to a vehicle-mounted network bus management system, and the vehicle-mounted network bus management system comprises N control chips and the CAN transceivers which are in one-to-one correspondence with the N control chips, and is characterized by comprising the following steps:
reading a first parameter of a target control chip, wherein the target control chip is any one of the N control chips;
acquiring preset M read-write register drivers, and acquiring second parameters of the target CAN transceivers based on each read-write register driver to acquire M second parameters, wherein the target CAN transceivers are CAN transceivers corresponding to the target control chip, one read-write register driver corresponds to one CAN transceiver, and M is an integer greater than 1;
comparing the first parameter with the M second parameters to obtain target second parameters matched with the first parameters, wherein the M second parameters comprise the target second parameters;
and determining the read-write register driver corresponding to the target second parameter as the target read-write register driver, wherein the target read-write register driver is used for driving data transmission between the target control chip and the target CAN transceiver.
2. The method of claim 1, wherein prior to reading the first parameter of the target control chip, further comprising:
performing system initialization operation on the vehicle-mounted network bus management system;
and connecting a preset pin on the target control chip with the corresponding target CAN transceiver through serial peripheral interface SPI configuration, and setting a third parameter of the SPI, wherein the third parameter comprises the baud rate.
3. The method of claim 1, wherein the reading the first parameter of the target control chip comprises:
calling a preset register in the target control chip;
reading a first parameter of the target control chip based on the preset register;
the first parameters comprise an electrical parameter, a physical parameter, a model of the preset register and a first address of the target control chip.
4. The method according to claim 3, wherein after the determining that the read-write register driver corresponding to the target second parameter is the target read-write register driver, further comprising:
under the condition that the vehicle-mounted network bus management system is subjected to network wakeup, acquiring a fourth parameter of the control chip to be waked, wherein the fourth parameter comprises a second address of the control chip to be waked;
comparing the target second parameter and the fourth parameter determined based on the target read-write register driver;
and waking up the target control chip corresponding to the second address under the condition that the first address included in the target second parameter and the second address included in the fourth parameter are consistent.
5. A communication device compatible with a plurality of controller area network (lan) bus transceivers, applied to a vehicle-mounted network bus management system, the vehicle-mounted network bus management system includes N control chips and CAN transceivers corresponding to the N control chips one by one, the device is characterized in that:
the first acquisition module is used for reading a first parameter of a target control chip, wherein the target control chip is any one of the N control chips;
the second acquisition module is used for acquiring preset M read-write register drivers, acquiring second parameters of the target CAN transceivers based on each read-write register driver respectively to acquire M second parameters, wherein the target CAN transceivers are CAN transceivers corresponding to the target control chip, one read-write register driver corresponds to one CAN transceiver, and M is an integer greater than 1;
the comparison module is used for comparing the first parameter with the M second parameters to obtain target second parameters matched with the first parameters, wherein the M second parameters comprise the target second parameters;
the determining module is configured to determine that the read-write register driver corresponding to the second parameter is the target read-write register driver, where the target read-write register driver is configured to drive data transmission between the target control chip and the target CAN transceiver.
6. The apparatus of claim 5, further comprising a connection configuration module to:
performing system initialization operation on the vehicle-mounted network bus management system;
and connecting a preset pin on the target control chip with the corresponding target CAN transceiver through serial peripheral interface SPI configuration, and setting a third parameter of the SPI, wherein the third parameter comprises the baud rate.
7. The apparatus of claim 5, wherein the first acquisition module is configured to:
calling a preset register in the target control chip;
reading a first parameter of the target control chip based on the preset register;
the first parameters comprise an electrical parameter, a physical parameter, a model of the preset register and a first address of the target control chip.
8. The apparatus of claim 7, wherein the means for determining is further for:
under the condition that the vehicle-mounted network bus management system is subjected to network wakeup, acquiring a fourth parameter of the control chip to be waked, wherein the fourth parameter comprises a second address of the control chip to be waked;
comparing the target second parameter and the fourth parameter determined based on the target read-write register driver;
and waking up the target control chip corresponding to the second address under the condition that the first address included in the target second parameter and the second address included in the fourth parameter are consistent.
9. An electronic device, comprising: a processor, a memory and a program stored on the memory and executable on the processor, which when executed by the processor, implements the steps of the communication method compatible with a plurality of CAN transceivers of any one of claims 1 to 4.
10. A readable storage medium having stored thereon a program which, when executed by a processor, implements the steps of the communication method compatible with a plurality of CAN transceivers of any one of claims 1 to 4.
CN202310507800.1A 2023-05-08 2023-05-08 Communication method and device compatible with various CAN transceivers, electronic equipment and medium Active CN116633382B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310507800.1A CN116633382B (en) 2023-05-08 2023-05-08 Communication method and device compatible with various CAN transceivers, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310507800.1A CN116633382B (en) 2023-05-08 2023-05-08 Communication method and device compatible with various CAN transceivers, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN116633382A true CN116633382A (en) 2023-08-22
CN116633382B CN116633382B (en) 2025-07-25

Family

ID=87616283

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310507800.1A Active CN116633382B (en) 2023-05-08 2023-05-08 Communication method and device compatible with various CAN transceivers, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN116633382B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205103653U (en) * 2015-10-27 2016-03-23 北京新能源汽车股份有限公司 Data processing system of automobile controller
US20180143935A1 (en) * 2016-11-23 2018-05-24 Infineon Technologies Austria Ag Bus Device with Programmable Address
CN108445860A (en) * 2018-01-31 2018-08-24 深圳市元征科技股份有限公司 Diagnostic device, diagnosis request processing method and computer readable storage medium
US20230124740A1 (en) * 2020-03-05 2023-04-20 Inspur Suzhou Intelligent Technology Co., Ltd. Method and apparatus for supporing tcm communication by bios of arm server, device, and medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205103653U (en) * 2015-10-27 2016-03-23 北京新能源汽车股份有限公司 Data processing system of automobile controller
US20180143935A1 (en) * 2016-11-23 2018-05-24 Infineon Technologies Austria Ag Bus Device with Programmable Address
CN108445860A (en) * 2018-01-31 2018-08-24 深圳市元征科技股份有限公司 Diagnostic device, diagnosis request processing method and computer readable storage medium
US20230124740A1 (en) * 2020-03-05 2023-04-20 Inspur Suzhou Intelligent Technology Co., Ltd. Method and apparatus for supporing tcm communication by bios of arm server, device, and medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
唐辉;刘锦高;许春冬;李外云;: "基于CAN总线在车载系统中的应用", 微计算机信息, no. 08, 15 March 2009 (2009-03-15) *

Also Published As

Publication number Publication date
CN116633382B (en) 2025-07-25

Similar Documents

Publication Publication Date Title
US9575552B2 (en) Device, method and system for operation of a low power PHY with a PCIe protocol stack
US7366930B2 (en) System and method for successfully negotiating a slowest common link speed between a first and second device
US7069347B1 (en) Device and method for adapting speed of a USB device based on available power
EP1785812B1 (en) System and method for extreme power savings when no network is detected
KR20120096858A (en) Remote wakeup of application processor of mobile device
CN102253910B (en) Inter-integrated circuit (I2C) transmission method and device
CN101317364A (en) A device and method for realizing communication between a service board and a main control board
CN113220614B (en) Method, system and medium for self-adaptive management of I2C and I3C devices
CN202421950U (en) External expanding unit for PCI (Peripheral Component Interconnect) bus board cards
CN111736792B (en) Programmable logic device, control method and control system thereof and video processor
CN103870429A (en) High-speed-signal processing board based on embedded GPU
US20230140769A1 (en) REMOTE RECONFIGURATION SYSTEM FOR INTERNET OF THINGS (IoT) INTELLIGENT SENSING TERMINAL
WO2014004737A1 (en) Low power low frequency squelch break protocol
CN108255754A (en) A kind of I3C main equipments of compatible I2C, I3C master-slave equipments communication system and method
CN112087359B (en) Serial communication system
CN101369948B (en) Communication system implementing low-power consumption
CN103986588B (en) Remote control method for computer system and computer device
CN102445981B (en) Data transmission system and data transmission method
CN102654857A (en) Communication method capable of simulating SPI protocol by adopting GPIO interface
CN102929828B (en) Support data transmission method and the device of standard and non-standard I 2C interface simultaneously
CN101599050B (en) Adaptable pci express controller core and method
CN115129643A (en) Method, device, equipment and storage medium for improving transmission bandwidth between BMC and CMC
CN118819647B (en) Universal serial bus interface driving method, device, electronic device, storage medium and computer program product
CN116633382A (en) Communication method, device, electronic equipment and medium compatible with various CAN transceivers
CN113867787A (en) A system and method for switching between server network cards

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant