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.

[参考译文] AM2632:如何实现临时无响应中断、中断保存和中断恢复

Guru**** 1807890 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1391818/am2632-how-to-achieve-temporary-unresponsive-interrupt-interrupt-save-and-interrupt-restore

器件型号:AM2632

工具与软件:

正如标题所示、如何 在 AM263X 中实现:

1. 保存中断  

2. CPU 暂时不响应中断

3.恢复 中断

 

在 DSP 中、 我可以使用以下方法:完成上述操作

#define  INT_STORE unsigned int uiSave_IER = IER; UINT32 ulDintTimeTmp;
#define  INT_DISABLE {IER = 0;ulDintTimeTmp=ReadCpuTimer0Counter();}
#define  INT_RESTORE {ulDintTimeTmp=ulDintTimeTmp-ReadCpuTimer0Counter(); \
                      if (ulDintTimeTmp GT hos_ulDintTimeMax)             \
                      {                                                   \
                          hos_ulDintTimeMax = ulDintTimeTmp;              \
                          asm(" .global  _hos_ulDintTimeAdr ");           \
                          asm(" MOVL ACC, XAR5 ");                        \
                          asm(" MOV  XAR5, PC ");                         \
                          asm(" MOVW DP, #_hos_ulDintTimeAdr ");          \
                          asm(" MOVL @_hos_ulDintTimeAdr, XAR5 ");        \
                          asm(" MOVL XAR5, ACC ");                        \
                      } IER = uiSave_IER; }

在 ARM 中、我如何配置它? 您能否提供示例代码?

另外、 我应该使用什么代码来替换 DSP 中的以下操作?

#define  EINT   __asm(" clrc INTM")
#define  DINT   __asm(" setc INTM")
#define  ERTM   __asm(" clrc DBGM")
#define  DRTM   __asm(" setc DBGM")
#define  EALLOW __asm(" EALLOW")
#define  EDIS   __asm(" EDIS")
#define  ESTOP0 __asm(" ESTOP0")

谢谢