Configurable oversampling of analog-to-digital converters

By introducing a central processing unit and a pulse width modulator in the analog-to-digital converter system, a variable frequency PWM signal is generated and the analog-to-digital conversion time point is controlled, which solves the problem of noise interference in the prior art and improves the analog-to-digital conversion accuracy .

CN112106299BActive Publication Date: 2024-11-05TEXAS INSTRUMENTS INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201980031568.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2018-11-26
Filing Date
2019-06-20
Publication Date
2024-11-05
Estimated Expiration
2039-06-20

AI Technical Summary

Technical Problem

When existing analog-to-digital converters oversample analog signals, it is difficult to effectively avoid noise interference, especially in the switching state of the load power transistor, which affects the analog-to-digital conversion accuracy.

Method used

A system containing a central processing unit (CPU) core and a pulse width modulator (PWM) controller is designed to control the analog-to-digital converter (ADC) during each PWM cycle by generating a fixed or variable frequency PWM signal. The conversion time point is to avoid analog-to-digital conversion in the switching state of the load power transistor, and calculate the average value of the digital sample through the accumulator.

Benefits of technology

It effectively reduces noise interference and improves analog-to-digital conversion accuracy. By controlling the conversion time point during each PWM cycle through software, the impact of switching noise on analog-to-digital conversion is avoided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112106299B_ABST
    Figure CN112106299B_ABST
Patent Text Reader

Abstract

A system includes a central processing unit (CPU) core (102) and a pulse width modulator (PWM) controller (110), the pulse width modulator controller being configured to generate a PWM control signal having a PWM period. The system also includes an analog-to-digital converter (ADC) (162), an accumulator (170), and a register (178) and an oversampling register set (120). The oversampling register set (120) can be configured by the CPU core (102) to specify a time point during each PWM period when the ADC (162) converts an analog signal into a digital sample to generate a plurality of digital samples. The time interval between consecutive digital samples varies between the specified time points. The accumulator (170) accumulates the digital samples from the ADC and stores the accumulated sum in a sum register (178). The CPU core reads the accumulated sum from the sum register (178) and can use the accumulated sum to calculate a metric (e.g., an average) of the digital samples.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] An analog-to-digital converter (ADC) converts an analog signal into a digital value. ADCs are widely used. In some embodiments, an ADC is used to "oversample" an analog signal. Oversampling an analog signal involves converting the analog signal multiple times and then averaging the resulting digital values ​​together. Oversampling helps filter out various noise sources, such as noise that may be present in the analog signal from a sensor, noise inherent in the analog-to-digital conversion process, etc. Summary of the invention

[0002] In one example, a system includes a central processing unit (CPU) core and a pulse width modulator (PWM) controller configured to generate a PWM control signal having a PWM period. The system also includes an analog-to-digital converter (ADC), an accumulator, a sum register, and an oversampling register set. The oversampling register set can be configured by the CPU core to specify a time point during each PWM period at which the ADC converts an analog signal into a digital sample to generate a plurality of digital samples. The time interval between consecutive digital samples varies between the specified time points. The accumulator accumulates the digital samples from the ADC and stores the accumulated sum in the sum register. In some examples, the CPU core reads the accumulated sum and the number of converted samples from the sum register, and can use the accumulated sum and the number of converted samples to calculate a metric (e.g., an average) of the digital samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0003] For a detailed description of various examples, reference will now be made to the accompanying drawings, in which:

[0004] Figure 1 A system including a conversion circuit in one example is shown.

[0005] Figure 2 Variable time intervals between trigger events for analog-to-digital conversion to perform oversampling of an analog signal are shown.

[0006] Figure 3 Oversampling of a variable frequency pulse width modulated signal is shown.

[0007] Figure 4 An example of performing global synchronization of multiple conversion circuits is shown.

[0008] Figure 5 An example of a method of performing oversampling using a fixed frequency pulse width modulated signal is shown.

[0009] Figure 6 An example of a method of performing oversampling using a variable frequency pulse width modulated signal is shown. DETAILED DESCRIPTION

