From e474e519df229402c4bbc589a4ddfe453af414bf Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sun, 20 Aug 2023 11:43:23 +0200 Subject: [PATCH] Revert workaround for WDT during emulation and fix SDK NFC IRQ handler --- .../nrf52_sdk/modules/nrfx/drivers/src/nrfx_nfct.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/firmware/nrf52_sdk/modules/nrfx/drivers/src/nrfx_nfct.c b/firmware/nrf52_sdk/modules/nrfx/drivers/src/nrfx_nfct.c index f1741dd..dfdd416 100644 --- a/firmware/nrf52_sdk/modules/nrfx/drivers/src/nrfx_nfct.c +++ b/firmware/nrf52_sdk/modules/nrfx/drivers/src/nrfx_nfct.c @@ -41,8 +41,6 @@ #include #if NRFX_CHECK(NRFX_NFCT_ENABLED) -// ChameleonUltra: workaround because NFC IRQ gets repetitively called when in HF field once a comm has started -#include "bsp_wdt.h" #include @@ -786,6 +784,12 @@ void nrfx_nfct_irq_handler(void) nrfx_nfct_field_event_handler(current_field); } + // ChameleonUltra: fix busy IRQ when HF field is on and a first frame got received + if (NRFX_NFCT_EVT_ACTIVE(RXFRAMESTART)) + { + // nothing to do but clear the event else IRQ handler will be called continuously + nrf_nfct_event_clear(NRF_NFCT_EVENT_RXFRAMESTART); + } if (NRFX_NFCT_EVT_ACTIVE(RXFRAMEEND)) { nrf_nfct_event_clear(NRF_NFCT_EVENT_RXFRAMEEND); @@ -909,8 +913,6 @@ void nrfx_nfct_irq_handler(void) m_nfct_cb.config.cb(&nfct_evt); } } - // ChameleonUltra: workaround because NFC IRQ gets repetitively called when in HF field once a comm has started - bsp_wdt_feed(); } #endif // NRFX_CHECK(NRFX_NFCT_ENABLED)