Getting multiple errors in ReadMultipleBlocks depending on the number of blocks I request to read
Hi everyone,
I have just discovered that I have multiple errors when I try to read more than 30 blocks, rfalNfcvPollerReadMultipleBlocks() function depending on the number of blocks I try to read.
Firstly, I want you to talk about the TAG I am reading:
- It is a ST25TV02KC NFC type5 - ISO/IEC 15693 (NFCV) TAG from ST
- It has 320 bytes of memory and 4 bytes block-size.
- With the Android app ST25 I can read all the blocks correctly
The behavior I am seeing is the next:
- I can read successfully from 1 to 30 blocks.
- When I ask for 31 blocks, I get ERR_FRAMING (0x09) error. I don't understand this error... Could you kindly explain it to me, please? I have, also, searched in ST forum for this error, but I haven't seen any solution related to my issue.
- When I ask for more than 32 blocks, I get ERR_RF_COLLISION (0x1D) error. Again, I don't understand why I get collision error because I have only one tag in the field of the RFID. Could you explain me this, also, please?
Another thing I don't understand, is the difference that makes that I get two different errors, since I have no limitations from the tag (since the tag has 320Bytes / 4Bytes_perBlock = 80 blocks I should be able to read...).
Finally, I want to share with you some code to give you the maximum information to solve this issue:
1. I have this structure defined for function parameters :
typedef struct {
uint8_t UID[8];
e_addressMode_t addressMode;
uint8_t inicioBloques;
uint8_t numeroBloques;
uint8_t intentos;
uint16_t rxLen;
uint8_t *data;
} s_read_multiple_blocks_params_t;2. The struct variables are initialized in my code like this:
param->data = malloc(FLAGS_BYTES + (param->numeroBloques * DEMO_NFCV_BLOCK_LEN) + CRC_BYTES);
param->numeroBloques = 31; // or 32 depending2. I use the function rfalNfcvPollerReadMultipleBlocks() like this:
ReturnCode err = ERR_NONE;
/*
* Read block using Read Multiple Blocks command
* with addressed mode (uid != NULL) or selected mode (uid == NULL)
*/
if (param->addressMode == ADDRESSED) {
err = rfalNfcvPollerReadMultipleBlocks(RFAL_NFCV_REQ_FLAG_DEFAULT,
¶m->UID[0],
param->inicioBloques,
param->numeroBloques - 1,
param->data,
FLAGS_BYTES + (param->numeroBloques * DEMO_NFCV_BLOCK_LEN) + CRC_BYTES,
¶m->rxLen);
}
else if (param->addressMode == NON_ADDRESSED) {
err = rfalNfcvPollerReadMultipleBlocks(RFAL_NFCV_REQ_FLAG_DEFAULT,
NULL,
param->inicioBloques,
param->numeroBloques - 1,
param->data,
FLAGS_BYTES + (param->numeroBloques * DEMO_NFCV_BLOCK_LEN) + CRC_BYTES,
¶m->rxLen);
}
else if (param->addressMode == SELECTED) {
err = rfalNfcvPollerReadMultipleBlocks(RFAL_NFCV_REQ_FLAG_DEFAULT | RFAL_NFCV_REQ_FLAG_SELECT,
NULL,
param->inicioBloques,
param->numeroBloques - 1,
param->data,
FLAGS_BYTES + (param->numeroBloques * DEMO_NFCV_BLOCK_LEN) + CRC_BYTES,
¶m->rxLen);
}Thank you very much for advance,
Enric Puigvert
