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.

Semaphore2中EOI问题



在semaphore2手册中有如下图

而在cslr_sem.h文件中有如下定义

/*----SELECT_INTERRUPT_REARM Tokens----*/

#define CSL_SEM_SEM_EOI_SELECT_INTERRUPT_REARM_SEM0 (0x00000000u)

#define CSL_SEM_SEM_EOI_SELECT_INTERRUPT_REARM_SEM1 (0x00000001u)

#define CSL_SEM_SEM_EOI_SELECT_INTERRUPT_REARM_SEM2 (0x00000002u)

#define CSL_SEM_SEM_EOI_SELECT_INTERRUPT_REARM_SEM_ALL (0x00000010u)

关于寄存器低8位的值为0x10h时,具体表示的含义有些费解,到底是Re-arm SEMERR还是ALL的意思的?

  • 您好,

       请参考semaphore2 user guide的9.1.1 :

    ”3. Write the core ID number (0 to N-1) to the ‘‘End-of-Interrupt Register (SEM_EOI)’’ on page 10-5.“

       以及9.2.1 :

    " 3. Write 0x10  to the  SEM_EOI register ( ‘‘End-of-Interrupt Register (SEM_EOI)’’ on page 10-5) to rearm the semaphore error interrupts to all cores.“

    可以看到,前面的SEMINTn中的n指的core ID, 而最后的0x10是为了 rearm the semaphore error( SEMEER)  interrupts to ”all“ cores。

    所以.h文件里写的是ALL就是指的all core的意思。