[0010] The system described herein includes a conversion circuit that can be used to perform oversampling on an analog signal. The system also includes a pulse width modulation (PWM) controller, which can generate a fixed or variable frequency PWM signal to drive a load (e.g., a driver of a voltage converter, a driver of a motor, etc.). The conversion circuit can be used to convert an analog signal into one or more digital samples. The analog signal can be a current or voltage related to an input, output, or load (e.g., motor current) of a controlled system. For a fixed frequency PWM operation, a central processing unit (CPU) core can program the PWM to generate a PWM signal of a specific frequency and specify a time point at which the ADC converts the analog signal into a digital sample during each PWM cycle. Because each time point during the PWM cycle can be programmed by the CPU core, the time interval between consecutive digital conversions during oversampling may vary from sample to sample. Therefore, the conversion circuit can be controlled to avoid performing analog-to-digital conversion at an inappropriate time during each PWM cycle, such as when the power transistor of the load is in a switching state.

[0011] The conversion circuit also includes an accumulator for accumulating the sum of digital values ​​during the oversampling conversion process. The adder adds the current digital sample to the sum of the previous digital values ​​and overwrites the previous sum in the register with the new sum. In some examples, the CPU core can then calculate the average of the digital samples by reading the accumulated sum and dividing by the number of digital samples that make up the sum. The conversion circuit can be configured to perform oversampling, wherein the PWM controller generates a PWM signal of a fixed frequency or a variable frequency. For variable frequency PWM, the CPU core can also read the accumulated sum and read the register value from the conversion circuit, which encodes the number of digital samples represented by the accumulated sum. The CPU core can then calculate the average based on these values.

[0012] Figure 1 An example of a system 100 including a CPU core 102, a PWM controller 110, and a conversion circuit 160 is shown. In one embodiment, the CPU core 102, the PWM controller 110, and the conversion circuit 160 are provided as a system on a chip (SoC) on a common semiconductor substrate. Figure 1 A single CPU core 102 is shown in the example of FIG. 1 , but the system 100 may include multiple CPU cores 102 as needed. The CPU core 102 is coupled to the PWM controller 110 and the conversion circuit 160 via a bus 105. Functions belonging to the CPU core 102 may be performed by the CPU core 102, which executes firmware 107 stored in a memory 101 accessible to the CPU core.

[0013] PWM controller 110 (and system 100 may include multiple PWM controllers 110) includes counter 112, digital comparators 116 and 124, PWM control register 119, oversampling register set 120, and OR gate 126 (or other type of logic gate). In one example, counter 112 counts pulses of a clock (CLK), as shown. The clock may be the same clock used to clock CPU core 102, or the clock may be derived from the CPU clock (e.g., the CPU clock is divided by a factor, such as 2). PWM control register 119 receives one or more configuration parameters from CPU core 102. The configuration parameters may include, for example, a count value. Figure 1 The counter 112 in the example is programmable. In one programmable mode, the counter 112 operates as an up / down counter, where the counter 112 counts from 0 to a programmable maximum count value, and then counts down to 0. The CPU core 102 can program the maximum count value for the counter 112 (which specifies when the counter 112 switches from counting up to counting down), and can also load the count value into the PWM control register 119. When the output count of the counter matches the count value loaded into the PWM control register 119, the comparator 116 can be programmed by the CPU core 102 to perform certain actions. For example, when the counter 112 is counting up and the count value of the PWM control register matches the count value from the counter 112, the comparator 116 can be programmed to cause its output (i.e., the PWM output signal 117) to become a logic high level. Then, when the counter 112 is counting down and the count value of the PWM control register matches the count value from the counter 112 again, the comparator 116 can be programmed to cause the PWM output signal 117 to become a logic low high level. The count value loaded into the PWM control register 119 actually controls the duty cycle of the PWM output signal 117 (eg, a smaller count value in the PWM control register 119 results in a higher duty cycle, while a larger count value in the PWM control register 119 results in a lower duty cycle).

