You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.6 KiB
65 lines
2.6 KiB
9 years ago
|
;****************************************************************************
|
||
9 years ago
|
; FILE : INI_SYSTICK.S
|
||
|
; AUTHOR : Petr Dousa, Ondrej Hruska
|
||
|
; DATE : 10/2015
|
||
9 years ago
|
; DESCR : Control registers and bit masks for SysTick
|
||
9 years ago
|
;
|
||
|
; System Timer (SysTick)
|
||
|
;
|
||
9 years ago
|
; Part of an assembler library for STM32L100, based on the STM32 CMSIS.
|
||
|
; Developed for educational purposes at the Department of Measure of CTU in Prague.
|
||
|
; See the LICENSE file for detailed terms of use.
|
||
9 years ago
|
;****************************************************************************
|
||
|
|
||
|
|
||
|
;****************************************************************************
|
||
|
;*
|
||
|
;* REGISTERS
|
||
|
;*
|
||
|
;****************************************************************************
|
||
|
|
||
|
|
||
|
SysTick_CSR EQU (_SCS_BASE + 0x010) ; (R/W) SysTick Control and Status Register
|
||
|
SysTick_RELOAD EQU (_SCS_BASE + 0x014) ; (R/W) SysTick Reload Value Register
|
||
|
SysTick_VAL EQU (_SCS_BASE + 0x018) ; (R/W) SysTick Current Value Register
|
||
|
SysTick_CALIB EQU (_SCS_BASE + 0x01C) ; (R/ ) SysTick Calibration Value Register
|
||
|
|
||
|
|
||
|
|
||
|
;****************************************************************************
|
||
|
;*
|
||
|
;* BIT MASKS AND DEFINITIONS
|
||
|
;*
|
||
|
;****************************************************************************
|
||
|
|
||
|
|
||
|
;**************** Bit definition for SysTick_CSR register ****************
|
||
|
|
||
|
SysTick_CSR_ENABLE EQU 0x00000001 ; Counter enable
|
||
|
SysTick_CSR_TICKINT EQU 0x00000002 ; Enable interrupt when counter reaches zero
|
||
|
SysTick_CSR_CLKSOURCE EQU 0x00000004 ; Clock source (0 - external, 1 - core clock)
|
||
|
|
||
|
SysTick_CSR_CLKSOURCE_CORE EQU 0x00000004 ; Clock source - core clock
|
||
|
SysTick_CSR_CLKSOURCE_DIV8 EQU 0x00000000 ; Clock source - core clock / 8
|
||
|
|
||
|
SysTick_CSR_COUNTFLAG EQU 0x00010000 ; Count Flag (only if interrupt is disabled)
|
||
|
|
||
|
|
||
|
;**************** Bit definition for SysTick_LOAD register ****************
|
||
|
|
||
|
SysTick_RELOAD_MASK EQU 0x00FFFFFF ; Reload value used when the counter reaches 0
|
||
|
|
||
|
|
||
|
;**************** Bit definition for SysTick_VAL register *****************
|
||
|
|
||
|
SysTick_VAL_MASK EQU 0x00FFFFFF ; Current value at the time the register is accessed
|
||
|
|
||
|
|
||
|
;**************** Bit definition for SysTick_CALIB register ***************
|
||
|
|
||
|
SysTick_CALIB_TENMS EQU 0x00FFFFFF ; Reload value to use for 10ms timing
|
||
|
SysTick_CALIB_SKEW EQU 0x40000000 ; Calibration value is not exactly 10 ms
|
||
|
SysTick_CALIB_NOREF EQU 0x80000000 ; The reference clock is not provided
|
||
|
|
||
|
END
|