NFC crashed while reading type 1,2,3,4 tags together
diff --git a/src/nfc/include/nfc_api.h b/src/nfc/include/nfc_api.h
index ebd4285..6039db3 100644
--- a/src/nfc/include/nfc_api.h
+++ b/src/nfc/include/nfc_api.h
@@ -570,7 +570,6 @@
#if (NXP_EXTNS == TRUE)
#define NFC_PROTOCOL_ISO7816 \
NCI_PROTOCOL_ISO7816 /*ISO7816 -AID default Routing */
-#define NFC_PROTOCOL_ISO7816 NCI_PROTOCOL_ISO7816
#define NFC_PROTOCOL_T3BT NCI_PROTOCOL_T3BT
#endif
#define NFC_PROTOCOL_B_PRIME NCI_PROTOCOL_B_PRIME
diff --git a/src/nfc/nfc/nfc_ncif.c b/src/nfc/nfc/nfc_ncif.c
index 8cdb867..3b24912 100644
--- a/src/nfc/nfc/nfc_ncif.c
+++ b/src/nfc/nfc/nfc_ncif.c
@@ -1759,6 +1759,9 @@
tNFC_DISCOVER evt_data;
tNFC_DEACTIVATE_DEVT* p_deact;
tNFC_CONN_CB* p_cb = &nfc_cb.conn_cb[NFC_RF_CONN_ID];
+#if (NXP_EXTNS == TRUE)
+ tRW_T3T_CB *p_t3tcb = &rw_cb.tcb.t3t;
+#endif
void* p_data;
nfc_set_state(NFC_STATE_IDLE);
@@ -1779,6 +1782,12 @@
(*p_cb->p_cback)(NFC_RF_CONN_ID, NFC_DEACTIVATE_CEVT, (tNFC_CONN*)p_deact);
#if (NXP_EXTNS == TRUE)
+ if (p_t3tcb->poll_timer.in_use)
+ {
+ NFC_TRACE_DEBUG1 ("%s: stopping t3t polling timer", __func__);
+ nfc_stop_quick_timer (&p_t3tcb->poll_timer);
+ }
+
if ((nfc_cb.flags & (NFC_FL_DISCOVER_PENDING | NFC_FL_CONTROL_REQUESTED)) &&
(deact_type == NFC_DEACTIVATE_TYPE_DISCOVERY) && (is_ntf == true)) {
NFC_TRACE_DEBUG0(
diff --git a/src/nfc/tags/rw_t3t.c b/src/nfc/tags/rw_t3t.c
index b3fc09e..2f18030 100644
--- a/src/nfc/tags/rw_t3t.c
+++ b/src/nfc/tags/rw_t3t.c
@@ -338,10 +338,29 @@
**
*******************************************************************************/
void rw_t3t_start_poll_timer(tRW_T3T_CB* p_cb) {
+ RW_TRACE_DEBUG1 ("%s: starting t3t poll timer", __func__);
nfc_start_quick_timer(&p_cb->poll_timer, NFC_TTYPE_RW_T3T_RESPONSE,
RW_T3T_POLL_CMD_TIMEOUT_TICKS);
}
+#if (NXP_EXTNS == TRUE)
+/*******************************************************************************
+**
+** Function rw_t3t_stop_poll_timer
+**
+** Description Stop the timer for T3T POLL Command
+**
+** Returns none
+**
+*******************************************************************************/
+void rw_t3t_stop_poll_timer (tRW_T3T_CB *p_cb)
+{
+ RW_TRACE_DEBUG1 ("%s: stopping t3t poll timer", __func__);
+ if(p_cb->poll_timer.in_use)
+ nfc_stop_quick_timer (&p_cb->poll_timer);
+}
+#endif
+
/*******************************************************************************
**
** Function rw_t3t_handle_nci_poll_ntf
@@ -358,7 +377,11 @@
tRW_T3T_CB* p_cb = &rw_cb.tcb.t3t;
/* stop timer for poll response */
- nfc_stop_quick_timer(&p_cb->poll_timer);
+ #if (NXP_EXTNS == TRUE)
+ rw_t3t_stop_poll_timer (p_cb);
+ #else
+ nfc_stop_quick_timer(&p_cb->poll_timer);
+ #endif
/* Stop t3t timer (if started) */
if (p_cb->flags & RW_T3T_FL_W4_PRESENCE_CHECK_POLL_RSP) {