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.

MSP432P401R: GPIO interrupt trigger causes the system to go into faultISR with GPIO_setCallback() approach

Part Number: MSP432P401R

Hello Team,

We tried registering the interrupt handler using the APIs shown TI example demo GPIO_setConfig(), GPIO_setCallback(),GPIO_enableInt().

https://dev.ti.com/tirex/explore/node?node=AAQUVuupToDgkTa2rzWGbg__z-lQYNj__LATEST

Now , when the interrupt is triggered, the system immediately goes into hang state. The call Stack shows that is is stuck in faultISR() indefinite loop.

However, When we tried importing the example shared in above link, the interrupt gets triggered as expected. 

I am not sure if there are some specific configurations required to be done  in freeRtos project in addition to the APIs mentioned above? Or if there are any build flags that needs to be aligned for handling the interrupt. 

As 1st approach did not worked as expected, we tried another approach to register the interrupt handler by updating the interrupt vector table (interruptVectors[]) defined in file 'startup_msp432_ccs.c' of freeRtos startup code.

Here we added the entry of interrupt handler for the corresponding port , defined the interrupt handler in the project source. We update the source to use MAP_GPIO_setAsInputPinWithPullUpResistor(), MAP_GPIO_enableInterrupt(), MAP_GPIO_interruptEdgeSelect(),  MAP_Interrupt_enableMaster(),etc.  APIs. 

With this the system did not hang , neither the interrupt handler is called on triggering the interrupt.

Can you please help us in resolving the issue and getting the interrupt handler registered .

I have mentioned two approaches that I tried to register the interrupt handler and configuring the GPIO pins. The first approach causes the system to go in faultSR() as soon as interrupt is triggered, and with second approach we did not see any change in flow on triggering the interrupt and no handler is called.

Please let us know if further information is required to get more clarity on the issues. 

Regards,

Vibhor

  • Hello,

    We recommend importing examples from TI Resource Explorer to avoid these types of issues. If the imported example works, then I think it indicates that a file is missing or some important code is missing. Rather than starting from a blank project and spending a lot of time figuring out those differences, I would start with the imported example. I'm not sure about the first approach, but for the second approach, it could be because you're not clearing the interrupt flag after enabling it - again this goes back to carefully analyzing the example code and project to ensure everything that's needed is there.

    MSP432 Launchpad: Example "Comparator ISR" jump into FaultISR

    Regards,

    James