cancel
Showing results for 
Search instead for 
Did you mean: 

CR95HF - error code 0x81

MMacn
Associate

What is explanation for this code (0x81) - can not find it in documentation.

Receiving it for FS2JAST4 chip.

1 ACCEPTED SOLUTION

Accepted Solutions
Brian TIDAL
ST Employee

​Hi,

see https://community.st.com/s/profile/0050X0000089G09QAE for similar issue with nRF52.

Would it be possible to connect a logic analyzer on the SPI link and check the various timings? I suspect something wrong around SPI. Can you also check that the nRF52810 RF part does not cause some noise on the SPI link (i.e. make sure that the RF part is OFF for testing the SPI connection))

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

5 REPLIES 5
Brian TIDAL
ST Employee

​Hi,

In order to better support you, would you please provide information about your HW and SW setup and about the issue:

  • CR95HF: custom CR95HF board or X-NUCLEO-NFC03A1 or PLUG-CR95HF-B or CR95HF demonstration board
  • MCU: STM32 MCU on Nucleo board or custom board with non ST MCU?
  • Communication interface:
    • SPI or UART
    • configuration: SPI frequency, UART baud rate,
  • SW
    • Linux, RTOS or bare metal application
    • use X-CUBE-NFC3 v2.0.0 library or older X-CUBE-NFC3 library or home made library
  • 0x81 error
    • on which command do you have a 0x81 reply
    • what was the previous command sent to the CR95HF
    • what is the protocol being used and what is its configuration
    • what tag is being used when this issue occurs
    • is it a systematic or a random issue?

Many thanks

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
MMacn
Associate

Thanks for response =)

I am using my own pcb with nRF52810 and CR95HF (both from China) - connected via SPI. CR95HF report ID: NFC FS2JAST4

SW: Segger SAS 4.16 with nRF SDK 15.3

used commands:

idncommand[3] = {0x00, 0x01, 0x00};

setprotocolcommand[5] = {0x00, 0x02, 0x02, 0x01, 0x0F};

inventorycommand[5] = {0x00, 0x04, 0x02, 0x03, 0x2B};

readmultiblockcommand[7] = {0x00, 0x04, 0x04, 0x03, 0x23, 0x00, 0x02};

readblockcommand[6] = {0x00, 0x04, 0x03, 0x03, 0x20, 0x00};

with different hardware (own pcb Arduino/nRF51 + CR95HF from Mouser) - all works ok.

tested frequencies from 150k to 2M and modes 0 and 3 - no change in results.

0x81 response is from various commands - echo, inventory, read block, read multiple block.

Found:

when received 0x81 -> re-init SPI, wakeup CR95HF via IRQ, setup SPI, protocol select then repeat command -> no 0x81 - command executed and 0x80 received.

such behaviour is very frequent - aprox 99% of commands require such re-init procedure to perform correctly. After init/re-init - no more than 2 consecutive commands with 0x00/0x80 response, then 0x81

I suppose that it can be a "fake CR95HF" case with China IC....

Brian TIDAL
ST Employee

​Hi,

see https://community.st.com/s/profile/0050X0000089G09QAE for similar issue with nRF52.

Would it be possible to connect a logic analyzer on the SPI link and check the various timings? I suspect something wrong around SPI. Can you also check that the nRF52810 RF part does not cause some noise on the SPI link (i.e. make sure that the RF part is OFF for testing the SPI connection))

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Brian TIDAL
ST Employee

Hi,

I guess you are managing the SPI Slave Select by software. Can you check that the setup time of the Slave Select is inline with the CR95HF datasheet §6.4. You may need to add some delay here.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
Brian TIDAL
ST Employee

Hi,

error 0x81 means Invalid command code. My feeling is that some data are corrupted on the SPI link.

Rgds

BT

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.