Data processing circuits, methods, apparatus, chips, and charging devices

By implementing a data processing circuit for synchronous pulse detection and counter decoding on a hardware peripheral, the incompatibility problem caused by different fast charging protocols is solved, and physical layer data processing of multiple fast charging protocols is realized, reducing costs and improving compatibility and efficiency.

CN117880388BActive Publication Date: 2026-11-10ZHEJIANG GEOFORCECHIP TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311788242.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-22
Publication Date
2026-11-10
Estimated Expiration
2043-12-22

AI Technical Summary

Technical Problem

Different fast charging protocol specifications released by various electronic device manufacturers mean that fast charging can only be performed using the manufacturer's proprietary power supply equipment, resulting in inconvenience and waste of resources. There are few chips on the market that support multiple fast charging protocols, and improvement solutions have limitations.

Method used

The data processing circuit using the same hardware peripheral detects the synchronization pulse through the first state machine and enters the data receiving state. It uses the first counter to count and the processing module to decode, supporting physical layer data processing of multiple fast charging protocols, including FCP and SCP protocols.

Benefits of technology

It achieves physical layer processing that supports multiple fast charging protocols simultaneously on a single chip, with a simple structure, reduced cost, and improved data transmission compatibility and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117880388B_ABST
    Figure CN117880388B_ABST
Patent Text Reader

Abstract

This application proposes a data processing circuit, method, apparatus, chip, and charging device. The data processing circuit includes a first counter, a first state machine, and a processing module. The first state machine enters a synchronization pulse detection state upon receiving a rising edge of a synchronization pulse and enters a data receiving state after detecting a preset synchronization pulse signal. The first counter starts counting when the first state machine enters the data receiving state and resets to zero and starts counting again after receiving the next rising edge. The processing module decodes each received bit value based on the symbol period of the ping sequence and the count values ​​of the first counter. This data processing circuit can process the transmission data of multiple fast charging protocols using the same hardware peripheral, achieving compatible processing of multiple fast charging protocols.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, specifically relating to a data processing circuit, method, apparatus, chip, and charging device. Background Technology

[0002] Currently, major electronic device manufacturers have released their own fast charging protocols. However, the different protocol specifications of each manufacturer mean that each device can only be fast charged using the power supply equipment proprietary to its manufacturer. Otherwise, it can only be charged using the default slow charging specification, which causes great inconvenience and waste of resources.

[0003] To standardize the chaotic fast charging protocol ecosystem in my country, major terminal manufacturers and industry associations have jointly launched a fast charging protocol called Universal Fast Charging Specification (UFCS). However, there are currently few chips on the market that support this protocol, and most power supply devices can only handle one fast charging protocol.

[0004] It should be noted that the above statements are only used to provide background information related to this application and do not necessarily constitute prior art. Summary of the Invention

[0005] This application proposes a data processing circuit, method, apparatus, chip, and charging device that can process the transmission data of multiple fast charging protocols using the same hardware peripheral, thereby achieving compatible processing of multiple fast charging protocols.

[0006] A first aspect of this application provides a data processing circuit, the circuit including a first counter, a first state machine, and a processing module; the first state machine receives a rising edge of a synchronization pulse and enters a synchronization pulse detection state; and after detecting a preset synchronization pulse signal, it enters a data receiving state;

[0007] The first counter starts counting when the first state machine enters the data receiving state, and is reset to zero and starts counting again after the next transition edge is received;

[0008] The processing module decodes each received bit value based on the symbol period of the ping sequence and the count values ​​of the first counter.

[0009] In some embodiments of this application, during the data receiving state, the processing module determines the number of bits received in the current counting cycle based on the ratio of the count value of the current counting cycle to the symbol cycle, and determines the received bit value based on the type of transition edge that triggers the current counting cycle.

[0010] In some embodiments of this application, when the ratio of the count value of the current counting period to the symbol period is close to an integer, the processing module determines the number of bits that the same number as the ratio has been received in the current counting period.

[0011] If the ratio of the count value in the current counting period to the symbol period is close to one-quarter, the processing module determines that no new bit value has been received in the current counting period.

[0012] In some embodiments of this application, when the transition edge that triggers the current counting cycle is a falling edge, the processing module determines that all bits received in the current counting cycle are bit 0.

[0013] If the transition edge that triggers the current counting cycle is a rising edge, the processing module determines that all bits received in the current counting cycle are bits 1.

[0014] In some embodiments of this application, when the ratio of the count value to the symbol period is close to an integer, the first state machine generates a corresponding bit length signal; the processing module determines the number of received bits based on the bit length signal.

[0015] In some embodiments of this application, a second state machine is also included. The second state machine receives a rising edge, performs ping sequence detection, and responds with a ping sequence after receiving a preset ping sequence.

[0016] In some embodiments of this application, a second counter is further included, which is used to count the reception time of a preset ping sequence, and the processing module calculates the symbol period of the ping sequence based on the count value of the second counter.

[0017] In some embodiments of this application, the processing module is further configured to determine whether a data packet transmission error occurs during the data reception process based on the count value of the first counter; and, in the event of a data packet transmission error, to stop decoding the received data; the data packet transmission error includes one or more of data width abnormality, synchronization signal error, and parity error.

[0018] In some embodiments of this application, a third counter is also included, which is used to count the number of bits of the current frame that have been received;

[0019] The processing module is further configured to determine, based on the count value of the third counter, whether a data packet transmission error has occurred during the data reception process; the data packet transmission error includes data bit width greater than or less than a preset threshold.

