Post Go back to editing

about software interrupt

I am using ADSP-21565. I see the interrupt definitions in ADSP_2156x_LPC.h.

#define INTR_SYS_SOFT0_INT 29 /* Software Interrupt 0 */
#define INTR_SYS_SOFT1_INT 30 /* Software Interrupt 1 */
#define INTR_SYS_SOFT2_INT 31 /* Software Interrupt 2 */
#define INTR_SYS_SOFT3_INT 32 /* Software Interrupt 3 */
#define INTR_SYS_SOFT4_INT 33 /* Software Interrupt 4 */
#define INTR_SYS_SOFT5_INT 34 /* Software Interrupt 5 */
#define INTR_SYS_SOFT6_INT 35 /* Software Interrupt 6 */
#define INTR_SYS_SOFT7_INT 36 /* Software Interrupt 7 */

Q1: Taking INTR_SYS_SOFT0_INT as an example. If i didnot set any interrupt priority. Does that mean the INTR_SYS_SOFT0_INT 's priority is 29?

Q2: If i use this function in the code "adi_sec_SetPriority  ( INTR_SYS_SOFT0_INT, 10))". Does that mean the INTR_SYS_SOFT0_INT 's priority is changed to be 10?

Q3: Can i raise another software interrupt (for example INTR_SYS_SOFT1_INT ) in one software interrupt (for example INTR_SYS_SOFT0_INT ) service function?  

Thanks

  • Hi,

    Q1: Taking INTR_SYS_SOFT0_INT as an example. If i didnot set any interrupt priority. Does that mean the INTR_SYS_SOFT0_INT 's priority is 29?
    >> By default all interrupts priority is 0. If you doesn't set any priority, the SCI chooses the one with the lowest SID.
    For example if SOFT0(SID 29), SOFT1(SID 30), SOFT2 (SID 31) are all pending and have the same priority setting, the SCI chooses SOFT0(29) as the highest priority source.

    Q2: If i use this function in the code "adi_sec_SetPriority  ( INTR_SYS_SOFT0_INT, 10))". Does that mean the INTR_SYS_SOFT0_INT 's priority is changed to be 10?
    >> Yes.

    Q3: Can i raise another software interrupt (for example INTR_SYS_SOFT1_INT ) in one software interrupt (for example INTR_SYS_SOFT0_INT ) service function?  
    >> Yes, you can raise INTR_SOFT1 from INTR_SOFT0's ISR function.

    Regards,
    Anand Selvaraj.

  • Hi Anand Selvaraj,

    Thanks for the reply.

    I have another question. For example:

    I use INTR_SYS_SOFT0_INT and INTR_SYS_SOFT1_INT.

    1. for INTR_SYS_SOFT0_INT, I changed it's priority to be 10;

    2. for INTR_SYS_SOFT1_INT, i did not set it's priority. That means it's priority is default 0;

    So when the INTR_SYS_SOFT0_INT and INTR_SYS_SOFT1_INT are both pending, which one will be triggered first?

    Thanks,

    Tingting.

  • Hi,

    Priority of INTR_SYS_SOFT1_INT is highest(lowest numerical number), so INTR_SYS_SOFT1_INT will triggered first.

    Regards,
    Anand Selvaraj.

  • Hi Anand Selvaraj,

    Thanks for the reply. I am clear now.

    Thanks,

    Tingting.