⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c200mnrt.i

📁 TI 的DSP2407A的无速度传感器永磁同步电机FOC控制程序
💻 I
📖 第 1 页 / 共 3 页
字号:
;*H*************************************************************************
; TI Proprietary Information - Internal Data
; Copyright (c) 1993-1999, Texas Instruments Incorporated
; All rights reserved
;***************************************************************************
;***************************************************************************
;
; DESCRIPTION:
;
;     Truely inclusive monitor include file
;       for C25LP HLL Real-Time Debugger.
;
;     This real-time monitor was developed by H.Roland Hoar.
;
; STATUS:
;
;     This monitor version is dated 24th of June 1997.
;     It is intended for use with HLL Debugger versions "1.19" or later.
;     The MON_RELEASE mnemonic has the hexadecimal value '1019'.
;
;     This document has page feed characters spaced for 66 lines per page.
;     Its page alignment is adjusted to ensure
;         attractive two-page-per-sheet printing.
;
;***************************************************************************
;
               .page 
;***************************************************************************
; GLOBAL DECLARATIONS
;***************************************************************************
               .global  MON_SE_CNFG, MON_RT_CNFG, MON_GO, MON_RESET
               .global  MON_EINTR, MON_ETRAP
               .global  MON_TRAP_ENTRY, MON_INTR_ENTRY, MON_ENTRY
               .global  MON_WAIT, MON_WAIT_B2
               .global  MON_TRAP_VEC
               .global  MON_PGE0_DP, MON_RGST_DP
               .global  MON_TEMP_PC, MON_TEMP_ST0, MON_TEMP_ST1
               .global  MON_TEMP_ACCL, MON_TEMP_ACCH
               .global  MON_ACCL, MON_ACCH
               .global  MON_ST0_SAVE, MON_IMR_SAVE
               .global  MON_TWO_SAVE, MON_INT_MSK
               .global  MON_START, MON_STOP
               .global  MON_ROOT, MON_RELEASE, MON_POINTER
;
               .page 
;***************************************************************************
; REALTIME DECLARATIONS
;***************************************************************************
;
;---------------------------------------------------------------------------
; Configure selected interrupts so that if they are in the enabled state
; on entry to the monitor, they will be disabled within the monitor and
; re-enabled on exit from the monitor.
;
; This behaviour allows the user to breakpoint and single-step the
; service routines corresponding to interrupts that are disabled
; within the monitor.
;
; The MON_USER_INTx mnemonics select which interrupts shall be manipulated:
;   A zero value selects them for possible disabling/enabling.
;   A one value leaves them unaffected.
; Don't get confused, remember that MON_USER_INTx occupies bit x-1
; in the Interrupt Mask and Flag Registers in the low data memory space.
; 
; The default is to always disable/enable the Emulation Interrupt (INT7),
; and to not manipulate the other user interrupts.
;---------------------------------------------------------------------------
MON_USER_INT1          .set  1 ; Default is to be unaffected.
MON_USER_INT2          .set  1 ; Default is to be unaffected.
MON_USER_INT3          .set  1 ; Default is to be unaffected.
MON_USER_INT4          .set  1 ; Default is to be unaffected.
MON_USER_INT5          .set  1 ; Default is to be unaffected.
MON_USER_INT6          .set  1 ; Default is to be unaffected.
MON_USER_INT7          .set  0 ; This is the emulation interrupt.
MON_USER_INT8          .set  1 ; Default is to be unaffected.
;
               .page 
