2018-10-24 01:16 PM
I have got a program running that goes through the following steps
This is reading iCode tags using the ISO15693 protocol, but the response i get back from the Read Single Block is 5 bytes long, with what appears to be an additional 0x00 at the beginning. I know this because the Read Single Block routine takes several arguments, one being the rxbuffer, its size and the rcvLen - it is this last parameter that is getting set to 5.
To confirm my code was working correctly, I used the ST25R3911B Disco Demo board and the windows software to set values into block zero that were non zero values. For example
Value Set on PC: 0/0: FF 0/1:00 0/2:00 0/3:00
Value read on Raspberry Pi: 00FF000000
Value set on PC: : 0/0: 00 0/1:01 0/2:02 0/3:03
Value read on Raspberry Pi: 0000010203
So I am confident that I have an extra value at the beginning of the returned dataset. Is this a code bug?
Solved! Go to Solution.
2018-10-25 06:26 AM
Dear Matthew,
The Read Single Block method will compute the Request and place the Response on the given rxBuf.
The response is composed by:
On the rxBuf you will receive the card's reply, expect: SOF, CRC and EOF.
Therefore the first byte will always be the Response_Flag.
Additionally, on the method's argument list it is mentioned that the Response_Flag will part of the response.
* \param[out] rxBuf : buffer to store response (also with RES_FLAGS)
That is the reason you receive overall 5 bytes, where only 4 are Data.
Kind regards
GP
2018-10-25 06:26 AM
Dear Matthew,
The Read Single Block method will compute the Request and place the Response on the given rxBuf.
The response is composed by:
On the rxBuf you will receive the card's reply, expect: SOF, CRC and EOF.
Therefore the first byte will always be the Response_Flag.
Additionally, on the method's argument list it is mentioned that the Response_Flag will part of the response.
* \param[out] rxBuf : buffer to store response (also with RES_FLAGS)
That is the reason you receive overall 5 bytes, where only 4 are Data.
Kind regards
GP