[0014] In operation, the PWM controller 110 can be programmed to generate a PWM output signal 117 having a fixed frequency or a variable frequency. The variable frequency of the PWM controller 110 can be implemented by programming different maximum count values ​​for the counter 112 to switch between counting up and counting down. A larger maximum count value programmed into the counter 112 results in a longer time period to count from 0 to the maximum count value and back to 0, and therefore results in a smaller PWM frequency. Conversely, a smaller maximum count value results in a higher PWM frequency.

[0015] The oversampling register set 120 includes one or more registers into which the CPU core 102 can program values ​​that specify time points during each PWM cycle for which the ADC 162 (described below) of the conversion circuit 160 will be triggered to convert the analog signal 159 into digital samples. Multiple such values ​​can be programmed into the oversampling register set 120 by the CPU core 102, thereby programming multiple conversion trigger events during each PWM cycle. In one embodiment, each value programmed into the oversampling register 120 represents a count value. When the count value from the oversampling register set 120 reaches the current value from the counter 112 determined by the comparator 124, the output of the comparator goes to a logic high level. The output of the comparator 124 is logically ORed by the OR gate 126 to generate a trigger signal (TRIG) 127 to the conversion circuit 160. TRIG 127 causes the conversion circuit to convert the analog signal 159 into a digital value. Because the comparator output signals are ORed together, TRIG 127 is activated when any comparator output goes to a logic high level.

[0016] The conversion circuit 160 includes an ADC 162, a conversion result register 164, an oversampling accumulator 170, a final sum register 178, a partial count register 180, a final count register 184, a maximum count register 190, a comparator 192, an OR gate 194 (or other type of logic gate), and a minimum-maximum circuit 161. In response to TRIG 127 being activated, the ADC 162 converts the analog signal 159 into a digital value and stores the digital value in the conversion result register 164. The oversampling accumulator 170 includes an adder 172 and a partial sum register 174. The adder 172 adds the digital value from the conversion result register 164 to the current value from the partial sum register 174 and overwrites the partial sum register 174 with the resulting sum. In this way, the oversampling accumulator 170 accumulates the digital value from the conversion result register 164 into the partial sum register 174.

[0017] The partial count register 180 stores a current count of the number of digital values ​​that have been accumulated into the partial sum register 174. Each time a new digital value is acquired and accumulated into the partial sum register 174, the value in the partial count register 180 is incremented, as shown at 181.

[0018] In operation, the CPU core 102 may program the maximum count register 190 with a value corresponding to the amount of oversampling to be performed by the conversion circuit 160. For example, the CPU core 102 may program a value of 10 into the maximum count register 190. The comparator 192 compares the value from the maximum count register 190 with the current count value from the partial count register 180. When the count value in the partial count register 180 matches the programmed value in the maximum count register 190, the output 193 of the comparator 192 is asserted high. The output 193 from the comparator 192 is provided to the input of the OR gate 194. When the count value in the partial count register 180 matches the programmed value in the maximum count register 190, the output of the OR gate 194 becomes a logic high level. The output of the OR gate 194 then causes (a) the current count value from the partial count register 180 to be loaded into the final count register 184, (b) the current accumulated sum from the partial sum register 174 to be loaded into the final sum register 178, (c) the partial count register 180 to be reset (e.g., loaded with a value of 0), and (d) the partial count register 174 to be reset (e.g., loaded with a value of 0). The CPU core 102 can then read the final sum value from the final sum register 178. If desired, the CPU core 102 can also read the final count value from the final count register 184, but cannot read register 184 because the final count value should be equal to the maximum count value programmed by the CPU core 102 into the maximum count register 190. In one embodiment, the output of the OR gate 194 can also interrupt the CPU core 102 to execute an interrupt service routine (ISR). The ISR then causes the CPU core 102 to read the final sum register 178.

[0019] The CPU core 102 uses the final sum value from the final sum register 178 and the count value corresponding to the number of digital samples accumulated to include the final sum value to calculate the metric. In one embodiment, the metric is the average of the digital samples. The CPU core 102 can calculate the average by dividing the final sum value read from the final sum register 178 by the count value corresponding to the number of digital samples representing the final sum value. The count value used to calculate the metric (e.g., the average) can be the value read from the final count register 184, or the maximum count value that the CPU core 102 has programmed into the maximum count register 190.

