| 1 |
5 |
sergeykhbr |
/** @page gptimers_page General Purpose Timers
|
| 2 |
|
|
|
| 3 |
|
|
@section gptimers_overview GPTimers overview
|
| 4 |
|
|
|
| 5 |
|
|
This GPTimers implementation can be additionally configured using the following
|
| 6 |
|
|
generic parameters.
|
| 7 |
|
|
|
| 8 |
|
|
| Name | Default | Description
|
| 9 |
|
|
|:-----|:---------:|:------------
|
| 10 |
|
|
|irqx | 0 | Interrupt pin index This value is used only as argument in output Plug'n'Play configuration.
|
| 11 |
|
|
|tmr_total| 2 | Total Number of Timers. Each timer is the 64-bits counter that can be used for interrupt generation or without.
|
| 12 |
|
|
|
| 13 |
|
|
@section gptimers_regs GPTimers registers mapping
|
| 14 |
|
|
GPTimers device acts like a slave AMBA AXI4 device that is directly mapped
|
| 15 |
|
|
into physical memory. Default address location for our implementation
|
| 16 |
|
|
is defined by 0x80005000. Memory size is 4 KB.
|
| 17 |
|
|
|
| 18 |
|
|
@par High Precision Timer register (Least Word) (0x000).
|
| 19 |
|
|
|
| 20 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 21 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 22 |
|
|
| 64 | RW | 64h'0 | highcnt | 63:0 | High precision counter. This counter isn't used as a source of interrupt and cannot be stopped from SW.
|
| 23 |
|
|
|
| 24 |
|
|
@par High Precision Timer register (Most Word) (0x004).
|
| 25 |
|
|
|
| 26 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 27 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 28 |
|
|
| 64 | RW | 64h'0 | highcnt | 63:0 | High precision counter. This counter isn't used as a source of interrupt and cannot be stopped from SW.
|
| 29 |
|
|
|
| 30 |
|
|
@par Pending Timer IRQ register (0x008).
|
| 31 |
|
|
|
| 32 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 33 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 34 |
|
|
| 32-tmr_total | RW | 0 | reserved | 31:tmr_total | Reserved.
|
| 35 |
|
|
| tmr_total | RW | 0 | pending | tmr_total-1:0 | Pending Bit. Each timer can be configured to generate interrupt. Simaltenously with interrupt is rising pending bit that has to be lowed by Software.
|
| 36 |
|
|
|
| 37 |
|
|
@par Timer[0] Control register (0x040).
|
| 38 |
|
|
|
| 39 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 40 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 41 |
|
|
| 30 | RW | 30h'0 | reserved | 31:2 | Reserved.
|
| 42 |
|
|
| 1 | RW | 1b'0 | irq_ena | 1 | Interrupt Enable. Enable the interrupt generation when the timer reaches zero value.
|
| 43 |
|
|
| 0 | RW | 1b'0 | count_ena | 0 | Count Enable. Enable/Disable counter.
|
| 44 |
|
|
|
| 45 |
|
|
@par Timer[0] Current Value register (0x048).
|
| 46 |
|
|
|
| 47 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 48 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 49 |
|
|
| 64 | RW | 64h'0 | value | 63:0 | Timer Value. Read/Write register with counter's value. When it equals to 0 the 'init_value' will be used to re-initialize counter.
|
| 50 |
|
|
|
| 51 |
|
|
@par Timer[0] Init Value register (0x050).
|
| 52 |
|
|
|
| 53 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 54 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 55 |
|
|
| 64 | RW | 64h'0 | init_value | 63:0 | Timer Init Value. Read/Write register is used for cycle timer re-initializtion. If init_value = 0 and value != 0 then the timer is used as a 'single shot' timer.
|
| 56 |
|
|
|
| 57 |
|
|
@par Timer[1] Control register (0x060 = 0x040 + Idx * 32).
|
| 58 |
|
|
|
| 59 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 60 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 61 |
|
|
| 30 | RW | 30h'0 | reserved | 31:2 | Reserved.
|
| 62 |
|
|
| 1 | RW | 1b'0 | irq_ena | 1 | Interrupt Enable. Enable the interrupt generation when the timer reaches zero value.
|
| 63 |
|
|
| 0 | RW | 1b'0 | count_ena | 0 | Count Enable. Enable/Disable counter.
|
| 64 |
|
|
|
| 65 |
|
|
@par Timer[1] Current Value register (0x068 = 0x48 + Idx * 32).
|
| 66 |
|
|
|
| 67 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 68 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 69 |
|
|
| 64 | RW | 64h'0 | value | 63:0 | Timer Value. Read/Write register with counter's value. When it equals to 0 the 'init_value' will be used to re-initialize counter.
|
| 70 |
|
|
|
| 71 |
|
|
@par Timer[1] Init Value register (0x070 = 0x050 + Idx * 32).
|
| 72 |
|
|
|
| 73 |
|
|
| Bits |Type| Reset |Field Name| Bits | Description
|
| 74 |
|
|
|:----:|:--:|:-----:|:---------|:-----:|:------------------------------------------------------------|
|
| 75 |
|
|
| 64 | RW | 64h'0 | init_value | 63:0 | Timer Init Value. Read/Write register is used for cycle timer re-initializtion. If init_value = 0 and value != 0 then the timer is used as a 'single shot' timer.
|
| 76 |
|
|
|
| 77 |
|
|
|
| 78 |
|
|
*/
|