Method and system for controlling daisy chain communication

Through the MCU, the daisy chain signal is parsed and controlled according to the CAN protocol, the problem of low efficiency in automated testing and mass production detection in the existing daisy chain communication system is solved, and the rapid reading and control of daisy chain information is realized, which improves the testing efficiency and Data accuracy.

CN119135476APending Publication Date: 2024-12-13JUNSHENG QUNYING (NANJING) NEW ENERGY VEHICLE SYST RES INST CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411235533.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2024-12-13

AI Technical Summary

Technical Problem

Due to the lack of industry-wide standards, the existing daisy chain communication systems have difficulty in achieving automated testing and mass production inspection by chip manufacturers, which is inefficient, and the slave products are restricted to the brand and are inconvenient to use.

Method used

The MCU analyzes daisy chain signals, reads and controls information according to the CAN communication protocol, and collects slave configuration and data, and uses the CAN network to realize the automated control of daisy chain communication, providing a control method and system for daisy chain communication, including power supply Modules, CAN communication module, daisy chain communication module and MCU module realize the rapid reading and control of daisy chain information.

Benefits of technology

It realizes flexible configuration and rapid adaptation of daisy chain slaves, solves the problem of automated collection, improves testing efficiency and data accuracy, reduces production costs, and simplifies the daisy chain communication control process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119135476A_ABST
    Figure CN119135476A_ABST
Patent Text Reader

Abstract

The invention discloses a daisy chain communication control method and system, and the method comprises the following steps: after an MCU detects a power supply, starting to initialize each register of CAN communication, and enabling the CAN communication and daisy chain communication to work normally; reading the configuration item message on the CAN bus, analyzing the configuration item message, and then configuring the slave according to the analyzed configuration item; after the slave is configured, real-time data of a slave daisy chain is obtained, and meanwhile, the MCU periodically forwards all the collected data to a corresponding message of a CAN network according to definition; and the MCU periodically detects the message of the configuration item, and after configuration is completed, the MCU is initialized again and starts to collect data again. The daisy chain slave can be flexibly configured through a universal CAN bus tool, a series of daisy chain chips can be rapidly adapted, information of the daisy chain can be rapidly read, and the daisy chain slave can be controlled by operating CAN signals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and mainly to a daisy chain communication control method and system. Background Art

[0002] With the popularity of new energy vehicles and the rise of the energy storage industry, battery packs as energy storage containers have gradually come into the public eye. However, various natural hazards caused by failures have also gradually attracted widespread attention to its safety. At the same time, in today's fierce competition, how to ensure the safety of batteries while reducing costs and increasing efficiency has become a topic of focus for various automobile manufacturers, energy storage manufacturers, and chip manufacturers. Therefore, the daisy chain has become an effective solution to replace CAN bus communication because of its chain-like cascade topology, high-speed and reliable performance, and low cost (reducing the specifications of chips and sampling circuit electrical components).

[0003] Daisy chain chip manufacturers have developed technologies for differential signal communication between AFEs and for converting differential signals into protocols such as SPI or UART to communicate with microcontrollers. In these two parts, each company has its own private protocol, and there is no industry-wide standard. Therefore, as a slave product, it is best to use a host with the same brand of chip to effectively obtain its sampled data and send instructions and data. However, the host computer and DEMO board of the chip manufacturer are more for development and debugging, which are extremely inconvenient and inefficient. For testing or mass production testing, they all face difficult difficulties. Summary of the invention

[0004] The present invention provides a control method and system for daisy chain communication. After a host parses a daisy chain signal, the information of the daisy chain is quickly read according to a self-defined CAN communication protocol, and the daisy chain slaves can be controlled by operating the CAN signal, so as to solve the deficiencies of the prior art.

[0005] The present invention provides a daisy chain communication control method, comprising the following steps:

[0006] After the MCU detects the power supply, it starts to initialize the various CAN communication registers, so that the CAN communication and the daisy chain can communicate normally;

[0007] Read the configuration item message on the CAN bus, parse it, and then configure the slave according to the parsed configuration items;