[0020] In addition to, or in lieu of, the average value, the metric calculated by CPU core 102 may include a minimum sample value and a maximum sample value of a set of digital samples acquired from analog signal 159 . Figure 1The minimum-maximum circuit 161 shown in the figure determines the minimum digital value and the maximum digital value from the conversion result register 164 and saves them to the final minimum register 163 and the final maximum register 165, respectively. The partial minimum register 166 saves the currently determined minimum digital value during the oversampling process. Similarly, the partial maximum register 167 saves the currently determined maximum digital value during the oversampling process. The comparator 168 compares the value from the partial minimum register 166 with the next acquired digital value from the conversion result register 164, and if the new digital value is less than the value previously saved in the partial minimum register 166, the comparison result is used as a control signal to the multiplexer 171 to rewrite the partial minimum register 166 with the new digital value from the conversion result register 164; otherwise, the value already stored in the partial minimum register 166 remains unchanged (or is rewritten with the same value by the multiplexer 171). The partial maximum register 167, comparator 169, and multiplexer 173 operate in much the same manner, but save the largest digital sample from the conversion result register. The values ​​from the partial minimum register 166 and the partial maximum register 167 can be saved to their corresponding final registers 163 and 165, respectively. The signaling described above (for loading the partial sum register 174 and the partial count register 180 into their corresponding final sum register and count register, and then resetting the partial sum register and the partial count register) is also used to perform similar functions for the partial minimum register 166 and the partial maximum register 167 and the final minimum register 163 and the final maximum register 165. The CPU core 102 can read the values ​​from the final minimum register 163 and the final maximum register 165.

[0021] Figure 1 The example also shows that the CPU core 102 can assert the SYNC signal 103 to the OR gate 194 of the conversion circuit 160. Once the SYNC signal is asserted (e.g., to a logic high state), the CPU core 102 can force the output of the OR gate 194 to a logic high level, thereby loading the partial sum register 174 and the partial count register 180 into the final sum register 178 and the final count register 184, and resetting the partial sum register 174 and the partial count register 180. For example, the SYNC signal 103 is useful when the PWM controller 110 operates in a variable frequency mode. The variable frequency PWM output 117 is useful for driving a resonant converter. The variable frequency PWM output 117 means that the period of the PWM output 117 is also variable. As the time length of the PWM period changes, the number of conversions performed by the ADC 162 in each accumulation period will also change.

[0022] In variable frequency PWM operation of the PWM controller 110, the CPU 102 may program the maximum count register 190 to have a sufficiently large value so that the partial count value in the partial count register 180 does not reach the value. Thus, instead of loading from the partial sum register 174 and the partial count register 180 into their corresponding final sum register 178 and final count register 184, and the subsequent reset of the registers 174, 180 being triggered by the comparator 192, the SYNC signal 103 from the CPU core 102 triggers the loading and resetting through the OR gate 194. After the registers 174 and 180 are loaded into the registers 178 and 184, respectively, and the subsequent reset of the registers 174 and 180, the CPU core 102 then reads the final sum value from the final sum register 178, and the final count value from the final count register 184. The CPU core 102 then calculates the metric as described above.

[0023] Figure 2 A single count cycle 200 of the counter 112 is shown. The shape of the count cycle is triangular to show that in this example the counter 112 counts up from 0 to the maximum programmable value and then back down to 0. The amount of time that the counter 112 counts up and down defines the period of the PWM output 117 and is Figure 2 It is marked as PWM_period. Figure 2 The example of FIG. 1 shows eight ADC conversion triggers TR1-TR8. Each trigger TR1-TR8 causes the conversion circuit 160 to convert the analog signal 159 into a digital value. Figure 2 As shown, the time intervals between adjacent trigger points can vary. For example, TR3 and TR4 are closer together than TR5 and TR6. The placement of each trigger is controlled by the value written into the oversampling register set 120 by the CPU core 102. Figure 2 In the example of , the spacing between adjacent flip-flops is variable, but in other embodiments, the flip-flops can be evenly spaced. Control of the placement of the flip-flops provides software control over when the analog-to-digital conversion occurs during each PWM cycle in order to avoid performing an analog-to-digital conversion at the moment when the power transistor of the load controlled by the PWM output 117 switches. The power transistor switching causes switching noise, which can adversely affect the accuracy of the analog-to-digital conversion.

