'XMC4800 Pin Interrupt
I can't get an Interrupt to work with the XMC4800 Controller.
The rising edge of Pin 0.9 is supposed to trigger the interrupt, please tell me where i am mistaking:
//Setting p0.9 as Input
XMC_GPIO_SetMode(XMC_GPIO_PORT0, 9,XMC_GPIO_MODE_INPUT_PULL_DOWN);
//ERU Config
XMC_ERU_ETL_CONFIG_t eruInit;
eruInit.input_b = ERU0_ETL1_INPUTB_P0_9;
eruInit.edge_detection = XMC_ERU_ETL_EDGE_DETECTION_RISING;
eruInit.enable_output_trigger = true;
eruInit.output_trigger_channel = XMC_ERU_ETL_OUTPUT_TRIGGER_CHANNEL0;
//OGU Config
XMC_ERU_OGU_CONFIG_t oguInit;
oguInit.service_request = XMC_ERU_OGU_SERVICE_REQUEST_ON_TRIGGER;
//ERU and OGU Init:
XMC_ERU_ETL_Init(ERU0_ETL1, &eruInit);
XMC_ERU_OGU_Init(ERU0_OGU0, &oguInit);
//enable Interrupt
NVIC_SetPriority(ERU0_0_IRQn,3);
NVIC_EnableIRQ(ERU0_0_IRQn);
and then my IRQ Handler:
void ERU0_0_IRQHandler(void)
{
//set breakpoint and be happy when the code arrives here
}
Do I use the right ERU, ETL, OGU? Is everything configured properly? I read something that I have to call a Method "ClearEventStatus" in xmc4800, but I don't know what could be a valid argument.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