[0008] After the slave is configured, the real-time data of the slave daisy chain is obtained. At the same time, the MCU periodically forwards all the collected data to the corresponding message of the CAN network according to the definition; if some signals on the daisy chain cannot be read due to configuration, the corresponding CAN network message data defaults to 0 and is still sent periodically;

[0009] The MCU periodically detects the message of the configuration item: if the data of the configuration item has not changed, the MCU maintains the current state to obtain the daisy chain data and forwards it to the CAN network; if the data of the configuration item has changed, the MCU reconfigures the slave according to the data parsed by the CAN message; after the configuration is completed, the MCU is reinitialized and starts collecting data again.

[0010] Furthermore, the configuration of the slave according to the parsed configuration items is specifically as follows:

[0011] If the received CAN messages are all 0, wait for data update until the data in the configuration item message in the CAN signal changes. At this time, the MCU starts to parse the configuration item data and starts to send signals to configure the slave through daisy chain communication according to the parsed data. After the configuration is completed, the MCU will be reinitialized and then communicate data with the slave.

[0012] If the received CAN messages are not 0, the MCU starts to parse the configuration line data and starts to send signals to configure the slave through daisy chain communication according to the parsed data; after the configuration is completed, the MCU will be reinitialized and then communicate data with the slave.

[0013] Furthermore, when the calibration data on the E side of the slave is to be changed, the message of the CAN network is changed and the message is sent once. When the MCU detects the corresponding message, it is sent to the daisy chain channel according to the protocol.

[0014] Furthermore, when the MCU detects the corresponding message, it sends it to the daisy chain channel according to the protocol, specifically: the MCU detects the message with the defined ID, determines the starting address of the area of ​​the slave E side that needs to be updated, and then starts from the starting address, writes the data to the E side byte by byte, and after each byte is written, the address of the E side is increased by 1, and the second byte is written to the second area of ​​the E side, and so on, until the 8 bytes of each message are written; after the writing is completed, the MCU will no longer write to the E side unless the MCU detects that the ID of the CAN message related to the E side has data to send again.

[0015] Furthermore, after the MCU has written all the data, the MCU periodically reads the E-party data through the daisy chain and periodically sends it through the CAN message.

[0016] Furthermore, during the communication process, if an abnormality occurs in the daisy chain communication, resulting in the daisy chain master and slave being unable to communicate, the MCU sends fault information to the CAN network via the CAN network to inform the cause of the fault; if the daisy chain communication automatically recovers after the fault occurs, the MCU automatically reinitializes the daisy chain communication and resumes data communication.

[0017] Furthermore, the MCU periodically forwards all collected data to the corresponding message of the CAN network according to the definition, wherein the voltage and current sampling data transmission cycle is 20ms, and the E-side data transmission cycle is 50ms.

[0018] Furthermore, the host daisy chain reads the battery voltage signal and E-side data collected by the slave through the positive chain cycle, reads the current signal collected by the slave through the reverse chain of the daisy chain, determines the quality of the daisy chain positive chain hardware channel through the voltage signal and E-side data on the CAN message, and determines the quality of the daisy chain reverse chain hardware channel through the current signal on the CAN message.

[0019] The present application also proposes a daisy chain communication control system, including a power module, a CAN communication module, a daisy chain communication module, and an MCU module, wherein the MCU module is electrically connected to the power module, the CAN communication module, and the daisy chain communication module, wherein:

[0020] The power module provides stable voltage to each module and outputs 5V stable voltage to provide voltage for the slave device;

[0021] The daisy chain communication module is used to perform daisy chain communication with the slave device and assist the MCU in sending and receiving daisy chain signals, that is, to analyze the daisy chain signals sent by the slave device and convert the control signals of the MCU into daisy chain signals and send them to the slave device;

[0022] The CAN communication module is used to assist the MCU in communicating with the external controller. According to the custom protocol, the signals required by the MCU are sent to the outside in the form of CAN signals, and at the same time, external CAN commands and data are received and transmitted to the MCU.

[0023] The MCU module is the center of all daisy-chain communication chip control, CAN communication data processing and exchange. It is used to set each module according to the timing, process the received daisy-chain and CAN signal data, and send it to each communication module as required according to the custom protocol.