[0024] Figure 3An example of variable frequency pulse width modulation is shown. The triangular wave 300 represents the time progression of the counter 112 counting up and then counting down. The counter 112 completes a full count cycle in one time period, which can vary from cycle to cycle because different maximum count values ​​(at which the counter switches from counting up to counting down) are programmed into the counter 112. For variable frequency pulse width modulation, Figure 2 The PWM controller 110 in the example generates a trigger output 127 to the conversion circuit 160 at the same point in each cycle (e.g., at a point to avoid transistor switching noise). One way to implement a trigger during variable frequency PWM is for the CPU core 102 to program the oversampling register set 120 with a value of 0 so that a TRIG 127 is generated each time the PWM's counter reaches 0 (determined by the comparator 124). Since the period of each up / down count cycle changes, the interval between the triggers (TR) will also change, as shown.

[0025] For variable frequency pulse width modulation, the CPU core 102 is interrupted at periodic points in time, as shown in ISR1-ISR4. The counter inside the CPU core 102 can be programmed to generate interrupts at evenly spaced time intervals. Because the intervals of the conversion triggers (TR) may not be uniform, there may be different numbers of triggers TR between consecutive executions of the ISR. For example, between ISR1 and ISR2, there are four triggers TR, but between ISR2 and ISR3, there are only two triggers TR. For each execution of the ISR, the CPU core 102 activates the SYNC signal 103 to load values ​​into the final sum register 178 and the final count register 184 (and then reset the partial sum register 174 and the partial count register 180). The CPU core 102 can then use both the final sum value and the final count value to calculate a metric (e.g., an average) as described above.

[0026] Figure 4 An example of a system 400 is shown, which includes a plurality of conversion circuits 160 coupled to a CPU core and a PWM controller 110. In one configuration, each conversion circuit 160 is configured to Figure 1 The conversion circuit shown in the figure is implemented. Figure 4Each conversion circuit 160 in the synchronization register 410 can receive a separate SYNC signal 127 from the CPU core 102. The synchronization register 410 can be written by the CPU core to identify one or more of the conversion circuits 160 whose accumulated sums will be transferred from their partial sum registers 174 to their final sum registers 178, and the count values ​​will be transferred from the partial count registers 180 to their final count registers 184. The CPU core 102 can then read the final sum register 178 and the final count register 184 from the corresponding conversion circuit 160 and calculate the metric as described above. In one embodiment, each conversion circuit 160 corresponds to a bit in the synchronization register 410. For example, by writing a logic 1 to a particular bit in the synchronization register 410, the conversion circuit corresponding to that bit will perform the load and reset operations described above. Any bit in the synchronization register 410 that is not written with a logic 1 will not cause the corresponding conversion circuit 160 to perform the load and reset operations.

[0027] Figure 5 A method corresponding to a fixed frequency pulse width modulation operation is shown. The operations may be performed in the order shown or in a different order. At 502, the method includes configuring N conversion start triggers for each PWM cycle at variable time intervals. The time between consecutive triggers may not be constant. This operation may be performed by the CPU core 102 loading the count value into the oversampling register set 120.

[0028] At 504, the method includes triggering one of the analog-to-digital conversions by the conversion circuit 160. The PWM controller 110 activates a trigger signal (at Figure 1 127 in the example of ) to start the conversion process. The trigger occurs based on the value in the oversampling register set 120. The accumulation result at 506 is calculated based on the current digital sample and the previous accumulation value, and the accumulation result is stored in the partial sum register 174 (e.g., the new accumulation result overwrites the previous accumulation result in the partial sum register 174). At 510, the method includes determining whether the partial count value in the partial count register 180 is equal to the maximum count from the maximum count register 190. This determination can be performed by the comparator 192. If the partial count value has not reached the maximum count value, then control loops back to 502 for another conversion at an appropriate time defined by the value in the oversampling register set 120.

