Apparatus and method for using a communication resource for performing a timing operation
AssigneeNational Semiconductor Corporation
InventorIlan Margalit
Life of this patent
Estimating the term…
Abstract
A method for using a non-timer dedicated resource, such as a communication resource, for performing timing operations is provided. The method is advantageous for use with embedded applications in dedicated devices having limited timing resources, particularly in cases where the existing timing resources have all been allocated to specific tasks and are not available to accommodate further timing requirements.
Claims20
A method of using a communication resource of a device to indicate an elapse of a specified time interval, the communication resource having a known bit clock period, the method comprising:
- initializing, at a controller, a counter to a specified value;
- preparing dummy data having a specified number of bits, the number of bits calculated by dividing the specified time interval by the known bit clock period;
- transmitting the data using the communication resource;
- detecting an interrupt from the communication resource upon completion of transmitting the data;
- upon detecting the interrupt from the communication resource, indicating the elapse of the specified time interval, wherein the indicating is utilized only for performing a timing operation external to the communication resource;
- upon completion of the transmitting, detecting, and indicating steps, decrementing the counter;
- and
- repeating the transmitting, detecting, indicating, and decrementing steps until the counter reaches zero.
A computer program product comprising a non-transitory machine-readable medium encoded with computer-executable instructions that when executed cause a data processing system to perform the steps of:
- initializing a counter to a specified value;
- preparing dummy data having a specified number of bits, the number of bits calculated by dividing the specified time interval by the known bit clock period;
- transmitting the data using the communication resource;
- detecting an interrupt from the communication resource upon completion of transmitting the data;
- upon detecting the interrupt from the communication resource, indicating the elapse of the specified time interval, wherein the indicating is utilized only for performing a timing operation external to the communication resource;
- upon completion of the transmitting, detecting, and indicating steps, decrementing the counter;
- and
- repeating the transmitting, detecting, indicating, and decrementing steps until the counter reaches zero.
A device comprising:
- a communication resource, the communication resource having a known bit clock period;
- and
- a controller configured to:
- initialize a counter to a specified value;
- prepare dummy data having a specified number of bits, the number of bits calculated by dividing a specified time interval by the known bit clock period;
- transmit the data using the communication resource;
- detect an interrupt from the communication resource upon completion of transmitting the data;
- upon detection of the interrupt from the communication resource, indicate an elapse of the specified time interval, wherein the indication is utilized only for performing a timing operation external to the communication resource;
- upon completion of the transmission, detection, and indication steps, decrement the counter;
- and
- repeat the transmission detection, and indication steps until the counter reaches zero.
A method of using a communication resource of a device to measure an elapsed time during a specific condition, the communication resource having a known bit clock period, the method comprising:
- initializing, at a controller, a counter to a first value;
- preparing dummy data having a specified number of bits;
- transmitting the data using the communication resource;
- detecting an interrupt from the communication resource upon completion of transmitting the data;
- incrementing the value of the counter upon detection of the interrupt;
- repeating the transmitting, detecting, and incrementing steps until completion of the specific condition;
- upon completion of the specific condition, multiplying the known bit clock period by the specified number of bits and the value of the counter to determine the elapsed time during the specific condition, wherein the elapsed time is determined only for performing timing operating which are external to the communication resource.
Dependencies are inferred from the claim text.