Browse Source

Merge pull request #2794 from zhaohengbo/master

[libcpu][c28x] Fix bugs of old c28x interrupt api
Bernard Xiong 6 years ago
parent
commit
7dd1cd42db
1 changed files with 5 additions and 2 deletions
  1. 5 2
      libcpu/ti-dsp/c28x/context.s

+ 5 - 2
libcpu/ti-dsp/c28x/context.s

@@ -73,7 +73,9 @@ RT_CTX_RESTORE  .macro
 ;
     .asmfunc
 _rt_hw_interrupt_disable:
-    DINT
+    PUSH  ST1
+    SETC  INTM,DBGM
+    MOV   AL, *--SP
     LRETR
     .endasmfunc
 
@@ -82,7 +84,8 @@ _rt_hw_interrupt_disable:
 ;
     .asmfunc
 _rt_hw_interrupt_enable:
-    EINT
+    MOV   *SP++, AL
+    POP   ST1
     LRETR
     .endasmfunc