AWR1642怎么关闭所以外部中断?

Other Parts Discussed in Thread: AWR1642

如ti其他单片机一样,AWR1642怎样在写flash或者其他不能被打断的操作中,关闭所有中断和任务切换,等执行完毕再打开。

  • 这可以通过在critical section内执行specific code来完成,其中执行不会受到任何中断的干扰。

    请在SDK源代码中查找此代码段

    /* critical section protection */

    key = HwiP_disable();

    /* here is the code to execute within critical section */

    /* Release the critical section */

    HwiP_restore(key);