System Timer Interface Peripheral

ST (AT91S_ST) 0xFFFFFD00 (AT91C_BASE_ST)
Periph ID AICSymbolDescription
1 (AT91C_ID_SYS)System Peripheral

FunctionDescription
AT91F_ST_CfgPMCEnable Peripheral clock in PMC for ST


ST Software API (AT91S_ST)

OffsetFieldDescription
0x0ST_CRControl Register
0x4ST_PIMRPeriod Interval Mode Register
0x8ST_WDMRWatchdog Mode Register
0xCST_RTMRReal-time Mode Register
0x10ST_SRStatus Register
0x14ST_IERInterrupt Enable Register
0x18ST_IDRInterrupt Disable Register
0x1CST_IMRInterrupt Mask Register
0x20ST_RTARReal-time Alarm Register
0x24ST_CRTRCurrent Real-time Register

FunctionDescription
AT91F_ST_DisableItDisable system timer interrupt
AT91F_ST_GetInterruptMaskStatusReturn ST Interrupt Mask Status
AT91F_ST_IsInterruptMaskedTest if ST Interrupt is Masked
AT91F_ST_EnableItEnable system timer interrupt
AT91F_ST_SetPeriodIntervalSet Periodic Interval Interrupt (period in ms)

ST Register Description

ST: AT91_REG ST_CR Control Register

OffsetNameDescription
0ST_WDRST
AT91C_ST_WDRST
Watchdog Timer Restart
0 = No effect.
1 = Reload the start-up value in the Watchdog Timer.

ST: AT91_REG ST_PIMR Period Interval Mode Register

OffsetNameDescription
15..0ST_PIV
AT91C_ST_PIV
Watchdog Timer Restart
Defines the value loaded in the 16-bit counter of the Period Interval Timer. The maximum period is obtained by pro-gramming PIV at 0x0 corresponding to 65536 Slow Clock cycles.

ST: AT91_REG ST_WDMR Watchdog Mode Register

OffsetNameDescription
15..0ST_WDV
AT91C_ST_WDV
Watchdog Timer Restart
Defines the value loaded in the 16-bit counter. The maximum period is obtained by programming WDV to 0x0 corre-sponding to 65536 * 128 Slow Clock cycles.
16ST_RSTEN
AT91C_ST_RSTEN
Reset Enable
0 = No reset is generated when a watchdog overflow occurs.
1 = An internal reset is generated when a watchdog overflow occurs.
17ST_EXTEN
AT91C_ST_EXTEN
External Signal Assertion Enable
0 = The NWDOVF is not tied low when a watchdog overflow occurs.
1 = The NWDOVF is tied low during 8 Slow Clock cycles when a watchdog overflow occurs.

ST: AT91_REG ST_RTMR Real-time Mode Register

OffsetNameDescription
15..0ST_RTPRES
AT91C_ST_RTPRES
Real-time Timer Prescaler Value
Defines the number of SLCK periods required to increment the Real-time Timer. The maximum period is obtained by programming RTPRES to 0x0 corresponding to 65536 Slow Clock cycles.

ST: AT91_REG ST_SR Status Register

OffsetNameDescription
0ST_PITS
AT91C_ST_PITS
Period Interval Timer Interrupt
0 = The Period Interval Timer has not reached 0 since the last read of the Status Register.
1 = The Period Interval Timer has reached 0 since the last read of the Status Register.
1ST_WDOVF
AT91C_ST_WDOVF
Watchdog Overflow
0 = The Watchdog Timer has not reached 0 since the last read of the Status Register.
1 = The Watchdog Timer has reached 0 since the last read of the Status Register.
2ST_RTTINC
AT91C_ST_RTTINC
Real-time Timer Increment
0 = The Real-time Timer has not been incremented since the last read of the Status Register.
1 = The Real-time Timer has been incremented since the last read of the Status Register.
3ST_ALMS
AT91C_ST_ALMS
Alarm Status
0 = No alarm compare has been detected since the last read of the Status Register.
1 = Alarm compare has been detected since the last read of the Status Register.

ST: AT91_REG ST_IER Interrupt Enable Register

OffsetNameDescription
0ST_PITS
AT91C_ST_PITS
Period Interval Timer Interrupt
0 = The Period Interval Timer has not reached 0 since the last read of the Status Register.
1 = The Period Interval Timer has reached 0 since the last read of the Status Register.
1ST_WDOVF
AT91C_ST_WDOVF
Watchdog Overflow
0 = The Watchdog Timer has not reached 0 since the last read of the Status Register.
1 = The Watchdog Timer has reached 0 since the last read of the Status Register.
2ST_RTTINC
AT91C_ST_RTTINC
Real-time Timer Increment
0 = The Real-time Timer has not been incremented since the last read of the Status Register.
1 = The Real-time Timer has been incremented since the last read of the Status Register.
3ST_ALMS
AT91C_ST_ALMS
Alarm Status
0 = No alarm compare has been detected since the last read of the Status Register.
1 = Alarm compare has been detected since the last read of the Status Register.

ST: AT91_REG ST_IDR Interrupt Disable Register

OffsetNameDescription
0ST_PITS
AT91C_ST_PITS
Period Interval Timer Interrupt
0 = The Period Interval Timer has not reached 0 since the last read of the Status Register.
1 = The Period Interval Timer has reached 0 since the last read of the Status Register.
1ST_WDOVF
AT91C_ST_WDOVF
Watchdog Overflow
0 = The Watchdog Timer has not reached 0 since the last read of the Status Register.
1 = The Watchdog Timer has reached 0 since the last read of the Status Register.
2ST_RTTINC
AT91C_ST_RTTINC
Real-time Timer Increment
0 = The Real-time Timer has not been incremented since the last read of the Status Register.
1 = The Real-time Timer has been incremented since the last read of the Status Register.
3ST_ALMS
AT91C_ST_ALMS
Alarm Status
0 = No alarm compare has been detected since the last read of the Status Register.
1 = Alarm compare has been detected since the last read of the Status Register.

ST: AT91_REG ST_IMR Interrupt Mask Register

OffsetNameDescription
0ST_PITS
AT91C_ST_PITS
Period Interval Timer Interrupt
0 = The Period Interval Timer has not reached 0 since the last read of the Status Register.
1 = The Period Interval Timer has reached 0 since the last read of the Status Register.
1ST_WDOVF
AT91C_ST_WDOVF
Watchdog Overflow
0 = The Watchdog Timer has not reached 0 since the last read of the Status Register.
1 = The Watchdog Timer has reached 0 since the last read of the Status Register.
2ST_RTTINC
AT91C_ST_RTTINC
Real-time Timer Increment
0 = The Real-time Timer has not been incremented since the last read of the Status Register.
1 = The Real-time Timer has been incremented since the last read of the Status Register.
3ST_ALMS
AT91C_ST_ALMS
Alarm Status
0 = No alarm compare has been detected since the last read of the Status Register.
1 = Alarm compare has been detected since the last read of the Status Register.

ST: AT91_REG ST_RTAR Real-time Alarm Register

OffsetNameDescription
19..0ST_ALMV
AT91C_ST_ALMV
Alarm Value Value
Defines the Alarm value compared with the Real-time Timer. The maximum delay before ALMS status bit activation is obtained by programming ALMV to 0x0 corresponding to 1048576 seconds.

ST: AT91_REG ST_CRTR Current Real-time Register

OffsetNameDescription
19..0ST_CRTV
AT91C_ST_CRTV
Current Real-time Value
Returns the current value of the Real-time Timer.