[0020] In some embodiments of this application, a third state machine is also included. The third state machine receives a data transmission signal from the microcontroller, enters a data transmission state, performs synchronization signal transmission and data packet transmission, and enters a ping termination state after the data packet transmission is completed.

[0021] A second aspect of this application provides a data processing method, the method comprising:

[0022] Upon receiving the rising edge of the synchronization pulse, perform synchronization pulse signal detection;

[0023] Upon detecting a preset synchronization pulse signal, data reception commences.

[0024] Determine the time interval between two adjacent transition edges;

[0025] The received bit values ​​are decoded based on the symbol period of the ping sequence and the time interval between each two adjacent transition edges.

[0026] An embodiment of a third aspect of this application provides a data processing apparatus, the apparatus comprising:

[0027] The synchronization signal detection module is used to receive the rising edge of the synchronization pulse and perform synchronization pulse signal detection.

[0028] The data receiving module is used to detect a preset synchronization pulse signal and receive data.

[0029] The transition edge interval determination module is used to determine the time interval between two adjacent transition edges;

[0030] The data decoding module is used to decode each received bit value based on the symbol period of the ping sequence and the time interval between each two adjacent transition edges.

[0031] An embodiment of the fourth aspect of this application provides a chip on which the data processing circuit described in the first aspect or the data processing device described in the third aspect is integrated.

[0032] An embodiment of the fifth aspect of this application provides a charging device, including a microcontroller and the data processing circuit described in the first aspect, or the data processing apparatus described in the third aspect.

[0033] The technical solutions provided in this application embodiment have at least the following technical effects or advantages:

[0034] The data processing circuit provided in this application embodiment detects the synchronization pulse signal and receives data through a first state machine, and counts the time interval between two adjacent transition edges when receiving data through a first counter. Then, the processing module decodes the data received within the time interval according to the symbol period of the ping sequence and the time interval between two adjacent transition edges, thus realizing the transmission and decoding of data at the physical layer. Moreover, the data processing circuit has a simple structure and can be implemented on a single chip. It can also support physical layer processing of multiple protocols, including but not limited to FCP and SCP protocols. Attached Figure Description

[0035] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings.

[0036] In the attached diagram:

[0037] Figure 1 A waveform diagram illustrating the data transmission process between the master and slave devices is shown.

[0038] Figure 2 A schematic diagram illustrating the communication flow defined by the physical layer of the FCP and SCP protocols is shown.

[0039] Figure 3 This invention provides a schematic diagram of the structure of a data processing circuit according to an embodiment of the present application.

[0040] Figure 4a The waveforms of the synchronization pulse signal and the most significant bit of the first frame of data as specified in the FCP and SCP protocols are shown.

[0041] Figure 4b The waveforms of the synchronization pulse signal and the most significant bit of the first frame of data as specified in the FCP and SCP protocols are shown.

[0042] Figure 5 A schematic diagram of the structure of the first state machine in one embodiment of this application is shown;

[0043] Figure 6 A schematic diagram of the structure of the second state machine in one embodiment of this application is shown;

[0044] Figure 7 A schematic diagram of the third state machine in one embodiment of this application is shown;

[0045] Figure 8 A schematic flowchart of a data processing method provided in an embodiment of this application is shown;

[0046] Figure 9 A schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application is shown. Detailed Implementation

[0047] Exemplary embodiments of this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art.

[0048] It should be noted that, unless otherwise stated, the technical or scientific terms used in this application shall have the ordinary meaning as understood by one of ordinary skill in the art to which this application pertains.

[0049] In related technologies, major electronic device manufacturers have released their own fast charging protocols, the most mainstream of which include Quick Charge (QC), VFCP (VIVO Flash Charge Protocol), FCP (Fast Charger Protocol), and SCP (Super Charge Protocol). However, due to the different protocol specifications of each manufacturer, the terminal can only be fast charged using the proprietary power supply equipment of each manufacturer. Otherwise, the terminal can only be charged using the default slow charging specification, which causes great inconvenience and waste of resources.

[0050] To standardize the fragmented fast charging protocol ecosystem in my country, major terminal manufacturers and industry associations jointly launched the Unified Fast Charging Standard (UFCS). However, currently, there are relatively few chips on the market that support this protocol, and most power supply devices can only process data from a single fast charging protocol. Furthermore, existing solutions capable of recognizing and processing multiple fast charging protocols require hardware improvements to the processing chip that handles one protocol. These improvements might involve redesigning peripheral circuits or stacking two or more chips supporting different fast charging protocols. However, these chip-based improvements have limitations and significant drawbacks. For example, some redesigned peripheral circuits cannot support protocol updates, and stacking multiple chips leads to a substantial increase in cost and packaging area.

[0051] This embodiment analyzes the data transmitted by relevant fast charging protocols and finds that the physical layers of the FCP and SCP protocols are the same. Both physical layers stipulate that each communication between the master device (e.g., a terminal device) and the slave device (e.g., a power supply device charging the terminal device) begins with the sending and responding of a ping sequence. That is, the master device sends a ping sequence to the slave device, and the slave device needs to reply with a ping sequence within a specified time. Since both FCP and SCP protocols are single-wire half-duplex protocols, all data transmission and reception occur on a single DM signal line. This sending and receiving of ping sequences is reflected in the waveform as symmetrical ping pulses. After the symmetrical ping sequences are sent by both parties, the master device sends a synchronization pulse signal to the slave device. Only after this synchronization pulse signal is sent does the data transmission process begin. The specific waveform diagram is shown below. Figure 1 As shown. Furthermore, the symbol period is the same in the physical layer during the transmission of the ping sequence and the transmission of data, meaning that the transmitted data can be decoded based on the symbol period of the ping sequence.

