Handling Interrupts; Issues Related To 64-Bit Timers With 32-Bit Processors - Intel 6 SERIES CHIPSET - DATASHEET 01-2011 Datasheet

Hide thumbs Also See for 6 SERIES CHIPSET - DATASHEET 01-2011:
Table of Contents

Advertisement

Functional Description
5.17.6

Handling Interrupts

If each timer has a unique interrupt and the timer has been configured for edge-
triggered mode, then there are no specific steps required. No read is required to
process the interrupt.
If a timer has been configured to level-triggered mode, then its interrupt must be
cleared by the software. This is done by reading the interrupt status register and
writing a 1 back to the bit position for the interrupt to be cleared.
Independent of the mode, software can read the value in the main counter to see how
time has passed between when the interrupt was generated and when it was first
serviced.
If Timer 0 is set up to generate a periodic interrupt, the software can check to see how
much time remains until the next interrupt by checking the timer value register.
5.17.7

Issues Related to 64-Bit Timers with 32-Bit Processors

A 32-bit timer can be read directly using processors that are capable of 32-bit or 64-bit
instructions. However, a 32-bit processor may not be able to directly read 64-bit timer.
A race condition comes up if a 32-bit processor reads the 64-bit register using two
separate 32-bit reads. The danger is that just after reading one half, the other half rolls
over and changes the first half.
If a 32-bit processor needs to access a 64-bit timer, it must first halt the timer before
reading both the upper and lower 32-bits of the timer. If a 32-bit processor does not
want to halt the timer, it can use the 64-bit timer as a 32-bit timer by setting the
TIMERn_32MODE_CNF bit. This causes the timer to behave as a 32-bit timer. The upper
32-bits are always 0.
Alternatively, software may do a multiple read of the counter while it is running.
Software can read the high 32 bits, then the low 32 bits, the high 32 bits again. If the
high 32 bits have not changed between the two reads, then a rollover has not
happened and the low 32 bits are valid. If the high 32 bits have changed between
reads, then the multiple reads are repeated until a valid read is performed.
Note: On a 64-bit platform, if software attempts a 64 bit read of the 64-bit counter,
software must be aware that some platforms may split the 64 bit read into two 32 bit
reads. The read maybe inaccurate if the low 32 bits roll over between the high and low
reads.
Datasheet
203

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

6 series

Table of Contents