Hi,
i found bug in "Implementation of the ISO15693 Protocol in the TI TRF796x" pseudo-code and in TRF7970AEVM example code:
buf[3] = (char) (size >> 8); /* Data for register 1D */
buf[4] = (char) (size << 4); /* Data for register 1E */
You save 4 LSB bits of the size to 4 MSB bits in register 1E (it's OK), and you save 8 MSB bits to register 1D, but you have to save from bit 4 to bit 11 of the size variable to register 1D.
For example:
uint16_t size = 0x0123;
buf[3] = (char) (size >> 8); // buf[3] = 0x01
buf[4] = (char) (size << 4); // buf[4] = 0x30
so the length saved in registers 1D and 1E is 0x0013, but it have to be 0x0123.
To solve this problem you have to shift 4 bits right and not 8:
buf[3] = (char) (size >>4); /* Data for register 1D */
Best regards,
Artyom Z.