[0052] The ping sequence is a high-level pulse. The FCP and SCP protocols specify that the ping sequence is a high-level pulse with a duration of 16 UI. 1 UI stands for Unit Interval, with a standard duration of 160 µs (microseconds). A certain margin of error is allowed; for example, a value within the range of 144 µs to 176 µs is considered a compliant 1 UI value. This 1 UI is also the symbol period for data transmission based on the FCP and SCP protocols. The FCP and SCP protocols also specify that the synchronization pulse signal consists of two consecutive rising edges, with each rising edge having a width of 1 / 4 UI. The communication process specified by the physical layer of the FCP and SCP protocols is as follows: Figure 2 As shown in the figure, t PING This indicates the ping interactions between the master and slave devices during this time period; t PMST This indicates that the master device sends a ping sequence during this time period; t WAIT The transaction interval refers to the time between ping sequences sent by the master device. If the slave device does not respond to a ping sequence after the master device sends it, the master device can resend the ping sequence after a certain period. This period is called the transaction interval and its duration is 1 UI to 5 UI. FC_LOW This indicates the time during which the sending device must actively drive the bus low after the transmission is completed, with a duration of 1 UI; t PSLV This indicates the sequence of ping responses from the device within that time period; t MREQ This indicates the duration of the request window after the slave device responds to the ping, with a standard duration of 1UI to 2UI. During this time period, the master device regains control of the bus (DM line) and prepares to send data; TB / 4 The UI / 4 time represents the data width of a synchronization pulse signal, that is, the data width of the rising edge of a synchronization pulse.

[0053] Therefore, the same hardware circuit can be used to perform physical layer data processing on both FCP-based and SCP-based data, including physical layer data reception and transmission, as well as data decoding.

[0054] Based on the above findings, this application provides a data processing circuit. Upon receiving the rising edge of a synchronization pulse, the circuit performs synchronization pulse detection. After detecting the synchronization pulse signal specified by the protocol, it begins data reception and counting. Upon receiving the next transition edge, the count is reset and restarted. Then, based on the symbol period of the ping sequence and each count value, the received bit values ​​can be decoded. Thus, by using the symbol period of the ping sequence and the time interval between two adjacent transition edges, the data received within that time interval can be decoded, realizing data transmission and decoding at the physical layer. Furthermore, this data processing circuit has a simple structure, can be implemented on a single chip, and can support physical layer processing of multiple protocols, including but not limited to FCP and SCP protocols.

[0055] The aforementioned data processing circuit can be applied to the aforementioned slave device to perform physical layer communication with the aforementioned master device and to perform physical layer data transmission. It can support protocols including but not limited to FCP and SCP. As long as the physical layer transmission principle is similar, it first performs symmetrical transmission of the ping sequence, then transmits the synchronization pulse, and only after both are successfully transmitted can data transmission be performed.

[0056] The embodiments of this application will now be described in detail with reference to the accompanying drawings.

[0057] Please refer to Figure 3 The attached diagram is a structural schematic of the data processing circuit provided in an embodiment of this application. Figure 3 As shown, the data processing circuit includes a first counter, a first state machine, and a processing module. The first state machine receives a rising edge of a synchronization pulse and enters a synchronization pulse detection state; after detecting a preset synchronization pulse signal, it enters a data receiving state. The first counter starts counting when the first state machine enters the data receiving state, and resets to zero and restarts counting after receiving the next rising edge. The processing module decodes each received bit value based on the symbol period of the ping sequence and the count values ​​of the first counter.

[0058] The first state machine may include registers and logic gates. The value of the register can determine whether a rising edge of a synchronization pulse has been received and whether a preset synchronization pulse signal has been detected. The received code data can also be stored in the register. This embodiment does not specifically limit the structure of the first state machine, as long as it can realize the detection of the aforementioned synchronization pulse signal and data reception.

[0059] The rising edge of the synchronization pulse is the rising edge of the synchronization pulse signal. The preset synchronization pulse signal can be understood as the synchronization pulse signal specified in the protocol.

[0060] The data processing circuit provided in this embodiment detects the synchronization pulse signal and receives data through a first state machine, and counts the time interval between two adjacent transition edges when receiving data through a first counter. Then, the processing module decodes the data received within the time interval according to the symbol period of the ping sequence and the time interval between two adjacent transition edges, thus realizing the transmission and decoding of data at the physical layer. Moreover, the data processing circuit has a simple structure and can be implemented on a single chip. It can also support physical layer processing of multiple protocols, including but not limited to FCP and SCP protocols.

[0061] Specifically, such as Figure 4a and Figure 4b The figures shown are waveforms of the synchronization pulse signal and the most significant bit of the first frame of data as specified in the FCP and SCP protocols. Figure 4a The most significant bit of the first frame of data is bit 1. Figure 4b The most significant bit of the first frame of data is bit 0. For example... Figure 4a and Figure 4b As shown, before sending the most significant bit (MSB) of the first frame of the data packet, a synchronization pulse signal is sent first, which consists of two rising edges with a pulse width of 1 / 4UI, to synchronize the clocks at both ends of the communication. Receiving this synchronization pulse signal can be regarded as the clocks at both ends of the communication being successfully synchronized, and data transmission can proceed.

