2024-03-12 03:03 AM
Hi am using ST25R3911B DISCOVERY Board, and I am using ISO15693 Single read and write function.but this function not work properly and i found an err code after execution the code.the value not to be read and write properly. but st25r3911WriteTestRegister(res,value);this function work properly for read and write.Do u have any suggestion regarding this .
2024-03-12 03:11 AM
Hi,
well one is trying to talk to NFC tags in front of the antenna over RF and the other one just accessing registers on SPI....
Ulysses
2024-03-12 09:40 PM
MX_GPIO_Init();
MX_I2C1_Init();
MX_LPUART1_UART_Init();
MX_USART1_UART_Init();
MX_SPI1_Init();
MX_USB_DEVICE_Init();
/* USER CODE BEGIN 2 */
/* SPI Connection to ST25R3911 */
spiInit(&hspi1);
/* Use LPUART1 as logging UART */
logUsartInit(&hlpuart1);
logUsart("Welcome to DISCO-STM32L4x6\n");
/* Initalize RFAL */
rfalAnalogConfigInitialize();
if( rfalInitialize() == ERR_NONE )
{
logUsart("RFAL initialization succeeded..\n");
platformLedOn(PLATFORM_LED_FIELD_PORT, PLATFORM_LED_FIELD_PIN);
ledOn(LED_A);
ledOn(LED_B);
ledOn(LED_F);
ledOn(LED_V);
ledOn(LED_AP2P);
}
else
{
while(1){
platformLedToogle(PLATFORM_LED_FIELD_PORT, PLATFORM_LED_FIELD_PIN);
ledToggle(LED_A);
ledToggle(LED_B);
ledToggle(LED_F);
ledToggle(LED_V);
ledToggle(LED_AP2P);
HAL_Delay(40);
logUsart("RFAL initialization failed..\n");
}
}
/* For production programming: Turn ON field led, diabled by
* rfalSetAnalogConfig when accessing op control */
platformLedOn(PLATFORM_LED_FIELD_PORT, PLATFORM_LED_FIELD_PIN);
/* Initalize SW components */
StreamDispatcherInit();
dispatcherWorker();
if(0X00== rfalNfcvPollerInitialize( ))
ledToggle(LED_A);
else
ledToggle(LED_B);
while(1)
{
err = rfalNfcvPollerWriteSingleBlock(RFAL_NFCV_REQ_FLAG_DEFAULT, uid, blockNum, wrData, sizeof(wrData));
if( err==0)
ledOn(LED_A);
else
ledOff(LED_A);
err = rfalNfcvPollerReadSingleBlock(RFAL_NFCV_REQ_FLAG_DEFAULT, uid, blockNum, rxBuf, sizeof(rxBuf), &rcvLen);
if( err==0)
ledOn(LED_B);
else
ledOff(LED_B);
}
}
2024-03-12 09:48 PM
I was expecting that led A and LED B ON after succesive read and write in tag. but here both led's are off.and also confused with RFAL_NFCV_REQ_FLAG_DEFAULT VALUE, is it possible to use here a particular flag value like 0x02.