From bba432c57946680c4cc75d4e69f8be99a10572da Mon Sep 17 00:00:00 2001 From: Niel Nielsen Date: Fri, 1 May 2026 20:14:24 +0200 Subject: [PATCH] Add files via upload --- firmware/application/src/rfid/nfctag/lf/lf_tag_em.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/firmware/application/src/rfid/nfctag/lf/lf_tag_em.c b/firmware/application/src/rfid/nfctag/lf/lf_tag_em.c index b6bbe2b..3f5ab03 100644 --- a/firmware/application/src/rfid/nfctag/lf/lf_tag_em.c +++ b/firmware/application/src/rfid/nfctag/lf/lf_tag_em.c @@ -110,8 +110,8 @@ static void lpcomp_init(void) { static void pwm_handler(nrfx_pwm_evt_type_t event_type) { if (event_type == NRFX_PWM_EVT_END_SEQ0) { // Fired at end of each loop iteration — check field without stopping PWM. - // Disable LPCOMP interrupts briefly while we sample to avoid re-entrancy. - NRF_LPCOMP->INTENCLR = LPCOMP_INTENCLR_UP_Msk | LPCOMP_INTENCLR_DOWN_Msk | LPCOMP_INTENCLR_CROSS_Msk; + // Mask UP interrupt while sampling to prevent re-entrancy. + NRF_LPCOMP->INTENCLR = LPCOMP_INTENCLR_UP_Msk; if (!is_lf_field_exists()) { // Field gone — stop the loop; pwm_handler will get EVT_STOPPED next. nrfx_pwm_stop(&m_broadcast, false);