[0062] like Figure 5 The diagram shown is a schematic of the first state machine. Table 1 lists the state machines. Figure 5 The jump conditions are explained in the text. Figure 5As shown in Table 1, the workflow of the first state machine is as follows: After startup, the first state machine is either in an idle state or a data receiving state (data_rx). When a frame of data is received, a rising edge of the synchronization pulse signal is detected, and the machine enters the synchronization pulse signal detection state to determine whether two rising edges with a pulse width of 1 / 4UI have been detected. When the first counter counts to 1 / 4UI and a new transition edge is detected, the machine enters the data receiving state, where the received data is decoded based on the count values ​​of the first counter and the symbol period of the ping sequence. After a data packet is received, the machine enters the data receiving completion state, where it can continue receiving the end ping sequence. When both a data packet and the end ping sequence are received, the first state machine returns to the idle state. Additionally, if a reception error occurs during the operation of the first state machine, it also returns to the idle state.

[0063] Table 1

[0064]

[0065] In some embodiments, the data processing circuit may further include a second state machine for responding to a ping sequence sent by the master device. Specifically, the second state machine receives a rising edge, performs ping sequence detection, and replies with a ping sequence after receiving a preset ping sequence.

[0066] The second state machine can also be composed of registers and logic gates. This embodiment does not specifically limit its structure, as long as it can realize the functions of receiving, detecting, and responding to ping sequences. The standard length value of the pulse signal received by the second state machine is different from the standard length value of the synchronization pulse signal received by the first state machine, thereby distinguishing between ping pulse signals and synchronization pulse signals.

[0067] This embodiment uses a second state machine to respond to the ping sequence, i.e., to send the ping sequence response. This second state machine can be executed independently of the first state machine, improving data processing efficiency and making the operation simpler and more reliable. It is understood that using a second state machine to respond to the ping sequence is only one embodiment of this application; this embodiment could also use a single state machine that can both detect synchronization pulse signals and receive data.

[0068] like Figure 6 The diagram shown is a schematic of the second state machine. Table 2 lists the... Figure 6 The jump conditions are explained in the text. Figure 6As shown in Table 2, the workflow of the second state machine is as follows: After the second state machine starts, it enters the ping waiting state. If a rising edge is detected, it enters the ping sequence detection state to check whether the received ping sequence conforms to the specifications of the fast charging protocol used for the current data transmission. If a ping sequence conforming to the fast charging protocol is received, a ping reply is sent, that is, in response to the ping sequence of the master device, a ping sequence is sent back to the master device. After the ping reply is completed, it re-enters the ping waiting state. Conversely, if a ping sequence that does not conform to the fast charging protocol is received, it returns to the ping waiting state.

[0069] Table 2

[0070] Jump condition number Conditions 1 When in wait_ping state, a rising edge is detected. 2 Received a ping sequence that conforms to the specifications 3 No compliant ping sequence was received. 4 Ping response complete

[0071] Furthermore, the data processing circuit may also include a second counter, which is used to count the reception time of the preset ping sequence, and the processing module calculates the symbol period of the ping sequence based on the count value of the second counter.

[0072] The preset ping sequence can be understood as the ping sequence specified in the fast charging protocol used for the current data transmission. For example, the FCP and SCP protocols specify that the total duration of the ping sequence is 16 UI.

[0073] In this embodiment, since the physical layer receives the ping sequence and transmits data based on the same fast charging protocol, it can be assumed that the symbol period of the ping sequence and the symbol period of the transmitted data are the same, and the relationship between the total duration of the ping sequence and UI is specified by the fast charging protocol. For example, the total duration is equal to 16UI. Therefore, the UI value, i.e. the symbol period of the ping sequence, can be calculated based on the count value of the second counter and the relationship between the total duration of the ping sequence and UI.

[0074] It is understandable that the second counter and the first counter mentioned above can be the same counter to save hardware resources, or they can be different counters that count independently, making operation simpler.

[0075] In other embodiments, when receiving data, the processing module can determine the number of bits received in the current counting cycle based on the ratio of the count value of the current counting cycle to the symbol cycle, and determine the received bit value based on the type of transition edge that triggers the current counting cycle.

[0076] The transition edge that triggers the current counting cycle can be understood as the transition edge that begins the current counting cycle and also the transition edge that ends the previous counting cycle. For the first bit in a frame of data, for example... Figure 4a and Figure 4bAs shown, since the synchronization pulse signal is also high, if the first bit is 1, the transition edge triggering the current counting cycle is the second rising edge of the synchronization pulse signal; if the first bit is 0, the transition edge triggering the current counting cycle is the first falling edge after the synchronization pulse signal. The transition edge can be either a rising edge or a falling edge.

[0077] In this embodiment, during normal data reception, the baud rate of data transmission remains constant. Theoretically, when one bit value is received, the count value of the first counter is 1UI; when two bits are received, the count value is 2UI; when three bits are received, the count value is 3UI, and so on. Therefore, there is a one-to-one correspondence between the count value of the first counter and the number of bits received. Furthermore, data received between two adjacent transition edges has the same logical value, which can be both 1 or both 0, determined by the edge at the start of the counting cycle. Thus, by simply using the count value of the first counter and the type of transition edge that triggers the counting cycle, the currently received bit value can be accurately determined without requiring further waveform processing or complex calculations, resulting in both high accuracy and high efficiency.

[0078] Specifically, when determining the number of bits, based on the data reception principle described above, if the ratio of the count value of the current counting period to the symbol period is close to an integer, the processing module determines that the current counting period has received the same number of bits as that ratio; if the ratio of the count value of the current counting period to the symbol period is close to one-quarter, the processing module determines that the current counting period has not received any new bit values.

