2024-11-18 12:00 AM - last edited on 2024-11-18 06:50 AM by Andrew Neil
Dircet_Command(SET_Default);
Register_Write(IO_configuration1, 0x04); // IO Configuration1 register Write 0x04
Register_Write(IO_configuration2, 0x84); // IO Configuration2 register Write 0x84
Register_Write(Bit_rate_definition, 0x00); // Bit Rate Defintion register Write 0x00
Register_Write(Stream_mode_definition, 0x18); // Stream Mode definition register Write 0x18
Register_Write(Mode_defintion,0x74); // Mode Defintion register Write 0x74
Register_Write(Operation_control,0xC8); // Operation control register Write 0xC8
FIFO_load(FIFO_TX,CMD_BUF); //FIFO Buf Wirte CMD_BUF
(Write to the register as long as the buffer length)
Register_Write(Number_of_transmitted_bytes1,len);
Register_Write(Number_of_transmitted_bytes2,len);
Dircet_Command(Transmit_without_CRC); //Send data stored in FIFO Buff
static uint8_t TXReadUID[22]=
{0x21,0x20,0x08,0x20,0x02,0x08,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x20,0x08,0x80,0x80,0x20,0x20,0x02,0x02,0x04};
uint8_t message_length = 22;
This command is the CMD of ISO15693, which converts the Inventory request command to the 4_1 format.
while(1){
if(Register_Read(Main_interrupt) & 0x10){
FIFO_Read = 0x9F;
HAL_SPI_TransmitReceive(&hspi2,FIFO_Read,rx_buffer,fifo_len,1000);
}
}
Receive Data = [ 11 A2 88 28 22 45 84 84 10 41 08 11 42 48 08 21 11 84 88 28 85 A2 48 44 10 ]
2024-11-18 01:18 AM
Hi,
@Klab_dev wrote:
but it did not work properly
What is the return code of rfalIso15693VICCDecode?
I would recommend to use the RFAL library that implements the various NFC activities and provides some ready to use demos.
Rgds
BT
2024-11-18 01:48 AM
2024-11-18 06:42 AM
Hi,
With the first byte of received data being 11h I would expect an ERR_FRAMING due to
if ((inBuf[0] & 0x1fU) != 0x17U)
{
ISO_15693_DEBUG("0x%x\n", iso15693PhyBitBuffer[0]);
return RFAL_ERR_FRAMING;
and not a collision error!
Otherwise please check and compare the various registers - especially MRT, but also NRT and the values of the registers ST25R3916_REG_AUX, ST25R3916_REG_RX_CONF1..4 and ST25R3916_REG_CORR_CONF1..2
BR, Ulysses