[0024] The beneficial effects of the present invention are:

[0025] The present invention can flexibly configure daisy chain slaves through a universal CAN bus tool, can quickly adapt to a series of daisy chain chips, realize rapid reading of daisy chain information and control of the daisy chain slaves by operating CAN signals, thus solving the problem that the daisy chain data interface cannot be directly integrated into the test equipment and is difficult to realize automated collection. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0027] Figure 1 It is a system principle block diagram of the present invention. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0029] The technical solutions provided by various embodiments of the present invention are described in detail below in conjunction with the accompanying drawings.

[0030] The present invention provides a daisy chain communication control method, comprising the following steps:

[0031] S1. After the MCU detects the power supply, it starts to initialize the various registers of CAN communication, so that the CAN communication and the daisy chain can communicate normally;

[0032] S2, read the configuration item message on the CAN bus, parse it, and then configure the slave according to the parsed configuration item;

[0033] S3. After the slave is configured, the real-time data of the slave daisy chain is obtained. At the same time, the MCU periodically forwards all the collected data to the corresponding message of the CAN network according to the definition; if some signals on the daisy chain cannot be read due to the configuration, the corresponding CAN network message data defaults to 0 and is still sent periodically;

[0034] S4. MCU periodically detects the message of the configuration item: If the data of the configuration item has not changed, the MCU maintains the current state to obtain the daisy chain data and forwards it to the CAN network; if the data of the configuration item has changed, the MCU reconfigures the slave according to the data parsed by the CAN message; after the configuration is completed, the MCU is reinitialized and starts collecting data again.

[0035] In this embodiment, the slave is configured according to the parsed configuration items as follows:

[0036] If the received CAN messages are all 0, wait for data update; until the data in the message of the configuration item in the CAN signal changes, the MCU starts to parse the configuration line data, and starts to send signals to configure the slave through daisy chain communication according to the parsed data; after the configuration is completed, the MCU will be reinitialized and then communicate data with the slave;

[0037] If the received CAN messages are not 0, the MCU starts to parse the configuration line data and starts to send signals to configure the slave through daisy chain communication according to the parsed data; after the configuration is completed, the MCU will be reinitialized and then communicate data with the slave.

[0038] In this embodiment, when the calibration data on the E side of the slave is to be changed, the message of the CAN network is changed and the message is sent once. When the MCU detects the corresponding message, it is sent to the daisy chain channel according to the protocol.

[0039] For example, if 16 bytes of data need to be filled in side E, the host needs to control the slave to write to side E through CAN message (8 bytes), so 2 frames of messages are defined for splicing to meet the required 16 bytes. At the same time, because the slave can only write 1 Byte at a time, the host needs to send the 16 bytes of the 2 frames of messages to the slave one by one in sequence, and the slave operates on side E. In order to ensure successful writing, the slave will read from side E in sequence and send it to the host, which will then splice it and send the specified message through the CAN message cycle.

[0040] For example, the 0x10 sector in side E is from 00Byte to 0fByte, totaling 16Byte. It is spliced ​​and sent through two frames of messages with ID 0x10 and 0x11. After the CAN analyzer sends the above two frames of messages at a time, the MCU takes the first byte of ID = 0x10 as the lowest byte of side E 0x00Byte, and the eighth byte of ID = 0x11 as the highest byte of side E 0x0fByte, and sends them to the slave in sequence, and the slave writes them to the corresponding position of side E.

[0041] Similarly, after writing, the host controls the slave to read the data in side E in turn through the daisy chain and send it to the host, and then disassemble it into 2 messages and send it periodically.

[0042] If the MCU receives data from the slave through the daisy chain, it will be spliced ​​in order, and then split into CAN messages with ID = 0x20 and ID = 0x21 (that is, the first byte of ID = 0x20 is used as the lowest byte 0x00Byte of the E side, and the eighth byte of ID = 0x21 is used as the highest byte 0x0fByte of the E side), and then sent to the outside through CAN.

