System for profiling power using ton pulses
A system for determining a power requirement for a device powered by a buck converter on a system on chip based on Time on pulses (Ton) is disclosed. A buck converter supplies output voltage to enable the device. The buck converter is driven by a Ton pulse generator generating Ton pulses to control charging of a load capacitor. A counter counts the Ton pulses during the supply of output voltage while the device is enabled. A controller is coupled to the counter and the buck converter. The controller determines the power requirement for the device based on the count of the Ton pulses. The power requirement may be used to adjust the trim value to change the width of the Ton pulses for greater energy efficiency.
1 . A system for determining a power requirement for a device, the system comprising:
a buck converter supplying output voltage to the device, the output voltage of the buck converter driven by a Time on (Ton) pulse generator generating Ton pulses to control charging of a load capacitor of the buck converter;
a counter counting Ton pulses during the supply of output voltage;
a controller coupled to the counter and the buck converter operable to determine the power requirement for the device based on the count of the Ton pulses; and
a storage device for storing the determined power requirement for the device.
2 . The system of claim 1 , wherein the device and buck converter are integrated in a system on chip.
3 . The system of claim 1 , wherein the controller is further operable to determine an adjustment for the buck converter based on the power requirement when the device is powered by the buck converter at a subsequent time.
4 . The system of claim 3 , wherein the adjustment includes determining a trim value for the duration of the Ton pulse based on the power requirement.
5 . The system of claim 4 , wherein the buck converter includes a register, and wherein the controller is operable to store the determined trim value in the register, and wherein the buck converter adjusts the duration of the Ton pulses generated by the Ton pulse generator for supplying output voltage to power the device based on the determined trim value.
6 . The system of claim 1 , wherein the controller is further operable to:
determine a first device function performed by the device;
associate the determined power requirement with the first device function;
determine a second device function performed by the device;
determine a second power requirement determined from the count of Ton pulses from the device performing the second device function; and
associate the determined second power requirement with the second device function.
7 . The system of claim 1 , wherein the device is one of an ADC, a DAC, an UART, a controller, or a storage component.
8 . The system of claim 1 , wherein the controller includes a bank of registers, wherein the power requirement determined from the count of Ton pulses associated with the device is stored in one of the registers of the bank of registers, and wherein one of the other registers store a corresponding power requirement determined from a count of Ton pulses from another device powered by the buck converter.
9 . The system of claim 1 , wherein the buck converter has different voltage level outputs based on connection of a high frequency clock and a low frequency clock.
10 . The system of claim 1 , wherein the controller is operative to determine a flaw in an external power source coupled to the buck converter based on a comparison of the count of Ton pulses being more than a previous count of Ton pulses associated with the device.
11 . The system of claim 1 , wherein the count of the Ton pulses is determined by detecting a leading edge of the pulse or by detecting a voltage ripple from the output voltage of the buck converter.
12 . A method of determining a power requirement of a device on a system on chip, the method comprising:
coupling a voltage output of a buck converter to power the device;
generating Time on (Ton) pulses via a Ton pulse generator to control charging of a load capacitor of the buck converter to provide a voltage level at the voltage output for powering the device;
keeping a count of the Ton pulses on a counter during powering of the device;
storing the count of the Ton pulses from the counter after depowering the device; and
determining the power requirement of the device based on the stored count of the Ton pulses.
13 . The method of claim 12 , further comprising adjusting the buck converter based on the determined power requirement when the buck converter powers the device at a subsequent time.
14 . The method of claim 12 , further comprising determining a trim value for the duration of the Ton pulse based on the power requirement.
15 . The method of claim 12 , further comprising transmitting the power requirement of the device to an external device.
16 . The method of claim 12 , further comprising determining a flaw in an external power source coupled to the buck converter based on a comparison of the count of Ton pulses being more than a previous count of Ton pulses associated with the device.
17 . The method of claim 12 , further comprising:
determining a first device function performed by the device;
associating the determined power requirement with the first device function;
determining a second device function performed by the device;
determining a second power requirement determined from the count of Ton pulses from the device performing the second device function; and
associating the determined second power requirement with the second device function.
18 . The method of claim 12 , wherein the device is one of an ADC, a DAC, an UART, a controller, or a storage component.
19 . The method of claim 12 , wherein the power requirement determined from the count of Ton pulses associated with the device is stored in one of the registers of the bank of registers of a controller, and wherein one of the other registers store a corresponding power requirement determined from a count of Ton pulses from another device powered by the buck converter.
20 . A non-transitory computer readable medium having stored thereon software instructions that, when executed by a processor, cause the processor to:
store a count of Ton pulses driving a buck converter powering a device in a counter of the device during the buck converter powering the device, wherein a load capacitor of the buck converter is charged by a pulse generator generating the Ton pulses;
determine the power requirement of the device based on the stored count of Ton pulses; and
adjust the power to the device provided from the buck converter based on the determined power requirement.