[0079] The ratio of the count value to the symbol period is close to an integer, which can be understood as the difference between the count value and an integer multiple of the symbol period being close to a certain value, such as ±1 / 4 UI. The ratio of the count value to the symbol period is close to one-quarter, which can be understood as the difference between the count value and one-quarter of the symbol period being close to a certain value, such as ±1 / 16 UI or ±1 / 8 UI.

[0080] In this embodiment, if the ratio of the current counting period's count value to the symbol period is close to an integer, it can be interpreted as normal data reception, and the number of received bits can be further determined. If the ratio of the current counting period's count value to the symbol period is close to one-quarter, it indicates that no data reception is currently occurring, and it may be due to the transmission of inter-frame synchronization pulse signals to resynchronize the clocks at both ends of the device.

[0081] When determining bit values, if the transition edge that triggers the current counting cycle is a falling edge, the processing module determines that all bits received in the current counting cycle are bit 0; if the transition edge that triggers the current counting cycle is a rising edge, the processing module determines that all bits received in the current counting cycle are bit 1.

[0082] In this embodiment, if the counting cycle is triggered by a falling edge, it means that the counting cycle is always at a low level; if the counting cycle is triggered by a rising edge, it means that the counting cycle is always at a high level. This allows for the rapid determination of the received bit value.

[0083] Furthermore, multiple flag signals can be set. When the ratio of the count value to the symbol period is close to an integer, the first state machine generates the corresponding bit number signal; the processing module determines the number of received bits based on the bit number signal.

[0084] Among them, the bit position signal can be a high-level signal. When a certain bit position signal is high, it can be determined that the number of bits corresponding to that bit position signal has been received.

[0085] In this embodiment, by generating a bit count signal, the processing module can quickly determine the number of received bits, saving calculation time and further improving decoding efficiency.

[0086] Specifically, if a data frame includes 8 data bits + 1 parity bit, totaling 9 bits, and considering that a synchronization pulse signal may be sent between two data frames or two data packets, meaning the count value may also be close to 1 / 4UI, then 10 flag signals can be set: w_bitnum_1, w_bitnum_2, w_bitnum_3, w_bitnum_4, w_bitnum_5, w_bitnum_6, w_bitnum_7, w_bitnum_8, w_bitnum_9, and w_1_4_ui. Among these, w_bitnum_1 to w_bitnum_9 are bit count flag signals; after receiving data, the corresponding flag signal is pulled high to represent the number of bits currently received. w_1_4_ui is pulled high when the count value is close to 1 / 4UI, indicating that a synchronization pulse signal has been received. At this time, the number of bits in the currently parsed bit value is updated, but the parsed bit value itself is not updated. See Table 3 below for details. The data parsing process is as follows:

[0087] Table 3

[0088]

[0089] 1) If the ratio of the count value to the symbol period is close to an integer 1, the time interval between two adjacent transition edges can be considered as 1UI. At this time, the first bit in a frame of data can be received, or a bit value different from the previous logical value. The w_bitnum_1 signal flag is set high, so the processing module can directly determine that a bit value has been received based on the high w_bitnum_1 signal flag during decoding. Then, the specific bit value can be determined based on the type of transition edge that triggers the current counting period. If it is triggered by a falling edge, the parsed bit value is 1'b0 (bit length is 1, bit value is 0); if it is triggered by a rising edge, the parsed bit value is 1'b1 (bit length is 1, bit value is 1).

[0090] 2) If the ratio of the count value to the symbol period is close to an integer 2, the time interval between two adjacent transition edges can be considered as 2UI. In this case, two bit values ​​with the same logical value can be received. The w_bitnum_2 signal flag is pulled high, and the processing module can directly determine that two identical bit values ​​have been received based on the high w_bitnum_2 signal flag during decoding. Then, the specific bit value can be determined based on the type of transition edge that triggers the current counting period. If it is triggered by a falling edge, the parsed bit value is 2'b00 (2 bits, 0 bits); if it is triggered by a rising edge, the parsed bit value is 2'b11 (2 bits, 1 bit).

[0091] 3) If the ratio of the count value to the symbol period is close to an integer 3, the time interval between two adjacent transition edges can be considered as 3UI. In this case, three bit values ​​with the same logical value can be received. The w_bitnum_3 signal flag is pulled high, and the processing module can directly determine that three identical bit values ​​have been received based on the high w_bitnum_3 signal flag during decoding. Then, the specific bit value can be determined based on the type of transition edge that triggers the current counting period. If it is triggered by a falling edge, the parsed bit value is 3'b000 (3 bits, 0 bits); if it is triggered by a rising edge, the parsed bit value is 3'b111 (3 bits, 1 bit).

[0092] 4) If the ratio of the count value to the symbol period is close to an integer 4, the time interval between two adjacent transition edges can be considered as 4UI. In this case, four bit values ​​with the same logical value can be received. The w_bitnum_4 signal flag is pulled high, and the processing module can directly determine that four identical bit values ​​have been received based on the high w_bitnum_4 signal flag during decoding. Then, the specific bit value can be determined based on the type of transition edge that triggers the current counting period. If it is triggered by a falling edge, the parsed bit value is 4'b0000 (4 bits, 0 bits); if it is triggered by a rising edge, the parsed bit value is 4'b1111 (4 bits, 1 bit).

