.def _DSP28x_usDelay
.sect "ramfuncs"
.global __DSP28x_usDelay
_DSP28x_usDelay:
SUB ACC,#1
BF _DSP28x_usDelay,GEQ ;; Loop if ACC >= 0
LRETR
;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
在这个延迟程序中ACC的值是从C程序中传递的unsigned long cnt值。请问一下DELAY_CPU_CYCLES = 9 + 5*LoopCount这个公式是什么作用?CPU的周期=9+5*循环次数? unsigned long cnt这个值不是循环的次数? 不是很明白。麻烦解释一下谢谢!
;