S32DS SDK S32PA RTM 2.0.0 & RTM 3.0.0 SIUL2 interrupt issue

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32DS SDK S32PA RTM 2.0.0 & RTM 3.0.0 SIUL2 interrupt issue

Jump to solution
1,644 Views
Pat
Contributor III

Hi jiri.kral@nxp.com‌,

During the  PINS_DRV_Init()-PINS_Init(), when the external interrupt EIRQ0 is enabled first, it will be cleared when a next pin configuration is defined as input and interrupt disable. Issue also present in RTM 3.0.0.

MCU used is MPC5744P.

  1. In both case line 152 pinIntValue = 1u.       pinIntValue = (1UL << config->intConfig.eirqPinIdx);
  2. g_pin_mux_InitConfigArr[0] line 188 set DIRER0.EIRE0 bit.   config->base->DIRER0 |= pinIntValue;
  3. g_pin_mux_InitConfigArr[1] line 202 clear DIRER0.EIRE0 bit.   config->base->DIRER0 &= ~pinIntValue;

pin_settings_config_t g_pin_mux_InitConfigArr[2] =
{
    {
        .base              = SIUL2,
        .pinPortIdx        = 0u,
        .mux               = PORT_MUX_AS_GPIO,
        .outputBuffer      = PORT_OUTPUT_BUFFER_DISABLED,
        .openDrain         = PORT_OPEN_DRAIN_DISABLED,
        .slewRateCtrlSel   = HALF_STRENGTH_WITH_SLEWRATE_CONTROL,
        .hysteresisSelect  = PORT_HYSTERESYS_DISABLED,
        .safeMode          = PORT_SAFE_MODE_DISABLED,
        .analogPadCtrlSel  = PORT_ANALOG_PAD_CONTROL_DISABLED,
        .inputBuffer       = PORT_INPUT_BUFFER_ENABLED,
        .pullConfig        = PORT_INTERNAL_PULL_NOT_ENABLED,
        .invertOutput      = PORT_INVERT_OUTPUT_DISABLED,
        .gpioBase          = PTA,
        .intConfig         =
        {
            .eirqPinIdx    = 0u,
            .intExeSel     = SIUL2_INT_USING_INTERUPT,
            .intEdgeSel    = SIUL2_INT_RISING_EDGE
        },
        .inputMux[0]       = PORT_INPUT_MUX_ALT1,
        .inputInvert[0]    = PORT_INVERT_INPUT_DISABLED,
        .inputMuxReg[0]    = 173,
        .inputMux[1]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[2]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[3]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[4]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[5]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[6]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[7]       = PORT_INPUT_MUX_NO_INIT,
    },
    {
        .base              = SIUL2,
        .pinPortIdx        = 2u,
        .mux               = PORT_MUX_AS_GPIO,
        .outputBuffer      = PORT_OUTPUT_BUFFER_DISABLED,
        .openDrain         = PORT_OPEN_DRAIN_DISABLED,
        .slewRateCtrlSel   = HALF_STRENGTH_WITH_SLEWRATE_CONTROL,
        .hysteresisSelect  = PORT_HYSTERESYS_DISABLED,
        .safeMode          = PORT_SAFE_MODE_DISABLED,
        .analogPadCtrlSel  = PORT_ANALOG_PAD_CONTROL_DISABLED,
        .inputBuffer       = PORT_INPUT_BUFFER_ENABLED,
        .pullConfig        = PORT_INTERNAL_PULL_NOT_ENABLED,
        .invertOutput      = PORT_INVERT_OUTPUT_DISABLED,
        .gpioBase          = PTA,
        .intConfig         =
        {
            .intEdgeSel    = SIUL2_INT_DISABLE
        },
        .inputMux[0]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[1]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[2]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[3]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[4]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[5]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[6]       = PORT_INPUT_MUX_NO_INIT,
        .inputMux[7]       = PORT_INPUT_MUX_NO_INIT,
    }
}

Capture01.PNG

Best regards,

Pat

1 Solution
1,374 Views
cosmindinu
NXP Employee
NXP Employee

Hello Pat,

The issue has been confirmed in PINS driver. As a workaround please configure EIRQ at the last index of the PINS config array, in the generated code.

A fix will be provided in the next release - S32SDK for PA RTM-SR 3.0.1

Thanks and regards,

Cosmin

View solution in original post

1 Reply
1,375 Views
cosmindinu
NXP Employee
NXP Employee

Hello Pat,

The issue has been confirmed in PINS driver. As a workaround please configure EIRQ at the last index of the PINS config array, in the generated code.

A fix will be provided in the next release - S32SDK for PA RTM-SR 3.0.1

Thanks and regards,

Cosmin