English
Language : 

TM4C123GE6PM Datasheet, PDF (720/1408 Pages) Texas Instruments – Tiva™ TM4C123GE6PM Microcontroller
General-Purpose Timers
1. Read the appropriate Timer B register or prescaler register.
2. Read the corresponding Timer A register.
3. Re-read the Timer B register or prescaler register.
4. Compare the Timer B or prescaler values from the first and second reads. If they are the same,
the timer value is coherent. If they are not the same, repeat steps 1-4 once more so that they
are the same.
The following pseudo code illustrates this process:
high = timer_high;
low = timer_low;
if (high != timer_high); //low overflowed into high
{
high = timer_high;
low = timer_low;
}
The registers that must be read in this manner are shown below:
■ 64-bit reads
– GPTMTAV and GPTMTBV
– GPTMTAR and GPTMTBR
■ 48-bit reads
– GPTMTAR and GPTMTAPS
– GPTMTBR and GPTMTBPS
– GPTMTAV and GPTMTAPV
– GPTMTBV and GPTMTBPV
Similarly, write accesses must also be performed by writing the upper bits prior to writing the lower
bits as follows:
1. Write the appropriate Timer B register or prescaler register.
2. Write the corresponding Timer A register.
The registers that must be written in this manner are shown below:
■ 64-bit writes
– GPTMTAV and GPTMTBV
720
June 12, 2014
Texas Instruments-Production Data