[0093] 5) If the ratio of the count value to the symbol period is close to an integer 5, then the time interval between two adjacent transition edges can be considered as 5UI. At this time, five bit values ​​with the same logical value can be received. If the w_bitnum_5 signal flag is pulled high, the processing module can directly determine that five identical bit values ​​have been received based on the high w_bitnum_5 signal flag during decoding. Then, the specific bit value can be determined according to the type of transition edge that triggers the current counting period. If it is triggered by a falling edge, the parsed bit value is 5'b00000 (5 bits, 0 bits); if it is triggered by a rising edge, the parsed bit value is 5'b11111 (5 bits, 1 bit).

[0094] 6) If the ratio of the count value to the symbol period is close to an integer 6, the time interval between two adjacent transition edges can be considered as 6UI. In this case, six bits with the same logical value can be received. The w_bitnum_6 signal flag is pulled high, and the processing module can directly determine that six identical bit values ​​have been received based on the high w_bitnum_6 signal flag during decoding. Then, the specific bit value can be determined based on the type of transition edge that triggers the current counting period. If it is triggered by a falling edge, the parsed bit value is 6'b000000 (6 bits, 0 bits); if it is triggered by a rising edge, the parsed bit value is 6'b111111 (6 bits, 1 bit).

[0095] 7) If the ratio of the count value to the symbol period is close to an integer 7, then the time interval between two adjacent transition edges can be considered as 7UI. In this case, seven bits with the same logical value can be received. The w_bitnum_7 signal flag is pulled high, so the processing module can directly determine that seven identical bit values ​​have been received based on the high w_bitnum_7 signal flag during decoding. Then, the specific bit value can be determined based on the type of transition edge that triggers the current counting period. If triggered by a falling edge, the parsed bit value is 7'b0000000 (7 bits, 0 bits); if triggered by a rising edge, the parsed bit value is 7'b1111111 (7 bits, 1 bit).

[0096] 8) If the ratio of the count value to the symbol period is close to an integer 8, then the time interval between two adjacent transition edges can be considered as 8UI. In this case, eight bits with the same logical value can be received. The w_bitnum_8 signal flag is pulled high, and the processing module can directly determine that eight identical bit values ​​have been received based on the high w_bitnum_8 signal flag during decoding. Then, the specific bit value can be determined based on the type of transition edge that triggers the current counting period. If triggered by a falling edge, the parsed bit value is 8'b00000000 (8 bits, 0 bits); if triggered by a rising edge, the parsed bit value is 8'b11111111 (8 bits, 1 bit).

[0097] 9) If the ratio of the count value to the symbol period is close to an integer 9, then the time interval between two adjacent transition edges can be considered as 9UI. At this time, nine bits with the same logical value can be received. If the w_bitnum_9 signal flag is pulled high, the processing module can directly determine that nine identical bit values ​​have been received based on the high w_bitnum_9 signal flag during decoding. Then, the specific bit value can be determined according to the type of transition edge that triggers the current counting period. If it is triggered by a falling edge, the parsed bit value is 9'b000000000 (9 bits, 0 bits); if it is triggered by a rising edge, the parsed bit value is 9'b111111111 (9 bits, 1 bit).

[0098] 10) If the ratio of the count value to the symbol period is close to an integer 1 / 4, then the time interval between the two adjacent transition edges can be regarded as 1 / 4UI. It can be determined that the received signal is a synchronization pulse signal. The w_1_4_ui signal flag is pulled high, and the processing module does not need to perform data parsing.

[0099] In this embodiment, after parsing the received data, an interrupt can be generated by receiving data frame by frame. The current frame data is written into the corresponding shift register, and the currently parsed data can be buffered through shifting operations in the shift register. Alternatively, an interrupt can be generated by receiving data packet by packet, and each frame data in a data packet is stored sequentially into random-access memory (RAM). The completion of receiving a packet is marked by the end of the ping sequence. After receiving the interrupt signal reported by the data processing circuit, the microcontroller can read the data from the register or RAM.

[0100] In other embodiments, during the data reception state, a data packet reception error may occur. Correspondingly, the processing module is further configured to determine whether a data packet transmission error has occurred during the data reception process based on the count value of the first counter; and, in the event of a data packet transmission error, to stop decoding the received data.

[0101] Data packet transmission errors include one or more of the following: abnormal data width, synchronization signal errors, and parity errors. Abnormal data width occurs when the time taken to receive a logical value is neither the 1 UI per bit transmission time specified in the fast charging protocol nor the 1 / 4 UI width of the synchronization pulse signal. For example, if the count value from one edge to the next is 1 / 2 UI, then this 1 / 2 UI is neither the 1 UI per bit transmission time specified in the fast charging protocol nor 1 / 4 UI of the synchronization pulse, which constitutes a data width violation of the fast charging protocol, i.e., an abnormal data width.

[0102] A synchronization signal error can be understood as follows: when the first state machine is in the synchronization signal detection state, a segment of the first counter's count value significantly exceeds the configuration margin of 1 / 4UI, for example, it could be 1 / 16UI or 1 / 8UI. That is, the count value between the transition edges of the two synchronization pulse signals does not conform to the fast charging protocol specifications, thus confirming a data packet transmission error, and the error type is a 1 / 4UI pulse synchronization signal error between data.

[0103] Parity checking can be understood as follows: Add the alternating 0s and 1s of the data to be checked. If the result is odd, it means there are an odd number of 1s in the data string, and the parity check passes. Otherwise, it fails. After each frame of data (9 bits) is received, these 9 bits are added together. If the lower bits of the result are 1 (the higher bits can overflow), the parity check passes; otherwise, it fails, indicating a data packet transmission error occurred during data transmission.

