Регистры Allwinner H616

Сокращения  |  Дерево шин  |  Карта памяти


HS_TMR1_CTRL_REG
3.7.5. HS Timer 1 Control Register - адрес: 0x3005040 (смещение: 0x0040)

Таймер высокой скорости: список регистров



31 ||||||||||||||||| 16
15 ||||||||||||||||| 00

  HS_TMR1_TEST

Bit 31
R/W
0x0

High Speed Timer 1 Test Mode
In test mode, the low register should be set to 0x1, the high register will down counter.
The counter needs to be reloaded.
0: Normal mode
1: Test mode


  Unused

Bits 30 : 8

  HS_TMR1_MODE

Bit 7
R/W
0x0

High Speed Timer 1 Mode
0: Continuous mode. When interval value reached, the timer will not disable automatically.
1: Single mode. When interval value reached, the timer will disable
automatically.


  HS_TMR1_CLK

Bits 6 : 4
R/W
0x0

Select the pre-scale of the high speed timer 1 clock sources.


000: /1
001: /2
010: /4
011: /8
100: /16
101: /
110: /
111: /


  Unused

Bits 3 : 2

  HS_TMR1_RELOAD

Bit 1
R/W1S
0x0

High Speed Timer 1 Reload
0: No effect
1: Reload High Speed Timer 1 Interval Value


  HS_TMR1_EN

Bit 0
R/W
0x0

High Speed Timer 1 Enable
0: Stop/Pause
1: Start
If the timer starts, it will reload the interval value to internal register, and the
current counter will count from interval value to 0.

If the current counter does not reach the zero, the timer enable bit is set to
0 , the current value counter will pause. At least wait for 2 cycles, the start
bit can be set to 1.
In timer pause state, the interval value register can be modified. If the timer
starts again, and the software hopes the current value register to down-count
from the new interval value, the reload bit and the enable bit should be set
to 1 at the same time.



Команда U-Boot для чтения регистра

md 3005040 1



Bit fields structure

typedef union  hs_tmr1_ctrl_reg
{
  struct
  {
   unsigned hs_tmr1_en : 1;
   unsigned hs_tmr1_reload : 1;
   unsigned unused0 : 2;
   unsigned hs_tmr1_clk : 3;
   unsigned hs_tmr1_mode : 1;
   unsigned unused1 : 23;
   unsigned hs_tmr1_test : 1;
  } b;
   unsigned long w;
} HS_TMR1_CTRL_REG
   

Allwinner H616 Manual