This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F28027: 突然__DSP28x_usDelay不正常工作了

Part Number: TMS320F28027

使用28027,程序中用到DELAY_US(100);

以前经常用的,很正常,今天却耍赖了

经过跟踪,情况如下:

3f6f53: FF69 SPM #0
3f6f54: FF2004AE MOV ACC, #1198 ; ---------------寄存器 AL 0x04AE (Hex) Accumulator Low
3f6f56: 76408080 LCR $../comm/f2802x_asmfuncs.asm:92:110$  ;  跳转位置

跳转后的汇编代码:

        $../comm/f2802x_asmfuncs.asm:92:110$(), DSP28x_usDelay:

008080: 03FE SUBL ACC, *+XAR6[7]   ;应该是1198减一的,但此时的; XAR6=0x0C, 执行后,AH=0xD3C4 (Hex),AL=0x2665 (Hex)

93 BF _DSP28x_usDelay,GEQ ;; Loop if ACC >= 0
008081: F1ED XORB AH, #0xe
008082: AB22 MOVL @0x22, XT
94 LRETR
008083: B48F92A6 IN *--XAR7, *(0x92a6)
008085: A2FC MOVL *+XAR4[7], XAR3
008086: F6E1 RPT #225
008087: DCB5 || SUBB XAR4, #53

想不通,这是为什么?