Communication method of daisy chain and battery management system
By monitoring communication commands and ACK signals in the daisy chain communication structure in real time and using different I/O ports for data transmission, the problems of overlap, missed and missed data codes in the daisy chain are solved, and the reliability and synchronization of data transmission are achieved.
Patent Information
- Application Number
- CN202510503359.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2025-07-08
AI Technical Summary
In the daisy chain communication structure, data code overlap, missed and missed due to asynchronous front-end chip clocks.
In the daisy chain communication method, the front-end chip monitors communication commands and ACK signals in real time, and uses different I/O ports to transmit data according to the communication command type to ensure synchronization of time intervals and data sequence.
It effectively avoids overlap, missed and missed data codes in the daisy chain, and ensures the reliability and synchronization of data transmission.
Smart Images

Figure CN120281600A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of battery management systems, and in particular, to a communication method for a daisy chain and a battery management system. Background Art
[0002] A daisy chain is a communication topology in a battery management system, and the daisy chain includes several front-end chips electrically connected in sequence.
[0003] In the daisy chain communication structure, the working clocks of each front-end chip are usually not completely synchronized, that is, the clock signals between the chips are independent of each other (asynchronous). Under such asynchronous conditions, when a certain front-end chip sends data to the chip at its upper or lower level, due to the inability to uniformly coordinate the precise timing of data transmission of each chip, it is easy to cause multiple chips to occupy the same communication line simultaneously, resulting in the overlap of data codes. In addition, the asynchronous clock may also cause a chip to miss the transmission window when it is not ready, resulting in data loss, and the order of data sent by the chip is inconsistent with the order of data expected by the receiving end, resulting in incorrect data transmission.
[0004] In the daisy chain structure, the front-end chip clocks are asynchronous, lacking a unified transmission time reference, so the transmission timing of data cannot be precisely controlled, ultimately causing problems such as data code overlap, data loss, and incorrect data transmission.
[0005] Therefore, how to avoid the phenomena of data code overlap, data loss, and incorrect data transmission in the daisy chain has become a technical problem urgently to be solved in the prior art. Summary of the Invention
[0006] The present invention provides a synchronization method for a daisy chain and a battery management system, which avoid the phenomena of data code overlap, data loss, and incorrect data transmission in the daisy chain.
[0007] According to a first aspect of the present invention, an embodiment of the present invention provides a communication method for a daisy chain. The daisy chain includes N front-end chips electrically connected in sequence, where N is an integer and N≥1. The front-end chip is used to receive a communication command, write data, an ACK signal, and a communication end signal sent by a main control unit, where the communication end signal and the communication command are both transparent transmission signals;
[0008] Each front-end chip includes a first I / O port and a second I / O port. The second I / O port of each front-end chip is connected to the first I / O port of the next front-end chip along the downstream communication direction of the daisy chain, and the first I / O port of the first front-end chip is coupled to the main control unit;
[0009] The method is applied to each front-end chip and includes:
[0010] Monitor the communication command and the communication end signal in real time;
[0011] When the communication command is received, each front-end chip performs the following steps:
[0012] Judge the type of the received communication command;
[0013] If the communication command is a read command, perform the following steps:
[0014] Send the data in the current front-end chip through the first I / O port, and receive the first data through the second I / O port, where the first data is the data in the next front-end chip along the downstream communication direction of the daisy chain;
[0015] Monitor the ACK signal in real time;
[0016] If the ACK signal is received, perform the following steps:
[0017] Send the first data through the first I / O port;
[0018] Receive the updated first data through the second I / O port to update the data in the current front-end chip;
[0019] And transmit the ACK signal through the second I / O port;
[0020] After updating the data in the current front-end chip, monitor the ACK signal in the next time period in real time;
[0021] If the communication command is a write command, perform the following steps:
[0022] Receive the write data through the first I / O port, where the write data includes a plurality of data codes;
[0023] Based on the first time threshold, sequentially send a plurality of the data codes in the write data through the second I / O port, and the transmission time interval is greater than or equal to the first time threshold;
[0024] When the communication end signal is received, each front-end chip performs the following steps:
[0025] Latch the data in the current front-end chip.
[0026] Optionally, after sending the first data through the first I / O port and before receiving the updated first data through the second I / O port, the method includes:
[0027] Latch the ACK signal to prohibit transmitting the ACK signal through the second I / O port.
[0028] Optionally, when the front-end chip sequentially sends several of the data codes in the write data through the second I / O port based on a first time threshold and the time interval between transmissions is greater than or equal to the first time threshold, the following steps are specifically executed:
[0029] Obtain the emission duration of the current data code, where the emission duration is the duration after the current data code is emitted through the second I / O port;
[0030] Receive data codes in real time through the first I / O port;
[0031] Control whether to send the data codes received in real time through the second I / O port based on the emission duration; where:
[0032] Latch the data codes received in real time when the emission duration is less than the first time threshold;
[0033] Send the data codes received in real time through the second I / O port when the emission duration is greater than or equal to the first time threshold.
[0034] Optionally, the method for transparently transmitting the communication end signal and the communication command includes:
[0035] Each front-end chip executes the following steps;
[0036] After receiving the communication end signal through the first I / O port, transmit the communication end signal through the second I / O port;
[0037] After receiving the communication command through the first I / O port, transmit the communication command through the second I / O port.
[0038] Optionally, before sending the communication command, the master control unit also sends a communication start signal;
[0039] After the master control unit sends the communication start signal, each front-end chip executes the following steps:
[0040] Monitor the communication start signal;
[0041] After receiving the communication start signal through the first I / O port, transmit the communication start signal through the second I / O port and monitor the communication command in real time.
[0042] According to a second aspect of the present invention, an embodiment of the present invention provides a battery management system for implementing the communication method of the daisy chain described in any one of the above. The system includes: a main control unit and a daisy chain. The daisy chain includes N front-end chips electrically connected in sequence, where N is an integer and N≥1; each front-end chip includes a first I / O port and a second I / O port. The second I / O port of each front-end chip is connected to the first I / O port of the next front-end chip along the downstream communication direction of the daisy chain, and the first I / O port of the first front-end chip is coupled to the main control unit;
[0043] The main control unit is configured to send a communication command, write data, an ACK signal, and a communication end signal to the first front-end chip, where the communication end signal and the communication command are both transparent transmission signals;
[0044] Each of the front-end chips is configured to: monitor the communication command and the communication end signal in real time;
[0045] When receiving the communication command, determine the type of the received communication command; if the communication command is a read command, send the data in the current front-end chip through the first I / O port, and receive the first data through the second I / O port; monitor the ACK signal in real time; if the ACK signal is received, send the first data through the first I / O port; receive the updated first data through the second I / O port to update the data in the current front-end chip; and transmit the ACK signal through the second I / O port; after updating the data in the current front-end chip, monitor the ACK signal in the next time period; if the communication command is a write command, receive the write data through the first I / O port, and the write data includes a plurality of data codes; based on a first time threshold, sequentially send a plurality of the data codes in the write data through the second I / O port, and the sending time interval is greater than or equal to the first time threshold;
[0046] When receiving the communication end signal, latch the data in the current front-end chip.
[0047] Optionally, the battery management system further includes a bridge chip. The first end of the bridge chip is coupled to the main control unit, and the second end of the bridge chip is connected to the first I / O port of the first front-end chip.
[0048] Optionally, the front-end chip is further configured to: latch the ACK signal after sending the first data through the first I / O port and before receiving the updated first data through the second I / O port, so as to prohibit transmitting the ACK signal through the second I / O port.
[0049] Optionally, the front-end chip is further configured to: obtain the transmission duration of the current data code, where the transmission duration is the duration recorded after the current data code is transmitted through the second I / O port; receive the data code through the first I / O port in real time; control whether to transmit the data code received in real time through the second I / O port based on the transmission duration; where, when the transmission duration is less than the first time threshold, latch the data code in the current front-end chip; when the transmission duration is greater than or equal to the first time threshold, transmit the data code received in real time through the second I / O port.
[0050] Optionally, the front-end chip is further configured to, if the communication command or the communication end signal is received through the first I / O port, transmit the communication command through the second I / O port, or transmit the communication end signal through the second I / O port.
[0051] Optionally, the main control unit is further configured to send a communication start signal to the first I / O port of the first front-end chip before sending a communication command to the first I / O port of the first front-end chip;
[0052] Each front-end chip is further configured to, after the communication start signal is received at the first I / O port,
[0053] monitor the communication start signal; after the communication start signal is received through the first I / O port, transmit the communication start signal through the second I / O port, and monitor the communication command in real time.
[0054] Compared with the prior art, the technical solution of the embodiment of the present invention has the following beneficial effects:
[0055] In the communication method of the daisy chain and the battery management system provided by the technical solution of the present invention, on the one hand, when the front-end chip receives a communication command as a read command, the front-end chip performs the following steps: sending the data in the current front-end chip through the first I / O port, and receiving the first data through the second I / O port, where the first data is the data in the next front-end chip along the downstream communication direction of the daisy chain; monitoring the ACK signal in real time; if the ACK signal is received, sending the first data through the first I / O port; receiving the updated first data through the second I / O port to update the data in the current front-end chip. Therefore, after the front-end chip receives a communication command as a read command and uploads the data in the current front-end chip, the front-end chip needs to receive the ACK signal before sending the first data through the first I / O port, resulting in a certain time interval between the upstream and downstream data transmissions of adjacent daisy chain communication nodes. On the other hand, when the communication command received by the front-end chip is a write command, the front-end chip receives the written data through the first I / O port; the front-end chip sequentially sends several data codes in the written data through the second I / O port at a time interval greater than or equal to the first time threshold. Therefore, there is a certain time interval between the sending times of two adjacent data codes sent by each front-end chip through the second I / O port. Thus, the present invention avoids the phenomena of overlapping, missing, and mis-sending of data codes during the transmission in the daisy chain.
[0056] Further, after the front-end chip sends the first data through the first I / O port and before receiving the updated first data through the second I / O port, the front-end chip latches the ACK signal to prohibit it from transmitting the ACK signal through the second I / O port. Thus, when the front-end chip receives a communication command as a read command, it avoids the collision between the transmission of the ACK signal along the downstream communication direction of the daisy chain and the data transmitted along the upstream communication direction of the daisy chain. Brief Description of the Drawings
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0058] Figure 1 It is a schematic structural diagram of a battery management system in an embodiment of the present invention;
[0059] Figure 2 It is a schematic flowchart of the communication method of the daisy chain in the first embodiment of the present invention;
[0060] Figure 3It is a schematic flowchart of the communication method of the daisy chain in the second embodiment of the present invention;
[0061] Figure 4 It is a schematic flowchart of the communication method of the daisy chain in the third embodiment of the present invention;
[0062] Figure 5 It is a schematic diagram of the structure of the battery management system in another embodiment of the present invention. Detailed implementation manners
[0063] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0064] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and are not necessarily used 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 invention described herein can be implemented in an order different from those illustrated or described herein. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0065] Next, the technical solutions of the present invention will be described in detail with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.
[0066] In view of the fact that in the prior art, there are phenomena of overlap, missing transmission, and incorrect transmission in the transmission of data codes in a daisy chain. The present invention provides a communication method for a daisy chain. On the one hand, when the front-end chip receives a communication command as a read command, the front-end chip performs the following steps: sending the data in the current front-end chip through the first I / O port, and receiving the first data through the second I / O port, where the first data is the data in the next front-end chip along the downstream communication direction of the daisy chain; monitoring the ACK signal in real time; if the ACK signal is received, sending the first data through the first I / O port; receiving the updated first data through the second I / O port to update the data in the current front-end chip. Therefore, after the front-end chip receives a communication command as a read command and uploads the data in the current front-end chip, the front-end chip will send the first data through the first I / O port only after receiving the ACK signal, so that there is a certain time interval between the times when adjacent data is transmitted in the up and down directions along the communication direction of the daisy chain communication link, and the front-end chip can send out the data codes received first. On the other hand, when the communication command received by the front-end chip is a write command, the front-end chip receives the written data through the first I / O port; the front-end chip sequentially sends several data codes in the written data through the second I / O port at a time interval greater than or equal to the first time threshold. Therefore, there is a certain time interval between the sending times of two adjacent data codes sent by each front-end chip through the second I / O port, and the front-end chip sends out the data codes received first. Thus, the present invention avoids the phenomena of overlap, missing transmission, and incorrect transmission in the transmission of data codes in a daisy chain.
[0067] To make the above objects, features, and beneficial effects of the present invention more obvious and understandable, the following detailed description of the specific embodiments of the present invention will be given with reference to the accompanying drawings.
[0068] Please refer to Figure 1 , the daisy chain in the embodiment of the present invention includes N front-end chips 110 connected electrically in sequence, where N is an integer and N≥1, and the front-end chip 110 is used to receive communication commands, written data, ACK signals, and communication end signals sent from the main control unit 200, where the communication end signal and the communication command are both transparent transmission signals;
[0069] Each front-end chip 110 includes a first I / O port 111 and a second I / O port 112. The second I / O port 112 of each front-end chip 110 is connected to the first I / O port 111 of the next front-end chip 110 along the downstream communication direction of the daisy chain, and the first I / O port 111 of the first front-end chip 110 is coupled to the main control unit 200.
[0070] Please refer to Figure 2, an embodiment of the present invention provides a communication method for a daisy chain, which is used to perform communication control on the Figure 1 daisy chain 100 shown.
[0071] The steps performed by each of the front-end chips include:
[0072] S100: Monitor the communication command in real time.
[0073] If a communication command is received, proceed to S201;
[0074] S201: Determine the type of the received communication command;
[0075] If the communication command is a read command, proceed to S202; if the communication command is a write command, proceed to S208.
[0076] S202: Send the data in the current front-end chip 110 through the first I / O port 111, and receive the first data through the second I / O port 112. The first data is the data in the next front-end chip 110 along the downstream communication direction of the daisy chain, and then proceed to S203;
[0077] S203: Monitor the ACK signal in real time;
[0078] If the ACK signal is received, proceed to S204; if the ACK signal is not received, proceed to S209;
[0079] S204: Send the first data through the first I / O port 111;
[0080] S205: Receive the updated first data through the second I / O port 112 to update the data in the current front-end chip 110;
[0081] S206: Transmit the ACK signal through the second I / O port 112 and then proceed to S207;
[0082] S207: Determine whether a communication end signal is received. If so, proceed to S208; if not, proceed to S203;
[0083] S208: Latch the data in the current front-end chip and then proceed to S100;
[0084] S209: Latch the data in the current front-end chip and then proceed to S203;
[0085] If the communication command is a write command, proceed to S210:
[0086] S210: Receive the written data through the first I / O port 111. The written data includes a plurality of data codes;
[0087] S211: Based on the first time threshold, successively send several of the data codes in the written data through the second I / O port 112, and the time interval between transmissions is greater than or equal to the first time threshold, and then enter S212;
[0088] S212: Determine whether a communication end signal is received. If so, enter S213; if not, return to S210;
[0089] S213: Latch the data in the current front-end chip and return to S100.
[0090] In order to avoid a collision between the ACK signal transmitted along the communication direction of the daisy chain in the downward direction and the data transmitted along the communication direction of the daisy chain in the upward direction when the communication command received by the front-end chip 110 is a read command. In a specific embodiment, after sending the first data through the first I / O port 111 and before receiving the updated first data through the second I / O port 112, latch the ACK signal to prohibit the transmission of the ACK signal through the second I / O port 112.
[0091] Specifically, please refer to Figure 3 , S204: After sending the first data through the first I / O port 111, enter S2051;
[0092] S2051: Monitor the updated first data. If the updated first data is received through the second I / O port 112, enter S206; if the updated first data is not received through the second I / O port 112, enter S2052;
[0093] S2052: Latch the ACK signal and return to S2051.
[0094] This embodiment prohibits the transmission of the ACK signal to the next front-end chip 110 in the downward communication direction before the current front-end chip 110 receives the updated first data uploaded by the next front-end chip 110 in the communication downward direction. Thus, a collision between the ACK signal transmitted along the daisy chain in the downward communication direction and the data transmitted along the daisy chain in the upward communication direction is avoided.
[0095] Specifically, please refer to Figure 4 , in step S211, the front-end chip 110 specifically performs the following steps:
[0096] S2111: Obtain the emission duration of the current data code, where the emission duration is the duration after the current data code is emitted through the second I / O port 112;
[0097] S2112: Receive a data code in real time through the first I / O port 111;
[0098] S2113: Control whether to send the data code received in real time through the second I / O port based on the emission duration. If the emission duration is greater than the first time threshold, enter S2114; if the emission duration is less than the first time threshold, enter S2115;
[0099] S2114: Send the data code received in real time through the second I / O port 112 and return to S2111.
[0100] S2115: Latch the data code received in real time and return to S2113;
[0101] Specifically, each front-end chip 110 can only store one data at the same moment.
[0102] Specifically, before sending the communication command, the main control unit 200 also sends a communication start signal;
[0103] After the main control unit 200 sends the communication start signal, each front-end chip 110 executes the following steps:
[0104] Monitor the communication start signal;
[0105] After receiving the communication start signal through the first I / O port 111, transmit the communication start signal through the second I / O port 112 and monitor the communication command in real time.
[0106] The front-end chip uses the communication start signal as the start signal for signal transmission. This method can reduce the situation of timing asynchrony of the front-end chip.
[0107] Specifically, the method of transparently transmitting the communication end signal and the communication command includes:
[0108] Each front-end chip 110 executes the following steps:
[0109] After receiving the communication end signal through the first I / O port 111, transmit the communication end signal through the second I / O port 112;
[0110] After receiving the communication command through the first I / O port 111, transmit the communication command through the second I / O port 112.
[0111] Both the communication command and the communication end signal are transparent transmission signals. When the front-end chip receives a transparent transmission signal, it will directly transmit it to the next front-end chip, ensuring the reliability of the transmission of the communication command and the communication end signal.
[0112] It can be seen that in the communication method of the daisy chain provided by the embodiments of the present invention, on the one hand, when the front-end chip 110 receives a communication command as a read command, the front-end chip 110 performs the following steps: sending the data in the current front-end chip 110 through the first I / O port 111, and receiving the first data through the second I / O port 112, where the first data is the data in the subsequent front-end chip 110 along the downstream communication direction of the daisy chain; monitoring the ACK signal in real time; if the ACK signal is received, sending the first data through the first I / O port 111; receiving the updated first data through the second I / O port 112 to update the data in the current front-end chip 110. Therefore, after the front-end chip 110 receives a communication command as a read command and the front-end chip 110 uploads the data in the current front-end chip, the front-end chip 110 will send the first data through the first I / O port 111 only after receiving the ACK signal, resulting in a certain time interval for the adjacent data to be transmitted in the up and down directions along the communication direction of the daisy chain communication link. On the other hand, when the communication command received by the front-end chip 110 is a write command, the front-end chip 110 receives the write data through the first I / O port 111; the front-end chip 110 sequentially sends several data codes in the write data through the second I / O port 112 at a time interval greater than or equal to the first time threshold. Therefore, there is a certain time interval for the emission time of two adjacent data codes sent by each front-end chip 110 through the second I / O port 112. Thus, the present invention avoids the phenomena of overlapping, missing, and mis-sending of data codes during the transmission in the daisy chain.
[0113] In addition, as a specific embodiment, please refer to Figure 5 The present invention also provides a battery management system, which performs data reading or data writing through the communication method of the daisy chain as shown in Figure 2 and includes: a main control unit 200 and a daisy chain, where the daisy chain includes N front-end chips 110 electrically connected in sequence, where N is an integer and N≥1; each front-end chip 110 includes a first I / O port 111 and a second I / O port 112, and the second I / O port 112 of each front-end chip 110 is connected to the first I / O port 111 of the subsequent front-end chip 110 along the downstream communication direction of the daisy chain, and the first I / O port 111 of the first front-end chip 110 is coupled to the main control unit 200;
[0114] The main control unit 200 is configured to send a communication command, write data, an ACK signal, and a communication end signal to the first front-end chip 110, where the communication end signal and the communication command are both transparent transmission signals;
[0115] Each of the front-end chips 110 is configured to: monitor the communication command and the communication end signal in real time;
[0116] When receiving the communication command, determine the type of the received communication command; if the communication command is a read command, send the data in the current front-end chip 110 through the first I / O port 111, and receive the first data through the second I / O port 112; monitor the ACK signal in real time; if the ACK signal is received, send the first data through the first I / O port 111; receive the updated first data through the second I / O port 112 to update the data in the current front-end chip 110; and transmit the ACK signal through the second I / O port 112; after updating the data in the current front-end chip 110, monitor the ACK signal in the next time period in real time; if the communication command is a write command, receive the written data through the first I / O port 111, and the written data includes a plurality of data codes; based on the first time threshold, sequentially send a plurality of the data codes in the written data through the second I / O port 112, and the transmission time interval is greater than or equal to the first time threshold;
[0117] When receiving the communication end signal, latch the data in the current front-end chip 110.
[0118] As a preferred embodiment, please refer to Figure 5 , the battery management system further includes a bridge chip 300, a first end of the bridge chip 300 is coupled to the main control unit 200, and a second end of the bridge chip 300 is connected to the first I / O port 111 of the first front-end chip 110.
[0119] The bridge chip 300 can play the roles of communication isolation and signal conversion.
[0120] As an example, the front-end chip 110 includes a data buffer, and the data buffer can only accommodate the data volume of one front-end chip. In a specific implementation manner, the data in the current front-end chip 110, the received first data, and the ACK signal are all stored in the data buffer. In order not to make the data buffer store more data than it can carry, when the received communication command is a read command, after sending out the latched data in the current front-end chip 110, the front-end chip 110 can receive the ACK signal, and only after sending out the ACK signal, can it receive the updated first data through the second I / O port, so that the data buffer of the front-end chip 110 will not store more data than it can carry, ensuring that the data transmission in the daisy chain 100 will not occur overlapping, missing, or mis-sending phenomena.
[0121] In order to prevent the data buffer from storing more data than it can handle, when the communication command received by the front-end chip is a write command, the front-end chip only sends the next data code after the data code in the current front-end chip has been sent, and only after receiving the next data code and when the sending duration is greater than the first time threshold, thus avoiding the front-end chip receiving multiple data codes simultaneously, ensuring that the data buffer of the front-end chip does not store more data than it can handle, and thereby realizing the transmission of data in the daisy chain 100 without overlapping, missing, or mis-sending phenomena.
[0122] In order to avoid collisions between the ACK signal transmitted in the downstream communication direction along the daisy chain and the data transmitted in the upstream communication direction along the daisy chain when the communication command received by the front-end chip 110 is a read command. As a preferred embodiment, the front-end chip 110 is further configured to: latch the ACK signal after sending the first data through the first I / O port 111 and before receiving the updated first data through the second I / O port 112, so as to prohibit the transmission of the ACK signal through the second I / O port 112.
[0123] This embodiment prohibits the transmission of the ACK signal to the next front-end chip 110 in the downstream direction along the communication direction by the current front-end chip 110 before receiving the updated first data uploaded by the next front-end chip 110 in the downstream communication direction along the daisy chain. Thus, collisions between the ACK signal transmitted in the downstream communication direction along the daisy chain and the data transmitted in the upstream communication direction along the daisy chain are avoided.
[0124] As a specific embodiment, the front-end chip 110 is further configured to: obtain the sending duration of the current data code, where the sending duration is the duration recorded after the current data code is sent through the second I / O port 112; receive data codes in real time through the first I / O port 111; control whether to send the data codes received in real time through the second I / O port 112 based on the sending duration; where, when the sending duration is less than the first time threshold, latch the data code in the current front-end chip 110; when the sending duration is greater than or equal to the first time threshold, send the data codes received in real time through the second I / O port 112.
[0125] As a specific embodiment, the front-end chip 110 is further configured to, if the communication command is received through the first I / O port 111, transmit the communication command through the second I / O port 112;
[0126] If the communication end signal is received through the first I / O port 111, transmit the communication end signal through the second I / O port 112.
[0127] Both the communication command and the communication end signal are transparent transmission signals. When the front-end chip receives a transparent transmission signal, it will directly pass it to the next front-end chip, ensuring the reliability of the transmission of the communication command and the communication end signal.
[0128] As a specific implementation, the main control unit 200 is further configured to send a communication start signal to the first I / O port 111 of the first front-end chip 110 before sending a communication command to the first I / O port 111 of the first front-end chip 110;
[0129] Each front-end chip 110 is further configured to monitor the communication start signal after the first I / O port 111 receives the communication start signal,
[0130] monitor the communication start signal;
[0131] After receiving the communication start signal through the first I / O port 111, transmit the communication start signal through the second I / O port 112 and monitor the communication command in real time.
[0132] The front-end chip uses the communication start signal as the start signal for signal transmission. This method can reduce the situation of asynchronous timing of the front-end chip.
[0133] In summary, in the daisy-chain communication method and battery management system provided by the technical solution of the present invention, on the one hand, when the front-end chip receives a communication command as a read command, the front-end chip performs the following steps: sending the data in the current front-end chip through the first I / O port, and receiving the first data through the second I / O port, where the first data is the data in the next front-end chip along the downstream communication direction of the daisy chain; monitoring the ACK signal in real time; if the ACK signal is received, sending the first data through the first I / O port; receiving the updated first data through the second I / O port to update the data in the current front-end chip. Therefore, after the front-end chip receives a communication command as a read command and uploads the data in the current front-end chip, the front-end chip will send the first data through the first I / O port only after receiving the ACK signal, resulting in a certain time interval between the times when adjacent data is transmitted in the up and down directions along the communication direction of the daisy-chain communication link. On the other hand, when the communication command received by the front-end chip is a write command, the front-end chip receives the written data through the first I / O port; the front-end chip sequentially sends several data codes in the written data through the second I / O port at time intervals greater than or equal to the first time threshold. Therefore, there is a certain time interval between the sending times of adjacent two data codes sent by each front-end chip through the second I / O port. Thus, the present invention avoids the phenomena of overlapping, missing, and mis-sending of data codes during transmission in the daisy chain.
[0134] Although the present invention has been disclosed as above, the present invention is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the scope defined by the claims.
Claims
1. A communication method for a daisy chain, the daisy chain comprising N front-end chips electrically connected in sequence, wherein, N is an integer and N≥1, characterized in that the front-end chip is used to receive communication commands, write data, ACK signals, and communication end signals sent from the main control unit, wherein both the communication end signal and the communication command are transparent transmission signals; Each front-end chip includes a first I / O port and a second I / O port. The second I / O port of each front-end chip is connected to the first I / O port of the next front-end chip along the downstream communication direction of the daisy chain, and the first I / O port of the first front-end chip is coupled to the main control unit; The method is applied to each front-end chip and includes: Real-time monitoring of the communication command and the communication end signal; When receiving the communication command, each front-end chip performs the following steps: Judging the type of the received communication command; If the communication command is a read command, then perform the following steps: Send the data in the current front-end chip through the first I / O port, and receive the first data through the second I / O port. The first data is the data in the next front-end chip along the downstream communication direction of the daisy chain; Real-time monitoring of the ACK signal; If the ACK signal is received, then perform the following steps: Send the first data through the first I / O port; Receive the updated first data through the second I / O port to update the data in the current front-end chip; And transmit the ACK signal through the second I / O port; After updating the data in the current front-end chip, real-time monitoring of the ACK signal in the next time period; If the communication command is a write command, then perform the following steps: Receive the write data through the first I / O port. The write data includes a plurality of data codes; Based on the first time threshold, sequentially send a plurality of the data codes in the write data through the second I / O port, and the sending time interval is greater than or equal to the first time threshold; When receiving the communication end signal, each front-end chip performs the following steps: Latch the data in the current front-end chip.
2. The communication method of the daisy chain according to claim 1, wherein After sending the first data through the first I / O port and before receiving the updated first data through the second I / O port, the method includes: Latch the ACK signal to prohibit transmitting the ACK signal through the second I / O port.
3. The communication method of the daisy chain according to claim 1, wherein In the process that the front-end chip sequentially sends a plurality of the data codes in the write data through the second I / O port based on the first time threshold, and the sending time interval is greater than or equal to the first time threshold, specifically perform the following steps: Obtain the sending duration of the current data code. The sending duration is the duration after the current data code is sent through the second I / O port; Real-time receive data codes through the first I / O port; Control whether to send the real-time received data code through the second I / O port based on the sending duration; wherein: When the sending duration is less than the first time threshold, latch the real-time received data code; When the sending duration is greater than or equal to the first time threshold, send the real-time received data code through the second I / O port.
4. The communication method of the daisy chain according to claim 1, wherein, The method for transparently transmitting the communication end signal and the communication command includes: Each front-end chip performs the following steps; After receiving the communication end signal through the first I / O port, transmit the communication end signal through the second I / O port; After receiving the communication command through the first I / O port, transmit the communication command through the second I / O port.
5. The communication method of the daisy chain according to claim 1, characterized in that Before sending the communication command, the master control unit also sends a communication start signal; After the master control unit sends the communication start signal, each front-end chip performs the following steps: Monitor the communication start signal; After receiving the communication start signal through the first I / O port, transmit the communication start signal through the second I / O port and monitor the communication command in real time.
6. A battery management system, characterized in that, A communication method for implementing the daisy chain according to any one of claims 1 to 5, the system includes: a master control unit and a daisy chain, the daisy chain includes N front-end chips electrically connected in sequence, where N is an integer and N≥1; each front-end chip includes a first I / O port and a second I / O port, the second I / O port of each front-end chip is connected to the first I / O port of the next front-end chip along the downstream communication direction of the daisy chain, and the first I / O port of the first front-end chip is coupled to the master control unit; The master control unit is used to send a communication command, write data, an ACK signal, and a communication end signal to the first front-end chip, where the communication end signal and the communication command are both transparent transmission signals; Each of the front-end chips is used to: monitor the communication command and the communication end signal in real time; When receiving the communication command, judge the type of the received communication command; if the communication command is a read command, send the data in the current front-end chip through the first I / O port, and receive the first data through the second I / O port; monitor the ACK signal in real time; if the ACK signal is received, send the first data through the first I / O port; receive the updated first data through the second I / O port to update the data in the current front-end chip; and transmit the ACK signal through the second I / O port; after updating the data in the current front-end chip, monitor the ACK signal in the next time period in real time; if the communication command is a write command, receive the write data through the first I / O port, and the write data includes a plurality of data codes; based on a first time threshold, sequentially send a plurality of the data codes in the write data through the second I / O port, and the transmission time interval is greater than or equal to the first time threshold; When receiving the communication end signal, latch the data in the current front-end chip.
7. The battery management system according to claim 6, characterized in that, The battery management system further includes a bridge chip, the first end of the bridge chip is coupled to the master control unit, and the second end of the bridge chip is connected to the first I / O port of the first front-end chip.
8. The battery management system according to claim 6, wherein, The front-end chip is further configured to: latch the ACK signal after sending the first data through the first I / O port and before receiving updated first data through the second I / O port, so as to prohibit the transmission of the ACK signal through the second I / O port.
9. The battery management system according to claim 6, characterized in that, The front-end chip is further configured to: obtain the sending duration of the current data code, where the sending duration is the duration recorded after the current data code is sent through the second I / O port; receive data codes in real time through the first I / O port; control whether to send the data codes received in real time through the second I / O port based on the sending duration; wherein, when the sending duration is less than the first time threshold, latch the data code in the current front-end chip; when the sending duration is greater than or equal to the first time threshold, send the data codes received in real time through the second I / O port.
10. The battery management system according to claim 6, characterized in that, The front-end chip is further configured to, if the communication command or the communication command is received through the first I / O port, transmit the communication command through the second I / O port, or transmit the communication end signal through the second I / O port.
11. The battery management system according to claim 6, characterized in that, The main control unit is further configured to send a communication start signal to the first I / O port of the first front-end chip before sending a communication command to the first I / O port of the first front-end chip; Each front-end chip is further configured to, after the first I / O port receives the communication start signal, monitor the communication start signal; after receiving the communication start signal through the first I / O port, transmit the communication start signal through the second I / O port, and monitor the communication command in real time.