[0029] Once the partial count value reaches the maximum count value, control continues at 512 where the value from the partial sum register 174 is loaded into the final sum register 178. At 514, the partial sum register 174 is reset (e.g., to a value of 0). At 516, the value from the partial count register is loaded into the final count register 184, and at 518, the partial count register is reset (e.g., to a value of 0).

[0030] At 520, an interrupt is enabled to the CPU core 102 (e.g., via the output of the OR gate 194). At 522, the CPU core 102 responds by executing the ISR to read the accumulated conversion value from the final sum register 178 and to calculate the average (or other type of metric) of the accumulated conversion values ​​at 524.

[0031] Figure 6 A method corresponding to variable frequency pulse width modulation operation is shown. The operations may be performed in the order shown or in a different order. Figure 6 Two workflows 602 and 604 are shown, which are typically executed concurrently with each other. When workflow 602 is executing, workflow 604 may also execute. Workflow 602 contains operations 602-614, and workflow 604 contains operations 620-632.

[0032] At 610, the method includes the PWM controller 110 triggering a conversion start of the conversion circuit 160. As described above, this trigger event can occur at the same point during each PWM cycle. Once the digital value is acquired, at 612, the accumulated sum is updated and the new accumulated sum is used to overwrite the accumulated sum in the partial sum register. At 614, the partial count register 180 is incremented and control loops back to 610 for the next conversion start trigger event.

[0033] When programmed into the CPU core 102 (e.g., when it occurs at periodic times), the CPU core 102 asserts the SYNC signal 103. In response to the assertion of the SYNC signal 103, at 622, the value from the partial sum register 174 is loaded into the final sum register 178, and at 624, the value from the partial count register 180 is loaded into the final count register 184. At 626 and 628, the partial sum register 174 and the partial count register 180 are reset, respectively. At 630, the CPU core 102 then reads the final sum register 178 and the final count register 184, and then calculates the average (or other measure) of the digital value represented by the accumulated value at 632.

[0034] In this specification, the term "couple" or "couples" refers to an indirect or direct wired or wireless connection. Thus, if a first device is coupled to a second device, the connection may be through a direct connection, or through an indirect connection via other devices and connections. The phrase "based on" means "based at least in part on." Thus, if X is based on Y, then X may be a function of Y and any number of other factors.

[0035] Modifications in the described embodiments are possible, and other embodiments are possible, within the scope of the claims.

Claims

1. A circuit system, comprising: Central Processing Unit CPU core; A pulse width modulator (PWM) controller, the pulse width modulator controller being coupled to the CPU core and configured to generate a PWM control signal having a PWM period; an analog-to-digital converter ADC, the analog-to-digital converter being coupled to the PWM controller; an accumulator coupled to the ADC; a sum register coupled to the accumulator; as well as an oversampling register set configurable by the CPU core to specify time points during each PWM cycle at which the ADC converts an analog signal into digital samples to generate a plurality of digital samples, wherein a time interval between consecutive digital samples varies between the specified time points; wherein the accumulator is used to accumulate digital samples from the ADC and store the accumulated sum in the sum register; and The CPU core is used to read the accumulated sum from the sum register.

2. The circuit system of claim 1, further comprising a counting register that is incremented for each conversion performed by the ADC.

3. The circuit system according to claim 2, wherein: The count register can be read by the CPU core.

4. The circuit system according to claim 2, wherein: The CPU core is configured to read a value from the count register and calculate a metric based on the accumulated sum and the value read from the count register.

5. The circuit system according to claim 4, wherein: The PWM controller activates a signal to trigger the ADC to convert the analog signal into the digital samples.

6. The circuit system according to claim 1, wherein: The CPU core is used to calculate a metric based on the accumulated sum.

7. The circuit system according to claim 6, wherein: The PWM controller includes a counter, and the PWM controller activates a signal to trigger the ADC to convert the analog signal into the digital sample based on a count value from the counter, the count value matching any one of a plurality of values ​​in the oversampling register set.

