- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there any bug in HAL 2.x?
I am using CY8CKIT-062S2-43012 and add a falling edge interrupt on P6_5.
When i low that pin, it can run into _cyhal_gpio_irq_handler, but Cy_GPIO_GetInterruptStatusMasked got 0 and jump to Cy_SysLib_ProcessingFault.
following is my code:
// do something
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Frank-Lin ,
Can you try the below code example and see if you are facing the same issue.
https://github.com/Infineon/mtb-example-psoc6-gpio-interrupt/blob/master/main.c
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alakananda,
Sorry, because i have to run a demo tomorrow i will test it maybe next week.
Just for more detail, Cy_GPIO_GetInterruptStatusMasked is running ((32 >> 7) & 1) and get 0.
I'm not sure why is 7 not 5.
For now i use HAL 1.6 and everything run perfect with following code:
#define _Set_Pin (P6_5)
const char Int_Const_Set = 'S';
cyhal_gpio_init(_Set_Pin, CYHAL_GPIO_DIR_INPUT, CYHAL_GPIO_DRIVE_PULLUPDOWN, 1); // input pull high
cyhal_gpio_register_callback(_Set_Pin, Int_IntCallBack, (void*)&Int_Const_Set);
cyhal_gpio_enable_event(_Set_Pin, CYHAL_GPIO_IRQ_FALL, 1, true);
// do something
}