dsp281x_usdelay.asm

来自「TMS320F2812的bootloader源程序」· 汇编 代码 · 共 28 行

ASM
28
字号
;//###########################################################################
;//
;// FILE:  DSP2812usDelay.asm
;//
;// TITLE: Simple delay function
;//
;// DESCRIPTION:
;
;//########################################################################### 
;/////////////////////////////////////
		.ref _DSP28x_usDelay_runstart
       .def _DSP28x_usDelay
       .sect "ramfuncs"           
       .global  __DSP28x_usDelay
       .global _DSP28x_usDelay_loadstart
_DSP28x_usDelay:
        SUB    ACC,#1
        BF     _DSP28x_usDelay,GEQ    ;; Loop if ACC >= 0
        LRETR 
        .global _DSP28x_usDelay_loadEnd
;There is a 9/10 cycle overhead and each loop
;takes five cycles. The LoopCount is given by
;the following formula:
;  DELAY_CPU_CYCLES = 9 + 5*LoopCount
; LoopCount = (DELAY_CPU_CYCLES - 9) / 5
; The macro DELAY_US(A) performs this calculation for you
;==================================================

⌨️ 快捷键说明

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