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.

C6678L SWENR 指令的执行不一致。

1, MVKL  0X00890000,A1

    MVKH 0X008900000,A1

     MVC A1,REP

     NOP

     NOP

      SWENR

      Latch 一下,连接上班子,跑上面的代码中,执行SWENR,跳转到REP存入值的位置。但是在CCSV5.0中,reset 一下,重新载入程序,然后执行SWENR,就会跳转到nmi服务取指包。

    两次执行SWENR指令,但不一样的执行路径,请问Latch,和CCSV5.0的reset有什么不一致的地方,导致结果不一致。补充一点:如果执行一遍SWENR后,再次执行SWENR,都可以正常跳转到REP存入值的位置.

  • 参照一下手册中的解释:

    If another exception (internal or external) is recognized simultaneously with the
    SWENR-raised exception, then the other exception(s) take priority and normal
    exception behavior occurs; that is, NTSR and NRP are used, execution is directed to the
    NMI vector.

    上面的意思是说当有另一个异常发生时,SWENR会跳转找NMI中断向量中去。你可以研究下reset时你的状态如何,是不是异常状态?

  •          非常感谢您,我再仔细研究一下。发生RESET异常时,有什么标志吗?我发现跳转到NMI服务取指包时,只有EFR.SXF(软件异常标志被置1),并没有其他异常发生。如果发生RESET异常,EFR有否对应的标志位被置上呢?非常期待你的回答。

x 出现错误。请重试或与管理员联系。