Owners manual
System
H3 Datasheet(Revision1.2) Copyright© 2015 Allwinner Technology Co.,Ltd.All Rights Reserved. Page 186
High Speed Timer Interval Value [55:32].
Note:The interval value register is a 56-bit register. When read or write the interval value, the Lo register should be read
or write first. And the Hi register should be written after the Lo register.
4.9.4.6. HS Timer Current Value Lo Register
Offset:0x1C
Register Name: HS_TMR_CURNT_LO_REG
Bit
R/W
Default/Hex
Description
31:0
R/W
x
HS_TMR_CUR_VALUE_LO.
High Speed Timer Current Value [31:0].
4.9.4.7. HS Timer Current Value Hi Register
Offset:0x20
Register Name: HS_TMR_CURNT_HI_REG
Bit
R/W
Default/Hex
Description
31:24
/
/
/
23:0
R/W
x
HS_TMR_CUR_VALUE_HI.
High Speed Timer Current Value [55:32].
Note1:HSTimer current value is a 56-bit down-counter (from interval value to 0).
Note2:The current value register is a 56-bit register. When read or write the current value, the Lo register should be
read or write first.
4.9.5. Programming Guidelines
Take making a 1us delay using HSTimer for an instance as follow, AHB1CLK will be configurated as 100MHz and n_mode,
Single mode and 2 pre-scale will be selected in this instance.
writel(0x0, HS_TMR_INTV_HI); //Set interval value Hi 0x0
writel(0x32, HS_TMR_INTV_LO); //Set interval value Lo 0x32
writel(0x90, HS_TMR_CTRL); //Select n_mode,2 pre-scale,single mode
writel(readl(HS_TMR_CTRL)|(1<<1), HS_TMR_CTRL); //Set Reload bit
writel(readl(HS_TMR_CTRL)|(1<<0), HS_TMR_CTRL); //Enable HSTimer
While(!(readl(HS_TMR_IRQ_STAT)&1)); //Wait for HSTimer to generate pending
Writel(1,HS_TMR_IRQ_STAT); //Clear HSTimer pending
confidential