[0043] In this embodiment, when the MCU detects the corresponding message, it sends it to the daisy chain channel according to the protocol, specifically: the MCU detects the message with the defined ID, determines the starting address of the area of ​​the E side of the slave that needs to be updated, and then starts from the starting address and writes the data to the E side byte by byte. After each byte is written, the address of the E side is increased by 1, and the second byte is written to the second area of ​​the E side, and so on, until the 8 bytes of each message are written; after the writing is completed, the MCU will no longer write to the E side unless the MCU detects that the ID of the CAN message related to the E side has data to send again.

[0044] In this embodiment, after the MCU has written all the data, the MCU periodically reads the E-party data through the daisy chain and periodically sends it through the CAN message.

[0045] In this embodiment, during the communication process, if an abnormality occurs in the daisy chain communication, resulting in the daisy chain host and slave being unable to communicate, the MCU sends fault information to the CAN network through the CAN network to inform the cause of the fault; if the daisy chain communication automatically recovers after the fault occurs, the MCU automatically reinitializes the daisy chain communication and resumes data communication without the need to cut off power and restart.

[0046] In this embodiment, the MCU periodically forwards all the collected data to the corresponding message of the CAN network according to the definition, wherein the voltage and current sampling data sending cycle is 20ms, and the E-side data sending cycle is 50ms.

[0047] In this embodiment, the current signal collected by the slave is read through the daisy chain reverse chain, and the quality of the hardware channel of the daisy chain reverse chain is determined by the collected current signal, and the quality of the hardware channel of the daisy chain positive chain is determined by the voltage signal on the CAN message.

[0048] At this point, as long as a conventional CAN bus analyzer is used externally, the slave (such as the ADBMS295x series) can be configured by calling the signal of the DBC database, and the required signal value can be obtained in real time. By integrating these interfaces into the test equipment, automated testing can be achieved. At the same time, due to the increase in the number of data samples collected per unit time, some filtering algorithms can be combined to accurately calculate the test data, ensuring the accuracy of the data.

[0049] like Figure 1 As shown, the present application also proposes a daisy chain communication control system, including a power module, a CAN communication module, a daisy chain communication module, and an MCU module, wherein the MCU module is electrically connected to the power module, the CAN communication module, and the daisy chain communication module, wherein:

[0050] The power module provides stable voltage to each module and outputs 5V stable voltage to provide voltage for the slave device;

[0051] The daisy chain communication module is used to perform daisy chain communication with the slave device and assist the MCU in sending and receiving daisy chain signals, that is, to analyze the daisy chain signals sent by the slave device and convert the control signals of the MCU into daisy chain signals and send them to the slave device;

[0052] The CAN communication module is used to assist the MCU in communicating with the external controller. According to the custom protocol, the signals required by the MCU are sent to the outside in the form of CAN signals, and at the same time, external CAN commands and data are received and transmitted to the MCU.

[0053] The MCU module is the center of all daisy-chain communication chip control, CAN communication data processing and exchange. It is used to set each module according to the timing, process the received daisy-chain and CAN signal data, and send it to each communication module as required according to the custom protocol.

[0054] The whole scheme of the present invention makes daisy chain communication control and reading simpler and more efficient, provides a basis for automated testing, and allows daisy chain parameters to be integrated into test software to improve calculation speed. The increase in the number of data samples also effectively reduces the instability of data caused by sampling, and improves the accuracy and reliability of data. The realization of automation also replaces manual data recording with computer-stored data, making the data more reliable and efficient.

[0055] The above description is only an embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims

1. A daisy chain communication control method, characterized in that: The following steps are involved: After the MCU detects the power supply, it starts to initialize the various CAN communication registers, so that the CAN communication and the daisy chain can communicate normally; Read the configuration item message on the CAN bus, parse it, and then configure the slave according to the parsed configuration items; After the slave is configured, the real-time data of the slave daisy chain is obtained. At the same time, the MCU periodically forwards all the collected data to the corresponding message of the CAN network according to the definition; if some signals on the daisy chain cannot be read due to configuration, the corresponding CAN network message data defaults to 0 and is still sent periodically; The MCU periodically detects the message of the configuration item: if the data of the configuration item has not changed, the MCU maintains the current state to obtain the daisy chain data and forwards it to the CAN network; if the data of the configuration item has changed, the MCU reconfigures the slave according to the data parsed by the CAN message; after the configuration is completed, the MCU is reinitialized and starts collecting data again.

