NUC970 Technical Reference Manual
Publication Release Date: Dec. 15, 2015
- 483 -
Revision V1.30
NUC97
0
T
E
CHNIC
A
L
RE
F
E
RE
N
CE
MA
NUA
L
Enable counter by setting TMRSEL (SC_CTL[14:13]). Select operation mode OPMODE
(SC_TMRCTLx[27:24]) and give a count value CNT (SC_TMRCTLx[23:0]) by setting
SC_TMRCTLx register. Set CNTEN0 (SC_ALTCTL[5]), CNTEN1 (SC_ALTCTL[6]) or CNTEN2
(SC_ALTCTL[7]) is to start counting.
The SC_TMRCTL0, SC_TMRCTL1 and SC_TMRCTL2 timer operation mode are listed in below
table.
Note:
Only SC_TMRCTL0 supports mode 0011.
OPMODE
(SC_TMRCTLx
[27:24])
(X=0 ~2)
Operation Description
0000
The down counter started when CNTENx (SC_ALTCTL[7:5]) enabled and ended when counter time-out. The
time-out value will be CNT (SC_TMRCTL0[23:0], SC_TMRCTL1[7:0], SC_TMRCTL2[7:0]) + 1.
Start
Start counting when CNTENx (SC_ALTCTL[7:5]) enabled
End
When the down counter equals to 0, hardware will set TMRxIF (SC_INTSTS[5:3]) and clear
CNTENx (SC_ALTCTL[7:5]) automatically.
0001
The down counter started when the first START bit (reception or transmission) detected and ended when
counter time-out. The time-out value will be CNT (SC_TMRCTL0[23:0], SC_TMRCTL1[7:0],
SC_TMRCTL2[7:0]) + 1.
Start
Start counting when the first START bit (reception or transmission) detected after CNTENx
(SC_ALTCTL[7:5]) set to 1.
End
When the down counter equals to 0, hardware will set TMRxIF (SC_INTSTS[5:3]) and clear
CNTENx (SC_ALTCTL[7:5]) automatically.
0010
The down counter started when the first START bit (reception) detected and ended when counter time-out.
The time-out value will be CNT (SC_TMRCTL0[23:0], SC_TMRCTL1[7:0], SC_TMRCTL2[7:0]) + 1.
Start
Start counting when the first START bit (reception) detected bit after CNTENx
(SC_ALTCTL[7:5]) set to 1.
End
When the down counter equals to 0, hardware will set TMRxIF (SC_INTSTS[5:3]) and clear
CNTENx (SC_ALTCTL[7:5]) automatically.
0011
The down counter is only used for hardware activation, warm reset sequence to measure ATR timing.
The timing starts when SC_RST de-assertion and ends when ATR response received or time-out.
If the counter decreases to 0 before ATR response received, hardware will generate an interrupt to CPU. The
time-out value will be CNT (SC_TMRCTL0[23:0]) + 1.
Start
Start counting when SC_RST de-assertion after CNTEN0 (SC_ALTCTL[5]) set to 1.
It is used for hardware activation, warm reset mode.
End
When the down counter equals to 0 before ATR response received, hardware will set TMR0IF
(SC_INTSTS[3]) and clear CNTEN0 (SC_ALTCTL[5]) automatically.
When ATR received and down counter does not equal to 0, hardware will clear CNTEN0
(SC_ALTCTL[5]) automatically.
0100
Same as 0000, but when the down counter equals to 0, hardware will set TMRxIF (SC_INTSTS[5:3]) and
counter will re-load the CNT (SC_TMRCTL0[23:0], SC_TMRCTL1[7:0], SC_TMRCTL2[7:0]) value and re-
count until software clears CNTENx (SC_ALTCTL[7:5]).
When ACTSTSx (SC_ALTCTL[15:13]) = 1, software can change CNT (SC_TMRCTL0[23:0],
SC_TMRCTL1[7:0], SC_TMRCTL2[7:0]) value at any time. When the down counter equals to 0, counter will
reload the new value of CNT (SC_TMRCTL0[23:0], SC_TMRCTL1[7:0], SC_TMRCTL2[7:0]) and re-count.
The time-out value will be CNT (SC_TMRCTL0[23:0], SC_TMRCTL1[7:0], SC_TMRCTL2[7:0]) + 1.