System Timer
UG0331 User Guide Revision 15.0
622
19.3.2.2 Use Model 2: 64-Bit Mode
To generate a 30 second delay with a 100 MHz clock using a 64-bit Timer in One-shot mode:
1.
Initialize the Timer for One-shot mode using MSS_TIM64_init(MSS_TIMER_ONE_SHOT_MODE).
2.
Use MSS_TIM64_load_immediate(load_value) to load required time period
For 30 seconds delay load value calculation:
•
For 100 MHz, clock period is 0.01 µs
•
Number of counts for 30 second delay is 30/0.01 µs equal to 3000 x 10
6
(B2D05E00 in
hexadecimal).
•
MSS_TIM1_load_immediate(0x B2D05E00)
3.
Enable 64-bit Timer interrupt using MSS_TIM64_enable_irq();
4.
Start the Timer using MSS_TIM64_start();
5.
Whenever counter reaches zero, it generates an interrupt.
6.
Clear the interrupt using MSS_TIM64_clear_irq() and stop the Timer MSS_TIM64_stop().
19.4
Timer Register Map
The following table summarizes each of the Timer registers described in this document. The Timer base
address resides at 0x40004000 and extends to address 0x40004FFF in the Cortex-M3 processor
memory map.
Table 616 •
Timer Register Map
Register Name
Address
Offset
R/W
Reset
Value
Description
TIM1_VAL (
0x00
R
0
Current value of Timer1
TIM1_LOADVAL (
)
0x04
R/W
0
Load value for Timer1
TIM1_BGLOADVAL (
) 0x08
R/W
0
Background load value for Timer1
TIM1_CTRL (
)
0x0C
R/W
0
Control register for Timer1
TIM1_RIS (
)
0x10
R/W
0
Timer 1 raw interrupt status
TIM1_MIS (
0x14
R
0
Timer 1 masked interrupt status
TIM2_VAL (
0x18
R
0
Current value of Timer2
TIM2_LOADVAL (
)
0x1C
R/W
0
Load value for Timer2
TIM2BGLOADVAL (
0x20
R/W
0
Background load value for Timer2
TIM2_CTRL (
)
0x24
R/W
0
Control register for Timer2
TIM2_RIS (
)
0x28
R/W
0
Timer2 raw interrupt status
TIM2MIS (
0x2C
R
0
Timer2 masked interrupt status
0x30
R
0
Upper 32-bit word for 64-bit mode
0x34
R
0
Lower 32-bit word for 64-bit mode
TIM64_LOADVAL_U (
0x38
R/W
0
Upper 32-bit word for 64-bit mode immediate
load
0x3C
R/W
0
Lower 32-bit word for 64-bit mode immediate
load
0x40
R/W
0
Upper 32-bit word for background value for
64-bit mode
0x44
R/W
0
Lower 32-bit word for background value for
64-bit mode
0x48
R/W
0
Control register for 64-bit mode
0x4C
R/W
0
Raw interrupt status for 64-bit mode
Содержание SmartFusion2 MSS
Страница 1: ...UG0331 User Guide SmartFusion2 Microcontroller Subsystem ...
Страница 166: ...Cortex M3 Processor Reference Material UG0331 User Guide Revision 15 0 132 ...
Страница 200: ...Embedded NVM eNVM Controllers UG0331 User Guide Revision 15 0 166 Figure 87 System Builder Window ...
Страница 407: ...Universal Serial Bus OTG Controller UG0331 User Guide Revision 15 0 373 ...
Страница 806: ...Fabric Interface Controller UG0331 User Guide Revision 15 0 772 Figure 345 FIC Master AHB Lite Subsystem ...