2. A daisy chain communication control method according to claim 1, characterized in that: The configuration of the slave according to the parsed configuration items is specifically as follows: If the received CAN messages are all 0, wait for data update; until the data in the message of the configuration item in the CAN signal changes, the MCU starts to parse the configuration line data, and starts to send signals to configure the slave through daisy chain communication according to the parsed data; after the configuration is completed, the MCU will be reinitialized and then communicate data with the slave; If the received CAN messages are not 0, the MCU starts to parse the configuration line data and starts to send signals to configure the slave through daisy chain communication according to the parsed data; after the configuration is completed, the MCU will be reinitialized and then communicate data with the slave.

3. A daisy chain communication control method according to claim 1, characterized in that: When the calibration data on the E side of the slave is to be changed, the message of the CAN network is changed and sent once. When the MCU detects the corresponding message, it is sent to the daisy chain channel according to the protocol.

4. A daisy chain communication control method according to claim 3, characterized in that: When the MCU detects the corresponding message, it sends it to the daisy chain channel according to the protocol, specifically: the MCU detects the message with the defined ID, determines the starting address of the area of ​​the E side of the slave that needs to be updated, and then starts from the starting address, writes the data to the E side byte by byte, and each time a byte is written, the E side address is increased by 1, and the second byte is written to the second area of ​​the E side, and so on, until the 8 bytes of each message are written; after the writing is completed, the MCU will no longer write to the E side unless the MCU detects that the ID of the CAN message related to the E side has data to send again.

5. The control method of daisy chain communication according to claim 1, characterized in that: When the MCU has written all the data, the MCU periodically reads the E-side data through the daisy chain and sends it periodically through CAN messages.

6. The control method of daisy chain communication according to claim 1, characterized in that: During the communication process, if an abnormality occurs in the daisy chain communication, resulting in the daisy chain master and slave being unable to communicate, the MCU sends fault information to the CAN network through the CAN network to inform the cause of the fault; if the daisy chain communication automatically recovers after the fault occurs, the MCU automatically reinitializes the daisy chain communication and resumes data communication.

7. A daisy chain communication control method according to claim 1, characterized in that: The MCU periodically forwards all collected data to the corresponding message of the CAN network according to the definition, wherein the voltage and current sampling data transmission cycle is 20ms, and the E-side data transmission cycle is 50ms.

8. The daisy chain communication control method according to claim 1, characterized in that: The host daisy chain reads the battery voltage signal and E-side data collected by the slave through the positive chain cycle, reads the current signal collected by the slave through the reverse chain of the daisy chain, determines the quality of the daisy chain positive chain hardware channel through the voltage signal and E-side data on the CAN message, and determines the quality of the daisy chain reverse chain hardware channel through the current signal on the CAN message.

9. A daisy chain communication control system, characterized in that: It includes a power module, a CAN communication module, a daisy chain communication module, and an MCU module, wherein the MCU module is electrically connected to the power module, the CAN communication module, and the daisy chain communication module, wherein: The power module provides stable voltage to each module and outputs 5V stable voltage to provide voltage for the slave device; The daisy chain communication module is used to perform daisy chain communication with the slave device and assist the MCU in sending and receiving daisy chain signals, that is, to analyze the daisy chain signals sent by the slave device and convert the control signals of the MCU into daisy chain signals and send them to the slave device; The CAN communication module is used to assist the MCU in communicating with the external controller. According to the custom protocol, the signals required by the MCU are sent to the outside in the form of CAN signals, and at the same time, external CAN commands and data are received and transmitted to the MCU. The MCU module is the center of all daisy-chain communication chip control, CAN communication data processing and exchange. It is used to set each module according to the timing, process the received daisy-chain and CAN signal data, and send it to each communication module as required according to the custom protocol.