AnsweredAssumed Answered

Port IRQ on S32V234

Question asked by rolanddorn on May 15, 2018
Latest reply on May 16, 2018 by Kushal Shah



I wan't to generate a PORT IRQ. I configured the desired PIN and IRQ settings in SIUL2. After triggering the PIN from outside, the corresponding flag in SIUL2.DISR0 is set but the ISR function is not called.


Input PIN:                              PA5

MSCR of Input PIN:                5

Used alternative of input PIN:  2 -> EIRQ[5]

The sample code is running on the cortex M4.


At position 86 of the vector table the PORT ISR function is placed.

The IRQ is routed to cortex M4 : MSCM.IRSPRC[86-16].R = 0x1;


Does anyone have an idea or some tips what can be wrong?


Configuration of PORT IRQ:

        /* Mask interrupts by clearing the EIREn bits in DIRER0 */
        ClrBit(SIUL2, DIRER0, DIRER0_EIRE5);

        /* Rising-edge event is enabled */
        SetBit(SIUL2, IREER0, IREER0_IREE5);

        /* Falling-edge event is enabled */
        //SetBit(SIUL2, IFEER0, IFEER0_IFEE5);

        /* Disable Output Buffer */
        ClrBit(SIUL2, MSCR[5], MSCRx_OBE);

        ClrBit(SIUL2, MSCR[5], MSCRx_ODE);

        /* Enable Input Buffer */
        SetBit(SIUL2, MSCR[5], MSCRx_IBE);

        /* Set alternative */
        SetBitField(SIUL2, MSCR[5], MSCRx_MUX_MODE, 2);

        /* Daisy bit of SIUL2_IMCR#. */
        SetBitField(SIUL2, IMCR[83], IMCRx_DAISY, 2);

        /* Interrupt request is selected */
        ClrBit(SIUL2, DIRSR0, DIRSR0_DIRSR5);

        /* Filter Counter setting */
        SetBitField(SIUL2, IFMCR[5], IFMCRx_MAXCNT, 2);

        /* Filter Clock Prescaler */
        SetBitField(SIUL2, IFCPR, IFCPR_IFCP, 6);

        /* Enable digital glitch filter on the interrupt pad input. */
        SetBit(SIUL2, IFER0, IFER0_IFE5);

        SetBit(SIUL2, DISR0, DISR0_EIF5);

        /* External Interrupt Status Flag. Write 1 to delete it. */
        SetBit(SIUL2, DIRER0, DIRER0_EIRE5);