- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hello
My S32K144 compile software version is "S32 Design Studio for ARM Version: 2018.R1".
now l want to set PTE16 as interrupt on rising-dege,the next is my setting:
void main(void)
{
CLOCK_SYS_Init(g_clockManConfigsArr, CLOCK_MANAGER_CONFIG_CNT,
g_clockManCallbacksArr, CLOCK_MANAGER_CALLBACK_CNT);
CLOCK_SYS_UpdateConfiguration(0U, CLOCK_MANAGER_POLICY_AGREEMENT);
PINS_DRV_Init(NUM_OF_CONFIGURED_PINS, g_pin_mux_InitConfigArr);
/* Output direction for LED0 & LED1 */
PINS_DRV_SetPinsDirection(GPIO_PORT, ((1 << LED1) | (1 << LED2)));
/* Set Output value LED0 & LED1 */
PINS_DRV_SetPins(GPIO_PORT, 1 << LED1);
PINS_DRV_ClearPins(GPIO_PORT, 1 << LED2);
PCC->PCCn[PCC_PORTE_INDEX] = PCC_PCCn_CGC_MASK; /* Enable clock to PORT E */
PTE->PDDR &= ~(1 << 16);
PORTE->PCR[16] = 0x00000110;//PTE16 set input GPIO mode
PORTE->PCR[16] |= 0x00009000;//ISF flag and Interrupt on rising-edge
INT_SYS_InstallHandler(PORTE_IRQn,&PORTE_IRQH, (isr_t *)0 );
INT_SYS_EnableIRQ(PORTE_IRQn);
}
void PORTE_IRQH(void)
{
PINS_DRV_TogglePins(GPIO_PORT, ((1 << LED1) | (1 << LED2)));
PINS_DRV_ClearPortIntFlagCmd(PORTE);
}
who can tell me how to setting PTE16 as interrupt on rising-dege which use register,my setting is untrue.
Attached is the project
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It seems like you missed the position of IRQC
It should be: PORTE->PCR[16] |= 0x00090000; //ISF flag and Interrupt on rising-edge
BR, Daniel

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
It seems like you missed the position of IRQC
It should be: PORTE->PCR[16] |= 0x00090000; //ISF flag and Interrupt on rising-edge
BR, Daniel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for you response.
