PN5180 IRQ handler wirh RT1050

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PN5180 IRQ handler wirh RT1050

605 Views
yen_chen
Contributor III

Hi,Sir

Could you tell me what PN5180  IRQ handler function should be used ?

In the RT1050 when pin read interrupt ,I used CLIF IRQ handler whether it work or not ?

In the phApp_Init.c

-----------------------------------------

#ifdef PH_PLATFORM_HAS_ICFRONTEND


phDriver_Pin_Config_t pinCfg;
pinCfg.bOutputLogic = PH_DRIVER_SET_LOW;
pinCfg.bPullSelect = PHDRIVER_PIN_IRQ_PULL_CFG;
pinCfg.eInterruptConfig = PIN_IRQ_TRIGGER_TYPE;
phDriver_PinConfig(PHDRIVER_PIN_IRQ, PH_DRIVER_PINFUNC_INTERRUPT, &pinCfg);

 

#ifdef PHDRIVER_IMXRT_1050
NVIC_SetPriority(EINT_IRQn, EINT_PRIORITY);
NVIC_ClearPendingIRQ(EINT_IRQn);
EnableIRQ(EINT_IRQn);
#endif /* PHDRIVER_IMXRT_1050 */

#ifdef PH_PLATFORM_HAS_ICFRONTEND
void CLIF_IRQHandler(void)
{
/* Read the interrupt status of external interrupt attached to the reader IC IRQ pin */
if (phDriver_PinRead(PHDRIVER_PIN_IRQ, PH_DRIVER_PINFUNC_INTERRUPT))
{
/* Call application registered callback. */
if (pHal->pRFISRCallback != NULL)
{
pHal->pRFISRCallback(pHal);
}
}
phDriver_PinClearIntStatus(PHDRIVER_PIN_IRQ);
}
#endif /* PH_PLATFORM_HAS_ICFRONTEND */

 

Whether this setting can work or not?

Please see the attachment.

Thanks!

Labels (1)
0 Kudos
1 Reply

588 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @yen_chen 

   Thank you for your interest in the NXP MIMXRT product, I would like to provide service for you.

  I am the RT engineer, not the NFC engineer, so mainly reply your RT issues about the interrupt.

   To RT1050 GPIO interrupt, you can refer to our SDK code:

SDK_2.9.1_EVKB-IMXRT1050\boards\evkbimxrt1050\driver_examples\gpio\input_interrupt

 After you enable the GPIO interrupt, and when the interrupt happens, you can call the interrupt ISR like this:

void EXAMPLE_GPIO_IRQHandler(void)
{
/* clear the interrupt status */
GPIO_PortClearInterruptFlags(EXAMPLE_SW_GPIO, 1U << EXAMPLE_SW_GPIO_PIN);
/* Change state of switch. */
g_InputSignal = true;
SDK_ISR_EXIT_BARRIER;
}

So, to test the RT GPIO interrupt, you can manually input the interrupt single to test, then add your NFC chip.

Wish it helps you!

If you have the detail questions about the NFC, please create the question post here:

https://community.nxp.com/t5/NFC/bd-p/nfc

If you still have questions about RT, please kindly let me know.

Best Regards,

Kerry

0 Kudos