This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Part Number: MSP432P4111
Tool/software: Code Composer Studio
Hi, there.
I have a GPIO Interrupt on P2.4 with RTOS, the code is:
{ .... .... GPIO_setConfig(P_GPIO_P2_4, GPIO_CFG_IN_PU | GPIO_CFG_IN_INT_FALLING); /* install Button callback */ GPIO_setCallback(P_GPIO_P2_4, gpioFpgaFxn0); /* Enable interrupts */ GPIO_enableInt(P_GPIO_P2_4); /* Start BIOS */ BIOS_start(); return (0); } /** * Callback function for the FPGA interrupt to be read. */ void gpioFpgaFxn0(uint_least8_t index) { Semaphore_post(Semaphore_handle(&FPGA_spiTaskAlert)); }
And I see the REG:
it has the P2IFG = 0x10, P2IV = P2IFG4.
But the code can not goto the Callback function......
What should I do next ?
Thanks a lot.
Hi Andoon,
Have you looked at the gpiointerrupt example in the SDK? If not I would start there: http://dev.ti.com/tirex/explore/node?node=AMCIoqQ1EBk6pk.C5GpxzA__z-lQYNj__LATEST
It is typically recommended not to use any TI Drivers API calls before the RTOS is started, so I would recommend moving your GPIO API calls to a task instead.
Thanks,
Alexis
Hi,
Alexis.
Thanks for your advice.
I find out the problem.
When you define the pin as input interrupt function, you must notice three piont.
1. Enum of GPIO names in MSP_EXP432P4111.h You'd better put the interrupt pin first.
2. Array of Pin configurations in MSP_EXP432P4111.c As We all know.
3. This is important piont.
The order of the pin configurations must coincide with what was defined in MSP_EXP432P4111.h
That's all.
Thanks a lot.
**Attention** This is a public forum