Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

issueISO15693Command hangs on receiving more than 50+ bytes #38

Open
ddv2005 opened this issue Jan 31, 2021 · 1 comment
Open

issueISO15693Command hangs on receiving more than 50+ bytes #38

ddv2005 opened this issue Jan 31, 2021 · 1 comment

Comments

@ddv2005
Copy link

ddv2005 commented Jan 31, 2021

Hello,

I tried to implement read multiple blocks (0x23) command and found that it hangs on reading more than 57 bytes. I found that it is because issueISO15693Command reads RX_STATUS (to check received data length) but RF data still in fly and received data length not correct. If I put some delay before reading RX_STATUS then I can read more data without hangs but it should be some procedure to find out exact moment when all data received and buffered.

@ddv2005
Copy link
Author

ddv2005 commented Jan 31, 2021

I found correct way - check RX_IRQ_STAT bit before reading RX_STATUS :

sendData(cmd, cmdLen);
delay(10);

uint32_t irqR = getIRQStatus();
if (0 == (irqR & RX_SOF_DET_IRQ_STAT)) {
return EC_NO_CARD;
}

while(!(irqR & RX_IRQ_STAT))
{
delay(1);
irqR = getIRQStatus();
}

uint32_t rxStatus;
readRegister(RX_STATUS, &rxStatus);

tueddy pushed a commit to tueddy/PN5180-Library that referenced this issue Feb 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant