@GNU AS
@.CharSet=CP1251 (Cyrillic)
@.desc type=module
@ +------------------------------------------------------------------+
@ |                     Базовые константы IWDG                       |
@ +------------------------------------------------------------------+
@.enddesc

.include   "/src/inc/base.inc"

@.item     APB1PERIPH_BASE
.equ  IWDG_BASE          , APB1PERIPH_BASE + 0x3000
.equ  IWDG               , PERIPH_BASE + IWDG_BASE


@.item    IWDG_BASE IWDG
.EQU  IWDG_KR            , 0x00          @ Key register (IWDG_KR)
.EQU  IWDG_PR            , 0x04          @ Prescaler register (IWDG_PR)
.EQU  IWDG_RLR           , 0x08          @ Reload register (IWDG_RLR)
.EQU  IWDG_SR            , 0x0C          @ Status register (IWDG_SR)
@.end

@.item     IWDG_KR
.EQU  IWDG_KR_M          , 0xffff        @ Key Mask
@.end

@.item     IWDG_PR
.EQU  IWDG_PR_DIV4       , 0             @ Divider 4
.EQU  IWDG_PR_DIV8       , 1             @ Divider 8
.EQU  IWDG_PR_DIV16      , 2             @ Divider 16
.EQU  IWDG_PR_DIV32      , 3             @ Divider 32
.EQU  IWDG_PR_DIV64      , 4             @ Divider 64
.EQU  IWDG_PR_DIV128     , 5             @ Divider 128
.EQU  IWDG_PR_DIV256     , 6             @ Divider 256
.EQU  IWDG_PR_DIV256     , 7             @ Divider 256
@.end

@.item     IWDG_RLR
.EQU  IWDG_RLR_M         , 0xFFF         @ Bits11:0 RL[11:0]: Watchdog counter reload mask value
@.end

@.item     IWDG_SR
.equ IWDG_SR_PVU, 0x01 @ Bit 0 PVU: Watchdog prescaler value update
.equ IWDG_SR_RVU, 0x02 @ Bit 1 RVU: Watchdog counter reload value update
@.end