;---------------------------------------------------------------------------
; Configure the monitor to either have its MON_EINTR_VECS and MON_ETRAP_VECS
; macros placed directly in the interrupt vector table at the bottom
; of program memory: or have branch instructions that lead to the
; macros placed in the interrupt vector table.
;
; If the interrupt latency must be minimised, then option MON_VECTOR_MACRO
; should be used. In this case the two macros are manually placed
; in the fixed ROM-based interrupt vector table at the bottom of
; program memory, with statements such as:
;
;   MON_EINTR  mon_eintr_vecs ; this macro is located at 0x000E@prgm.
;                             ; it uses 14 words in the vector table.
;                             ; thus it replaces 7 branch instructions.
;
;   MON_ETRAP  mon_etrap_vecs ; this macro is located at 0x0026@prgm.
;                             ; it uses 8 words in the vector table.
;                             ; thus it replaces 4 branch instructions.
;
; If a re-mappable interrupt vector table is required, at the expense
; of interrupt latency, then option MON_VECTOR_BRANCH should be used
; to automatically include the macros in the monitor itself.
; When a re-mappable vector table is used, the fixed branch instructions
; in the ROM-based vector table do not lead directly to target routines,
; instead they lead to an intermediate RAM-based vector table with
; branch operands that can be modified as required by the user.
; In this case two branch instructions must be manually placed
; in the fixed ROM-based interrupt vector table at the bottom
; of program memory.  These two branches may reach the macros
; indirectly via the RAM-based vector table at the cost of
; additional interrupt latency.  They may also bypass the second
; vector table and lead directly to the macros as shown below:
;
;              B  MON_EINTR   ; this branch is located at 0x000E@prgm.
;                             ; it uses 2 words in the vector table.
;
;              B  MON_ETRAP   ; this macro is located at 0x0026@prgm.
;                             ; it uses 2 words in the vector table.
;
; The default is to require the macros to be in the vector table so as
; to minimise interrupt latency on entering and exiting the monitor.
;---------------------------------------------------------------------------
MON_VECTOR_MACRO       .set 0
MON_VECTOR_BRANCH      .set 1
MON_VECTOR             .set MON_VECTOR_MACRO ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the monitor to ensure the Interrupt Mode bit (INTM) in the
; Status Register #0 (ST0) is always cleared (interrupts enabled) on
; entry to the monitor, or its value is unaltered on entry to the monitor.
; In understanding this option first remember that the INTM bit is never
; altered while in the monitor, or on exit from it.
;
; The option MON_INT_ALTR_ENB configures the monitor so that the INTM bit
; is always cleared (enabled) on entry to the monitor. Then when the
; HLL Debugger is used to interactively STEP or RUN/HALT code containing
; a DINT instruction, the DINT instruction will have no effect.
; So the interrupt service routines will remain enabled.
;
; The option MON_INT_ALTR_NOT configures the monitor so that the INTM bit
; is not altered on entry to the monitor. Then when the HLL Debugger is
; used to interactively STEP or RUN/HALT code containing a DINT
; instruction, the DINT instruction will disable all interrupts.
; So the interrupt service routines will be disabled until a later EINT
; instruction is reached by a later STEP or RUN/HALT in the HLL Debugger.
;
; The default is always clear (enable) the INTM bit on entering the monitor.
;---------------------------------------------------------------------------
MON_INT_ALTR_NOT       .set  0 ; 
MON_INT_ALTR_ENB       .set  1 ; This option adds one word of code.
MON_INT_ALTR           .set  MON_INT_ALTR_ENB ; <- Edit only this line.
;
;---------------------------------------------------------------------------
; Configure the location in data memory of the up to 17 words used to
; store-to and load-from the values that represent the image of the
; application's register values. They are either: located explicitly in
; page zero, or anywhere in data memory. This is done by setting MON_RGST
; to be MON_RGST_ZRO or MON_RGST_ANY respectively.
;
; The value chosen must match the location of the section "mon_rgst" that
; represents these registers. This is specified in the linker command file.
;
; Use of page zero cuts the size of the monitor code, reduces the
; manipulation of the DP and ST1-0 registers, and shortens the length of
; ETRAP/ERET protected code, but takes a big chunk of block B2 in page zero.
;
; The default of page zero is a smaller monitor.
;---------------------------------------------------------------------------
MON_RGST_ZRO           .set 0
MON_RGST_ANY           .set 1 ; This option adds 9 words of code.
MON_RGST               .set MON_RGST_ZRO ; <- Edit only this line.
;
;---------------------------------------------------------------------------
; Configure the monitor to use a particular auxilliary register for its
; indirect addressing operations. The monitor code will hide its use of
; this register within ETRAP/ERET sequences that disable all interrupts
; (including the NMI) and save/restore the value.
;
; The default is to use 0 (AR0).
; It is unlikely that there is any reason to change this option.
;---------------------------------------------------------------------------
MON_AR_VALUE           .set 0 ; The acceptable values are 0-7.
;
               .page 
;---------------------------------------------------------------------------
; Configure the monitor to exclude the code for accessing the IO memory
; space or include it if the application does access that memory.
;
; The option MON_IO_MAP_USE_NOT disables access to the IO memory space
; by the monitor. This option is recognised by the HLL Debugger which will
; then discard attempts to write and read this memory.  This option has
; the advantage of minimising the monitors size and avoids the tedium of
; allocating patches of RAM for monitor use.
;
; The option MON_IO_MAP_USE_RAM requires that there be three words of RAM
; available, at any fixed location in program memory, for the sole use of
; the monitor.  These words are represented by the section named "mon_ioio"
; in the monitor source and linker command files.  This option has the
; advantage of no effect on the interrupt latency, but the disadvantge
; that B0 may not be used if the application switches it between low data
; memory and high program memory. This option is of obvious use when the
; monitor is loaded into RAM when developing or debugging an application.
;
; The option MON_IO_MAP_USE_ROM requires that there be three words of bank
; B0 RAM available, for the sole use of the monitor. The application may
; freely switch B0 between low data memory and high program memory. These
; three words are represented by the sections named "mon_b0p0" and
; "mon_b0p1" for program and data memory, in the monitor source and linker
; command files.  This option is of obvious use when the monitor is
; embedded in ROM, as bank B0 RAM is available on all devices.  It has the
; disadvantage of increasing the interrupt latency and monitor size.
;
; The default is to not access any IO memory space.
;---------------------------------------------------------------------------
MON_IO_MAP_USE_NOT     .set 00000h
MON_IO_MAP_USE_RAM     .set 00002h ; This option adds 17 words of code.
MON_IO_MAP_USE_ROM     .set 00003h ; This option adds 27 words of code.
MON_IO_MAP_USE         .set MON_IO_MAP_USE_NOT ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the monitor include the code for auto-incrementing addresses
; so as to increase its speed, or exclude the code and reduce its size.
;
; The option MON_AUTO_INC_NONE excludes all monitor code that supports
; blind or controlled auto-incrementing of its address buffer.  This
; cuts the monitor size by 6 words.  The HLL Debugger must explicitly
; communicate an address value to the monitor before almost every access.
; This reduces, by a third to a half, the speed of memory downloads and
; window updates.
;
; The option MON_AUTO_INC_BASIC excludes the monitor code that supports
; controlled auto-incrementing of its address buffer.  It includes the
; code that supports blind auto-incrementing after every memory access.
; This cuts the monitor size by 3 words.  The HLL Debugger only needs
; to communicate an initial address value to the monitor at the start
; of block transfers such as window updates and memory downloads.
; During internal operation of the HLL Debugger there is a need to
; repeatidly access the same memory location. These operations must

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -