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

📄 c200mnrt.i

📁 TI 的DSP2407A的无速度传感器永磁同步电机FOC控制程序
💻 I
📖 第 1 页 / 共 3 页
字号:
; explicitly supply the monitor with an address before every access.
; This slightly reduces the speed of the HLL Debugger and monitor.
;
; The option MON_AUTO_INC_EXTRA includes all monitor code that supports
; both blind and controlled auto-incrementing of its address buffer.
; The HLL Debugger only needs to communicate the minimum number of
; address values to the monitor, both at the start of block transfers
; such as window updates and memory downloads, and at the start of
; internal operation of the HLL Debugger that repeatidly access the
; same memory location.  This maximises the speed of the HLL debugger
; and monitor by minimising the number of address values that need
; to be communicated by the HLL debugger to the monitor.
;
; The default of MON_AUTO_INC_EXTRA is a faster but larger monitor.
;---------------------------------------------------------------------------
MON_AUTO_INC_NONE      .set 00000h ; This option cuts 6 words of code.
MON_AUTO_INC_BASIC     .set 00008h ; This option cuts 3 words of code.
MON_AUTO_INC_EXTRA     .set 0000Ch
MON_AUTO_INC           .set MON_AUTO_INC_EXTRA ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the error detection.
;
; This option is implemented in the monitor but not yet in the HLL Debugger.
; With the release 1.07-1.19 HLL Debugger's the default value must be used.
;
; As of Release 1.19 on 24th June '97 I think this option will probably not
; be implemented in the HLL Debugger because no-one expresses interest.
;
; The default of none is a smaller monitor.
;---------------------------------------------------------------------------
MON_ERROR_CHECK_NONE   .set 00000h
MON_ERROR_CHECK_BASIC  .set 00020h
MON_ERROR_CHECK_EXTRA  .set 00030h
MON_ERROR_CHECK        .set MON_ERROR_CHECK_NONE ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the MON_RT_CNFG routine and the location of the "mon_etrap"
; macro that are used to initialise the message passing logic and to
; signal the occurence of a reset to the HLL Debugger.
;
; Because of this the user cannot set software or hardware breakpoints in
; any code that is executed before MON_RT_CNFG and "mon_etrap".
;
; The communication initiated between the HLL Debugger and monitor when
; this code is executed takes a relatively long time (1-2ms), thus the
; user may need to place them after time critical initialisation routines.
;
; To establish communication between the HLL Debugger and monitor requires
; the execution of the MON_RT_CNFG routine first, and then possibly the
; "mon_etrap" macro. The interrupts must also be globally enabled, but
; at a time convienent for the application.
;
; If the MON_RESET_MESG_DEFAULT option is chosen then the "mon_etrap" macro
; macro is placed in the MON_RT_CNFG routine with the message passing
; initialisation code.  This makes for simple monitor installation,
; This is also the most extensively tested option and in realtime operation
; provides solid breakpoint behaviour and reliable reset recovery.
;
; If the MON_RESET_MESG_CUSTOM option is chosen then the "mon_etrap" macro
; and its following NOP labelled MON_RESET are excluded from the code
; for MON_RT_CNFG. The user must explicitly add then to later user code.
;
; If the MON_RESET_MESG_FLOW option is chosen then the "mon_etrap" macro
; and its following NOP labelled MON_RESET are excluded from the code
; for MON_RT_CNFG. They are not relocated anywhere else.
; Extra code is added to MON_RT_CNFG and MON_SE_CNFG to initialise the
; message passing logic.  The deletion in MON_RT_CNFG is to allow the
; user to RUN or GO through the MON_RT_CNFG routine in stopmode without
; entering the monitor at "mon_etrap" and hanging in an endless loop at
; MON_WAIT.
;
; The default MON_RESET_MESG_DEFAULT is easiest to install and understand.
; The other options should not be used without prior discussion with me.
;---------------------------------------------------------------------------
MON_RESET_MESG_DEFAULT .set 00000h
MON_RESET_MESG_CUSTOM  .set 00080h
MON_RESET_MESG_FLOW    .set 000C0h
MON_RESET_MESG         .set MON_RESET_MESG_DEFAULT ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the manner in which the monitor saves the PC, ST0 & ST1,
; ACCL & ACCH when the monitor is entered via emulation interrupt or trap.
; These registers are always are saved and restored inside the ETRAP/ERET
; protected code at monitor entry and exit, thus ensuring an exact snapshot
; of them is taken and given at these times.
;
; If the MON_CORE_EXACT option is chosen then the snapshots of the
; core CPU registers (which were saved inside the ETRAP protected code,
; at monitor entry) are also copied to their final locations inside ETRAP
; protected code.  The disadvantage is that the duration of the protected
; code is increased by about 10 cycles.
;
; If the MON_CORE_LAZY option is chosen then the snapshots of the
; core CPU registers (which were saved inside the ETRAP protected code,
; at monitor entry) are copied to their final locations outside ETRAP
; protected code.  The advantage is that the duration of the protected
; code is not increased.
;
; The default is to be lazy and reduce the duration of the ETRAP/ERET code.
; This default should not need to be changed in normal operation, it is
; provided mostly to give flexibility if debugging the monitor itself.
;---------------------------------------------------------------------------
MON_CORE_EXACT         .set 00000h
MON_CORE_LAZY          .set 00100h
MON_CORE               .set MON_CORE_LAZY ; <- Edit only this line.
;
;---------------------------------------------------------------------------
; Configure the manner in which the monitor saves and restores the image
; of the applications's CPU register values to optimise accuracy or
; ETRAP/ERET latency. The ACC and ST1-0 are always saved and restored
; in ETRAP/ERET protected code.
;
; If the MON_FULL_EXACT option is chosen then the full CPU registers
; (TOS, PLO, PHI, TREG, AR0-7) are saved and restored inside the ETRAP/ERET
; protected code at monitor entry and exit, thus ensuring an exact snapshot
; of them is taken and given at these times. The disadvantage is that the
; duration of the protected code increases by about 15 cycles each.
; 
; If the MON_FULL_LAZY option is chosen then the full CPU registers
; (TOS, PLO, PHI, TREG, AR0-7) are saved and restored outside the ETRAP/ERET
; protected code at monitor entry and exit, this means that the values of
; these registers may have been modified by interrupt driven service routines
; and so are an inexact snapshot of their values at monitor entry and exit.
; The advantage is that the duration of the protected code is not increased.
;
; The default is to be lazy and reduce the duration of the ETRAP/ERET code.
; This default should not need to be changed in normal operation, it is
; provided mostly to give flexibility if debugging the monitor itself.
;---------------------------------------------------------------------------
MON_FULL_EXACT         .set 00000h
MON_FULL_LAZY          .set 00200h
MON_FULL               .set MON_FULL_LAZY ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the monitor to include the system emulator device's
; configuration routine MON_SE_CNFG and the table MON_SE_VALUE
; that it uses in the "mon_main" section (MON_SE_CNFG_USE_YES)
; so that the user can call MON_SE_CNFG in his reset code to
; initialise a system emulator device.
;
; Alternatively all this can be excluded if the monitor is to be used
; in an ordinary produstion device (MON_SE_CNFG_USE_NOT). In this case
; MON_SE_CNFG is reduced to a RET instruction and the table MON_SE_CNFG
; is eliminated entirely.
;
; The default is to not include the configuration routine and table.
;---------------------------------------------------------------------------
MON_SE_CNFG_USE_NOT    .set 00000h
MON_SE_CNFG_USE_YES    .set 00400h ; This option adds 31 words of code.
MON_SE_CNFG_USE        .set MON_SE_CNFG_USE_NOT ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the monitor to wait for permission from the application's
; interrupt driven code, before performing certain HLL Debugger commands:
;
;     STOPMODE       "STOP", exit realtime and enter stopmode,
;     STEP-n, RUN-n  "SNGL", single-step or single-run,
;     RUN, UPDATE    "EVER", run-forever or window update while running.
;
; If the monitor is to be configured to never wait, then set MON_WAIT_USE
; to MON_WAIT_USE_NOT, in which case the four wait options will be ignored
; and the MON_WAIT_B2 memory location will not be used.
;
; The default is to not wait before any of the stop,
; single-step/single-run or run-forever commands.
;---------------------------------------------------------------------------
MON_WAIT_USE_NOT       .set 00000h
MON_WAIT_USE_YES       .set 00800h ; This option adds 9 words of code.
MON_WAIT_USE           .set MON_WAIT_USE_NOT ; <- Edit only this line.
;
MON_WAIT_STOP_NOT      .set 00000h
MON_WAIT_STOP_YES      .set 01000h
MON_WAIT_STOP          .set MON_WAIT_STOP_NOT ; <- Edit only this line.
;
MON_WAIT_SNGL_NOT      .set 00000h
MON_WAIT_SNGL_YES      .set 02000h
MON_WAIT_SNGL          .set MON_WAIT_SNGL_NOT ; <- Edit only this line.
;
MON_WAIT_EVER_NOT      .set 00000h
MON_WAIT_EVER_YES      .set 04000h
MON_WAIT_EVER          .set MON_WAIT_EVER_NOT ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the monitor to support C2XX devices
; with extended addressing in program memory.
;
; The MON_XTND_PROG options are used to decide if the monitor
; will support an extended data memory address space.
;
; If the MON_XTND_PROG_OFF option is chosen then extended addressing in
; program memory is disabled. This option should be chosen if the monitor
; is being installed with a C2XX device that does not include extra
; hardware to implement extended addressing in program memory. In this case
; the MON_PMAP_PAGE, MON_PMAP_ADDR and MON_PMAP_VALU options are ignored.
;
; If the MON_XTND_PROG_ON option is chosen then extended addressing in
; program memory is enabled. This option should be chosen if the monitor
; is being installed with a C2XX device that does include extra hardware
; to implement extended addressing in program memory. In this case the
; MON_PMAP_PAGE, MON_PMAP_ADDR and MON_PMAP_VALU options are also used.
;
; The MON_PMAP_ADDR and MON_PMAP_PAGE options are used to specify
; the address of the program memory mapping register in the program,
; data or io memory spaces.
;
; The default is to not support extended addressing in program memory.
;---------------------------------------------------------------------------
MON_XTND_PROG_OFF      .set 00000h
MON_XTND_PROG_ON       .set 00008h ; This option adds 26 words of code.
MON_XTND_PROG          .set MON_XTND_PROG_OFF ; <- Edit only this line.
;
MON_PMAP_PAGE_PROG     .set 00000h
MON_PMAP_PAGE_DATA     .set 00001h
MON_PMAP_PAGE_IO       .set 00002h
MON_PMAP_PAGE          .set MON_PMAP_PAGE_IO ; <- Edit only this line.
;
MON_PMAP_ADDR          .set 08000h ; <- Edit only this line.
;
               .page 
;---------------------------------------------------------------------------
; Configure the monitor to support C2XX devices
; with extended addressing in data memory.
;
; The MON_XTND_DATA options are used to decide if the monitor
; will support an extended data memory address space.
;
; If the MON_XTND_DATA_OFF option is chosen then extended addressing in
; data memory is disabled. This option should be chosen if the monitor
; is being installed with a C2XX device that does not include extra
; hardware to implement extended addressing in data memory. In this case

⌨️ 快捷键说明

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