I'm trying to add multiple interrupts on the same port (portD) on my stm8s003f3. I'm not able to attach the second interrupt to the ext interrupt handler function. Some info might help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-23 6:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-24 10:45 AM
Right, " Some info might help".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-09-24 11:22 AM
Here it is in stm8_it.c
INTERRUPT_HANDLER(EXTI_PORTB_IRQHandler, 4)
{
/* In order to detect unexpected events during development,
it is recommended to set a breakpoint on the following instruction.
*/
if((GPIOD->IDR & GPIO_PIN_3)!=0){
state = TRUE;
} else
{
state = FALSE;
}
}
This is how it's setup now for Pin 3 of PortD for interrupt. I want to add another interrupt to the same Port D at Pin 4.
I did a bitwise OR for these two pins if((GPIOD->IDR & GPIO_PIN_3) !=0 || (GPIOD->IDR & GPIO_PIN_4) !=0) ) but there's no result.
