AnsweredAssumed Answered

PN7462 GPIO Interrupts

Question asked by Mike Montalvo on Dec 13, 2017
Latest reply on Dec 28, 2017 by Kan_Li

I'm having a heck of a time getting the interrupt on change to work.  I got it to the point that the interrupt is triggering, but for whatever reason, it's not calling the callback.. Instead I find it in a while(1) loop because it says there was no handler defined for the interrupt.  But I can't seem to figure out how to tell what interrupt actually got called.

 

// enable interrupt
uint32_t dwPcrIRQMessage = (PCR_INT_STATUS_REG_GPIO7_PAD_HIGH_INT_STATUS_MASK | PCR_INT_STATUS_REG_GPIO_INT_STATUS_MASK ); // no idea if this is right
status = phhalPcr_RegCallBack(&phExDoorAccess_PcrCallBack,dwPcrIRQMessage);

 

 

Then for the callback:

 

static void phExDoorAccess_PcrCallBack(uint32_t dwIRQMessage)
{

// never gets here
return ;

}

 

My program ends up here when GPIO7 goes high:

 

void UnExpected_IRQHandler(void)
{
/* Since application enabled this IRQ without providing any handler
* for the same, halt here */
while ( 1 ) {
__WFI();
}
}

 

Any help would be awesome! Thanks.

Outcomes