Hi Robin,
I am using S32K148 and SDK4.0.2.
I was following the guidelines Chap. 12.1.4.1 and changed some initial pin configurations and the pin initializing processes from s32ds auto-code-gen.
pin_settings_config_t g_pin_mux_InitConfigArr[NUM_OF_CONFIGURED_PINS]={
{
.base = PORTC,
.pinPortIdx = 8U,
.pullConfig = PORT_INTERNAL_PULL_NOT_ENABLED,
.driveSelect = PORT_HIGH_DRIVE_STRENGTH,//PORT_LOW_DRIVE_STRENGTH,
.passiveFilter = false,
.mux = PORT_MUX_AS_GPIO,
.pinLock = false,
.intConfig = PORT_DMA_INT_DISABLED,//not using PORT_INT_FALLING_EDGE initialized when .digitalFilter = true
.clearIntFlag = false,
.gpioBase = PTC,
.direction = GPIO_INPUT_DIRECTION,
.digitalFilter = true,
.initValue = 1U,
},
}
status_t Config_GPIO_Module(void)
{
status_t st;
st = PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);
Set_Pin_Interrupt_Filter();
PINS_SetPinIntSel(PORTC, 8U, PORT_INT_FALLING_EDGE);
return st;
}
status_t Config_IRQ_System(void){
INT_SYS_EnableIRQ(PORTC_IRQn);//PTC8 for FLT OV
INT_SYS_SetPriority(PORTC_IRQn, 7);
}
After Config_GPIO_Module() initialized, and then do Config_IRQ_System() initialized. After the processes and then the PTC8 is normally worked and raising the interrupt flag when the falling-edge siganl existed. And now it's worked as what I need.
Thanks for help.
Regards,
Leon