Fix the syncronization issue between read thread and write thread

NFC stack hang if Read Interrupt is notified even before
the write callback is notified. Add 2ms delay to give priority to
write thread if it is busy.

Bug: 30240780
Change-Id: I732fd3c5412276d12f84103562997182b0e77aa1
diff --git a/halimpl/pn54x/tml/phTmlNfc.c b/halimpl/pn54x/tml/phTmlNfc.c
index e50b49e..3d402df 100644
--- a/halimpl/pn54x/tml/phTmlNfc.c
+++ b/halimpl/pn54x/tml/phTmlNfc.c
@@ -394,6 +394,11 @@
                             gpphTmlNfc_Context->bWriteCbInvoked = FALSE;
                         }
                     }
+                    if (gpphTmlNfc_Context->tWriteInfo.bThreadBusy)
+                    {
+                        NXPLOG_TML_D ("Delay Read if write thread is busy");
+                        usleep (2000); /*2ms delay to give prio to write complete */
+                    }
                     /* Update the actual number of bytes read including header */
                     gpphTmlNfc_Context->tReadInfo.wLength = (uint16_t) (dwNoBytesWrRd);
                     phNxpNciHal_print_packet("RECV", gpphTmlNfc_Context->tReadInfo.pBuffer,