@GNU AS
@.CharSet=CP1251 (Cyrillic)

@.desc type=module
@ +------------------------------------------------------------------+
@ |                         Определения Core Debug                   |
@ |                            CORTEX-M4                             |
@ +------------------------------------------------------------------+
@.enddesc

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

@.item CoreDebug_BASE
.equ CoreDebug_DHCSR     , 0    @  (R/W)  Debug Halting Control and Status Register
.equ CoreDebug_DCRSR     , 4    @  (W)    Debug Core Register Selector Register
.equ CoreDebug_DCRDR     , 8    @  (R/W)  Debug Core Register Data Register
.equ CoreDebug_DEMCR     , 12   @  (R/W)  Debug Exception and Monitor Control Register
@.end

@.item CoreDebug_DHCSR
.equ CoreDebug_DHCSR_DBGKEY_N           , 16
.equ CoreDebug_DHCSR_DBGKEY_M           , 0xFFFF << CoreDebug_DHCSR_DBGKEY_N
.equ CoreDebug_DHCSR_S_RESET_ST_N       , 25
.equ CoreDebug_DHCSR_S_RESET_ST         , 1 << CoreDebug_DHCSR_S_RESET_ST_N
.equ CoreDebug_DHCSR_S_RETIRE_ST_N      , 24
.equ CoreDebug_DHCSR_S_RETIRE_ST        , 1 << CoreDebug_DHCSR_S_RETIRE_ST_N
.equ CoreDebug_DHCSR_S_LOCKUP_N         , 19
.equ CoreDebug_DHCSR_S_LOCKUP           , 1 << CoreDebug_DHCSR_S_LOCKUP_N
.equ CoreDebug_DHCSR_S_SLEEP_N          , 18
.equ CoreDebug_DHCSR_S_SLEEP            , 1 << CoreDebug_DHCSR_S_SLEEP_N
.equ CoreDebug_DHCSR_S_HALT_N           , 17
.equ CoreDebug_DHCSR_S_HALT             , 1 << CoreDebug_DHCSR_S_HALT_N
.equ CoreDebug_DHCSR_S_REGRDY_N         , 16
.equ CoreDebug_DHCSR_S_REGRDY           , 1 << CoreDebug_DHCSR_S_REGRDY_N
.equ CoreDebug_DHCSR_C_SNAPSTALL_N      , 5
.equ CoreDebug_DHCSR_C_SNAPSTALL        , 1 << CoreDebug_DHCSR_C_SNAPSTALL_N
.equ CoreDebug_DHCSR_C_MASKINTS_N       , 3
.equ CoreDebug_DHCSR_C_MASKINTS         , 1 << CoreDebug_DHCSR_C_MASKINTS_N
.equ CoreDebug_DHCSR_C_STEP_N           , 2
.equ CoreDebug_DHCSR_C_STEP             , 1 << CoreDebug_DHCSR_C_STEP_N
.equ CoreDebug_DHCSR_C_HALT_N           , 1
.equ CoreDebug_DHCSR_C_HALT             , 1 << CoreDebug_DHCSR_C_HALT_N
.equ CoreDebug_DHCSR_C_DEBUGEN_N        , 0
.equ CoreDebug_DHCSR_C_DEBUGEN          , 1 << CoreDebug_DHCSR_C_DEBUGEN_N
@.end


@.item CoreDebug_DCRSR
.equ CoreDebug_DCRSR_REGWnR_N , 16
.equ CoreDebug_DCRSR_REGWnR   , 1 << CoreDebug_DCRSR_REGWnR_N
.equ CoreDebug_DCRSR_REGSEL_N , 0
.equ CoreDebug_DCRSR_REGSEL_M , 0x1F << CoreDebug_DCRSR_REGSEL_N
@.end


@.item CoreDebug_DEMCR
.equ CoreDebug_DEMCR_TRCENA_N           , 24
.equ CoreDebug_DEMCR_TRCENA             , 1 << CoreDebug_DEMCR_TRCENA_N
.equ CoreDebug_DEMCR_MON_REQ_N          , 19
.equ CoreDebug_DEMCR_MON_REQ            , 1 << CoreDebug_DEMCR_MON_REQ_N
.equ CoreDebug_DEMCR_MON_STEP_N         , 18
.equ CoreDebug_DEMCR_MON_STEP           , 1 << CoreDebug_DEMCR_MON_STEP_N
.equ CoreDebug_DEMCR_MON_PEND_N         , 17
.equ CoreDebug_DEMCR_MON_PEND           , 1 << CoreDebug_DEMCR_MON_PEND_N
.equ CoreDebug_DEMCR_MON_EN_N           , 16
.equ CoreDebug_DEMCR_MON_EN             , 1 << CoreDebug_DEMCR_MON_EN_N
.equ CoreDebug_DEMCR_VC_HARDERR_N       , 10
.equ CoreDebug_DEMCR_VC_HARDERR         , 1 << CoreDebug_DEMCR_VC_HARDERR_N
.equ CoreDebug_DEMCR_VC_INTERR_N        , 9
.equ CoreDebug_DEMCR_VC_INTERR          , 1 << CoreDebug_DEMCR_VC_INTERR_N
.equ CoreDebug_DEMCR_VC_BUSERR_N        , 8
.equ CoreDebug_DEMCR_VC_BUSERR          , 1 << CoreDebug_DEMCR_VC_BUSERR_N
.equ CoreDebug_DEMCR_VC_STATERR_N       , 7
.equ CoreDebug_DEMCR_VC_STATERR         , 1 << CoreDebug_DEMCR_VC_STATERR_N
.equ CoreDebug_DEMCR_VC_CHKERR_N        , 6
.equ CoreDebug_DEMCR_VC_CHKERR          , 1 << CoreDebug_DEMCR_VC_CHKERR_N
.equ CoreDebug_DEMCR_VC_NOCPERR_N       , 5
.equ CoreDebug_DEMCR_VC_NOCPERR         , 1 << CoreDebug_DEMCR_VC_NOCPERR_N
.equ CoreDebug_DEMCR_VC_MMERR_N         , 4
.equ CoreDebug_DEMCR_VC_MMERR           , 1 << CoreDebug_DEMCR_VC_MMERR_N
.equ CoreDebug_DEMCR_VC_CORERESET_N     , 0
.equ CoreDebug_DEMCR_VC_CORERESET       , 1 << CoreDebug_DEMCR_VC_CORERESET_N
@.end