8. The circuit system of claim 1, wherein: Said sum register is a final sum register; The accumulator includes a partial sum register into which the accumulated sum is updated at each of a plurality of conversions performed by the ADC; and Based on the activation of the signal from the CPU core, the accumulated sum is transferred from the partial sum register to the final sum register.

9. The circuit system according to claim 1, wherein: The sum register is a final sum register, and the system further comprises: a comparator; and a partial count register containing a count value that is incremented each time the ADC performs a conversion of the analog signal to a digital sample; and a maximum count register, the maximum count register being configurable by the CPU core to contain a maximum count value; in: The accumulator includes a partial sum register into which the accumulated sum is updated at each of a plurality of conversions performed by the ADC; The comparator is used to compare the value from the partial count register with the maximum count value; and Based on a signal from the comparator indicating that the value from the partial count register has reached the maximum count value, the accumulated sum is transferred from the partial sum register to a final sum register and the count value is transferred from the partial count register to a final count register.

10. The circuit system according to claim 9, further comprising: a plurality of conversion circuits, each conversion circuit comprising a final sum register, a partial sum register, a partial count register, and a final count register; as well as A synchronization register that can be written by the CPU core to identify one or more of the conversion circuits whose accumulated sum is to be transferred from its partial sum register to its final sum register and the count value is to be transferred from its partial count register to its final count register.

11. A circuit system comprising: Central Processing Unit CPU core; A pulse width modulator (PWM) controller, the pulse width modulator controller being coupled to the CPU core and configured to generate a PWM control signal having a PWM period; an analog-to-digital converter ADC, the analog-to-digital converter being coupled to the PWM controller, the ADC converting an analog signal into a digital sample; an oversampling register set, the oversampling register set being configurable by the CPU core to specify time points during each PWM cycle at which the ADC converts the analog signal into the digital samples to generate a plurality of digital samples, wherein a time interval between consecutive digital samples varies between the specified time points; an accumulator coupled to the ADC, the accumulator including a partial sum register in which an accumulated value of the digital samples from the ADC is stored; and a final sum register for loading the accumulated value from the partial sum registers in response to a signal; The CPU core is used to read the accumulated value from the final sum register.

12. The circuit system according to claim 11, wherein: The CPU core is used to calculate at least one of an average value, a minimum value, and a maximum value based on the accumulated value.

13. The circuit system according to claim 11, wherein: The PWM controller includes a counter, and the PWM controller activates a signal to trigger the ADC to convert the analog signal into the digital sample based on a count value from the counter, the count value matching any one of a plurality of values ​​in the oversampling register set.

14. The circuit system according to claim 11, wherein: The accumulated value is transferred from the partial sum register to the final sum register based on the assertion of the signal asserted by the CPU core.

15. The circuit system according to claim 14, wherein: The signal asserted by the CPU core will also cause the sections and registers to be reset.

16. A circuit system comprising: Central Processing Unit CPU core; A pulse width modulator (PWM) controller, the pulse width modulator controller being coupled to the CPU core and configured to generate a PWM control signal having a PWM period; an analog-to-digital converter ADC coupled to the PWM controller, the ADC converting an analog signal into digital samples in response to a trigger signal generated by the PWM controller; an accumulator coupled to the ADC, the accumulator comprising a partial sum register in which an accumulated value of the digital samples from the ADC is stored; a final sum register for loading the accumulated value from the partial sum registers in response to a signal; as well as a final count register for storing a count value indicating a number of conversions performed by the ADC; The CPU core is used to read the accumulated value from the final sum register and read the count value from the final count register.

17. The circuit system of claim 16, further comprising a partial count register that is incremented each time the ADC is triggered by the PWM controller to perform a conversion.

18. The circuit system according to claim 17, wherein: In response to a signal asserted by the CPU core, the value from the partial count register is transferred to the final count register.

19. The circuit system according to claim 18, characterized in that The CPU core is configured to read a value from the terminal count register, and divide the accumulated value read from the final sum register by the value read from the terminal count register.

20. The circuit system of claim 16, wherein: The system is a system on a chip.