Hi,
I am experimenting with an IMX8QM MEK board in order to finally make our own board.
For that own board we would ultimately like to use GPIO0 pin 5 as an interrupt pin to trigger various actions. Using the scfw porting guide I have created the following two snippets of code:
This section of code should initialize the pin and set it up to generate the interrupts:
GPIO_config.direction = kGPIO_DigitalInput;
GPIO_config.outputLogic=0; /*!< Set a default output logic, which has no use in input */
GPIO_config.interruptMode=kGPIO_IntLowLevel;
GPIO_PinInit((GPIO_Type *)GPIO0_BASE, 5U, &GPIO_config);
GPIO_EnableInterrupts((GPIO_Type *)GPIO0_BASE, PIN5_MASK);
This is the initial IRQHandler I would like to test
void GPIO0_PIN5_IRQHandler (void)
{
GPIO_ClearPinsInterruptFlags((GPIO_Type *)GPIO0_BASE, PIN5_MASK);
}
Both snippets of code reside in the experimental board.c file and build without problems so I assume they are OK.
What I am unable to find is how to link the target IRQHandler to the actual interrupt. There are a few other IRQHandlers in the board.c code but neither the source code nor the scfw_port.pdf file provide any info as to how those IRQHandlers were linked to their respective interrupt sources.
Does anyone have some more info on this or a link to where I could find the necessary information?
Any help on this would be very much appreciated.