[0104] This embodiment performs data packet transmission error detection during the data reception process, which can promptly detect data packet transmission errors and stop subsequent data parsing, thereby reducing the parsing error rate and improving the accuracy of data parsing.

[0105] Furthermore, data packet transmission errors may also include data bit widths greater than or less than a preset threshold. Correspondingly, the data processing circuit may also include a third counter, which can be used to count the number of bits received in the current frame. The processing module is also used to determine whether a data packet transmission error has occurred during the data reception process based on the count value of the third counter.

[0106] The preset threshold can be set according to the number of bits contained in each frame of data in the data packet format specified by the fast charging protocol. For example, the FCP protocol and SCP protocol specify that a frame of data includes 9 bits.

[0107] In this embodiment, a third counter can be used to count how many bits of data have been received in the current frame. If the first state machine is in the data receiving state, and after receiving the end ping sequence, if the received data bit width is less than a preset threshold, it is determined that a data packet transmission error has occurred during data transmission, and the error type is "data bit width too small". If the received data bit width is greater than the preset threshold, it is determined that a data packet transmission error has occurred during data transmission, and the error type is "data bit width too large".

[0108] In other embodiments, the data processing circuit may further include a third state machine, which can be used for data transmission. Specifically, the third state machine receives a data transmission signal from the microcontroller, enters a data transmission state, performs synchronization signal transmission and data packet transmission, and enters a ping termination state after the data packet transmission is completed.

[0109] In this embodiment, the data frames to be sent in a data packet can be written into the RAM in sequence, and the length of the data to be sent can be configured through the register. Then, the third state machine can be started to send the data. In this way, after the previous frame of data is sent, there is no need to request the next frame of data from the software through an interrupt when sending the next frame of data. Therefore, there is no need to pause between the sending of each frame of data, which can improve the data sending efficiency and accuracy.

[0110] Specifically, the duration of the ping sequence can be set through register configuration, thus making the UI value adjustable. Even if there is a certain error in the UI values ​​of the two communication ends, the UI value can be adjusted according to the needs of the slave device (charging device).

[0111] like Figure 7 The diagram below shows the structure of the third state machine, as shown in Table 4. Figure 7The transition conditions are explained below, and the workflow of the third state machine is as follows: When the third state machine is in the idle state, if it receives a data transmission start signal (i_tran_start), it starts data transmission, first sending a synchronization signal, then sending data. Synchronization signals are sent between adjacent data frames. After all data packets have been sent, the end ping sequence is sent. After the end ping sequence is completed, it returns to the idle state.

[0112] Table 4

[0113] Jump condition number Conditions 1 Upon receiving the i_tran_start signal, transmission is initiated. 2 The 1 / 4 UI synchronization signal has been sent, but the current frame data has not yet been sent. 3 The current frame data has been sent, but the current data packet has not yet been sent. 4 All data frames in the current data packet have been sent. 5 End of data packet transmission (ping completed)

[0114] It should be noted that the packet-based transmission method described above is only one transmission method in this embodiment. This embodiment can also adopt a frame-based transmission method, that is, transmit frame by frame and generate an interrupt. It has the function of buffering frames. An interrupt will be generated before a frame of data is transmitted. After the microcontroller receives the interrupt, it writes the next frame of data to be transmitted. In this way, the microcontroller has enough time to write the next frame of data. After the current frame is transmitted, the next frame of data is already prepared in the buffer area and can be transmitted without delay. This can realize the pre-buffering of the next frame of data and ensure the success of data transmission.

[0115] Based on the same concept as the data processing circuit described above, this embodiment also provides a data processing method, such as... Figure 8 As shown, the method includes the following steps:

[0116] Step S1: Upon receiving the rising edge of the synchronization pulse, perform synchronization pulse signal detection;

[0117] Step S2: A preset synchronization pulse signal is detected, and data reception is performed;

[0118] Step S3: Determine the time interval between two adjacent transition edges;

[0119] Step S4: Decode each received bit value according to the symbol period of the ping sequence and the time interval between each two adjacent transition edges.

[0120] The data processing method provided in this embodiment is based on the same concept as the data processing circuit described above. Therefore, it can at least achieve the beneficial effects that the data processing circuit can achieve. Furthermore, any implementation of the data processing circuit described above can be applied to the data processing method provided in this embodiment, and will not be described in detail here.

[0121] Based on the same concept as the data processing circuit described above, this embodiment also provides a data processing device, such as... Figure 9 As shown, the device includes:

[0122] The synchronization signal detection module is used to receive the rising edge of the synchronization pulse and perform synchronization pulse signal detection.

[0123] The data receiving module is used to detect a preset synchronization pulse signal and receive data.

[0124] The transition edge interval determination module is used to determine the time interval between two adjacent transition edges;

[0125] The data decoding module is used to decode each received bit value based on the symbol period of the ping sequence and the time interval between each two adjacent transition edges.

[0126] The data processing device provided in this embodiment is based on the same concept as the data processing circuit described above, so it can at least achieve the beneficial effects that the data processing circuit can achieve. Furthermore, any implementation of the data processing circuit described above can be applied to the data processing device provided in this embodiment, and will not be described in detail here.

[0127] Based on the same concept as the data processing circuit described above, this embodiment also provides a chip on which the data processing circuit or the data processing device described above is integrated.

[0128] The chip provided in this embodiment is based on the same concept as the data processing circuit described above, so it can at least achieve the beneficial effects that the data processing circuit can achieve. Furthermore, any implementation of the data processing circuit described above can be applied to the chip provided in this embodiment, and will not be described in detail here.

[0129] Based on the same concept as the data processing circuit described above, this embodiment also provides a charging device, including a microcontroller and the data processing circuit or the data processing apparatus described above.

[0130] The charging device provided in this embodiment is based on the same concept as the data processing circuit described above, so it can at least achieve the beneficial effects that the data processing circuit can achieve. Furthermore, any implementation of the data processing circuit described above can be applied to the charging device provided in this embodiment, and will not be described in detail here.

[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. These modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application, and they should all be covered within the scope of the claims and specification of this application. In particular, as long as there is no structural conflict, the various technical features mentioned in the embodiments can be combined in any way. This application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A data processing circuit, characterized in that, The circuit includes a first counter, a first state machine, and a processing module; the first state machine receives the rising edge of a synchronization pulse and enters the synchronization pulse detection state; and enters the data receiving state after detecting a preset synchronization pulse signal. The first counter starts counting when the first state machine enters the data receiving state, and is reset to zero and starts counting again after the next transition edge is received; The processing module decodes each received bit value based on the symbol period of the ping sequence and the count values ​​of the first counter. In the data receiving state, the processing module determines the number of bits received in the current counting cycle based on the ratio of the count value of the current counting cycle to the symbol cycle, and determines the received bit value based on the type of transition edge that triggers the current counting cycle. If the ratio of the count value of the current counting period to the symbol period is close to an integer, the processing module determines the number of bits that the same number of bits as the ratio were received in the current counting period. If the ratio of the count value in the current counting period to the symbol period is close to one-quarter, the processing module determines that no new bit value has been received in the current counting period.

2. The circuit as described in claim 1, characterized in that, If the transition edge that triggers the current counting cycle is a falling edge, the processing module determines that all bits received in the current counting cycle are bit 0. If the transition edge that triggers the current counting cycle is a rising edge, the processing module determines that all bits received in the current counting cycle are bits 1.

3. The circuit as described in claim 1, characterized in that, When the ratio of the count value to the symbol period is close to an integer, the first state machine generates a corresponding bit length signal; the processing module determines the number of received bits based on the bit length signal.

4. The circuit as described in claim 1, characterized in that, It also includes a second state machine, which receives a rising edge, performs ping sequence detection, and responds with a ping sequence after receiving a preset ping sequence.

5. The circuit as described in claim 4, characterized in that, It also includes a second counter, which is used to count the reception time of a preset ping sequence, and the processing module calculates the symbol period of the ping sequence based on the count value of the second counter.

6. The circuit as described in claim 1, characterized in that, The processing module is further configured to determine, based on the count value of the first counter, whether a data packet transmission error has occurred during the data reception process; and, in the event of a data packet transmission error, to stop decoding the received data. The packet transmission error includes one or more of the following: abnormal data width, synchronization signal error, and parity error.

7. The circuit as described in claim 1, characterized in that, It also includes a third counter, which is used to count the number of bits that have been received in the current frame; The processing module is further configured to determine, based on the count value of the third counter, whether a data packet transmission error has occurred during the data reception process; the data packet transmission error includes data bit width greater than or less than a preset threshold.

8. The circuit as described in claim 1, characterized in that, It also includes a third state machine, which receives a data transmission signal from the microcontroller, enters a data transmission state, and performs synchronization signal transmission and data packet transmission; and enters a ping termination state after the data packet transmission is completed.

9. A data processing method, characterized in that, The method includes: Upon receiving the rising edge of the synchronization pulse, perform synchronization pulse signal detection; Upon detecting a preset synchronization pulse signal, data reception commences. Determine the time interval between two adjacent transition edges; Based on the symbol period of the ping sequence and the time interval between each two adjacent transition edges, the received bit values ​​are decoded. In the data receiving state, the number of bits received in the current counting period is determined based on the ratio of the count value of the current counting period to the symbol period, and the received bit value is determined based on the type of transition edge that triggers the current counting period. If the ratio of the count value of the current counting period to the symbol period is close to an integer, determine the number of bits that the same number of bits are received in the current counting period. If the ratio of the count value in the current counting period to the symbol period is close to one-quarter, it is determined that no new bit value has been received in the current counting period.

10. A data processing apparatus, characterized in that, The device includes: The synchronization signal detection module is used to receive the rising edge of the synchronization pulse and perform synchronization pulse signal detection. The data receiving module is used to detect a preset synchronization pulse signal and receive data. The transition edge interval determination module is used to determine the time interval between two adjacent transition edges; The data decoding module is used to decode each received bit value based on the symbol period of the ping sequence and the time interval between each two adjacent transition edges. In the data receiving state, the number of bits received in the current counting period is determined based on the ratio of the count value of the current counting period to the symbol period, and the received bit value is determined based on the type of transition edge that triggers the current counting period. If the ratio of the count value of the current counting period to the symbol period is close to an integer, determine the number of bits that the same number of bits are received in the current counting period. If the ratio of the count value in the current counting period to the symbol period is close to one-quarter, it is determined that no new bit value has been received in the current counting period.

11. A chip, characterized in that, It integrates the data processing circuit according to any one of claims 1-8, or the data processing device according to claim 10.

12. A charging device, characterized in that, It includes a microcontroller, and the data processing circuitry according to any one of claims 1-8, or the data processing apparatus according to claim 10.

Citation Information

Patent Citations

  • Fast charge protocol chip, method executed by same, and electronic device

    CN116742763A

  • Decoding processing method and device, interface, electronic equipment and storage medium

    CN116932447A