cancel
Showing results for 
Search instead for 
Did you mean: 

configuration of ST25R100 chip with STM32C031C6T6 microcontroller in STM32cube IDE

Hitesh_Pandey
Associate II

Hello STMicroelectronics Community

I am facing issues in configuration of ST25R100 chip with STM32C031C6T6 microcontroller in STM#@cube IDE. I am using default configuration settings but still facing trouble in initialization.

Can anyone in here who is helping me in configuration of ST25R100 chip with STM32C031C6T6 microcontroller or any other stm32 microcontrollers.@stm32

 

Thanks,

Hitesh Pandey

This discussion has been locked for participation. If you have a question, please start a new topic in order to ask your question
1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

SPI mode and clock speed and BF command are correct. However I still don't see the complete Read IC Identity read. 8 more clocks are to come. Do you have such a big inter-byte delay?

Even so if I interpret your second picture correctly then after the BF there are at least two more bytes being read. Our software is not doing such....

SINGLETXRX option in RFAL should condense the SPI, easier to get an overview.

MISO seems to be somehow reacting - could be crosstalk or also ST25R100 driving against an MCU pin in output mode. But hard to see at this resolution.

 

Ulysses

View solution in original post

17 REPLIES 17
Brian TIDAL
ST Employee

Hi Hitesh,

Do you use the X-NUCLEO-NFC09A1 board or a custom board based on ST25R100?

Do you use the X-CUBE-NFC9 expansion package and has your application be generated through STM32CubeMX (stand alone application or embedded inside STM32CubeIDE)?

Is the reset PIN of the ST25R100 (D8 on the X-NUCLEO-NFC09A1 arduino connector) properly configured on PA9 as GPIO OUTPUT?

Is the Interrupt pin of the ST25R100 (A0 on the X-NUCLEO-NFC09A1 arduino connector) properly configured on PA0 as GPIO_EXTI0:

BrianTIDAL_0-1724746007837.png

Make sure to have the following PA0 configuration:

BrianTIDAL_1-1724746053866.png

And make sure to enable EXTI Line 0 interrupt

BrianTIDAL_2-1724746078795.png

To further debug, you can enable ST25R_SELFTEST compilation switch, set a break point in st25r200Initialize and run this function step by step and send me information about where the failure is. Also feel free to share your ioc file.

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.

Thanks for your response Brian,

I'm using a custom board with ST25R100.

yes, I'm the X-CUBE-NFC9 expansion package.

The RESET PIN of ST25R100 is connected to ground. As shown in datasheet of ST25R100 chip.

Interrupt pin of the ST25R100 is properly configured as above.

but during debug time, code is stuck in  "platformErrorHandle();" function. I have attached a snippet bellow:

Screenshot 2024-08-27 163042.png

& also i have attached .ioc file here.

 

 

Hi Hitesh,

the SPI configuration is incorrect. See Datasheet §5.8.2 "The ST25R100 has a standard serial peripheral interface with clock polarity of 0, a clock phase of 1"

The proper configuration should be:

BrianTIDAL_1-1724758846363.png

When reading the identity register 3Fh, the returned value has a wrong value. This causes st25r200CheckChipID() to return an error.

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.

Hi Brian,

I agree with you, but still the identity register 3Fh return a wrong value after change in clock phase.

I have attached here the zip file of complete project, please check it & let me know where is the mistake.

 

Hi Hitesh,

I believe there no response on SPI. This can be due to different issues:

  • check that the device is correctly powered
  • check the RESET pin is grounded (or connected to a GPIO a low level).
  • check that the BSS (aka Chip Select) is properly connected and is staying low during a full transaction.
  • check that the MISO and MOSI are not inverted

Can you connect a logic analyzer on the the SPI (CLK, MISO, MOSI and CS) + IRQ_ST25R100 and send me the trace?

The title of your post refers to STM32C031C6T6 whereas an STM32F103 is used in the ioc file. Do you have 2 different hardwares or do you have a kind of prototype based on an STM32F103+X-NUCLEO-NFC09A1?

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.

Hi Brian,

I have 2 different hardwires based on STM32C031C6T6 & STM32F103 with ST25R100 NFC reader IC.

I have traced my complete hardware. all the pins are connected & working properly. could you please let me know what will be the correct chip ID. I have attached here a snippet of chip IDs:Screenshot 2024-09-03 165429.png  

Currently I am troubleshooting the problem. I'll be updated you.

 

regards,

Hitesh Pandey

Hi Hitesh,

good to see that the BSS issue seems to be solved on your side. The snippet of the Chip ID is strange. Register 0x3F (IC Identity) is a single byte register. I am not sure to understand the printing (it seems to be an erroneous printf parameter). IC Identity binary value is 10101xxx. See §5.13.64 in ST25R100 Datasheet.

BrianTIDAL_0-1725366408608.png

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.

Hi Brian,

All these IC Identity values are in ASCII values. I have put length 20 byte length so that it is showing a strange value.

For single byte, IC Identity value is the first 2 digit of ST25R200_REG_IC_ID in the snippet.

I have also a doubt in RFID TAG. Can I use RFID TAG or there is any specific RFID TAG for ST25R100 Reader?

Regards,

Hitesh Pandey

Hi,

I guess the SPI communication is still not operational as having 00h of FFh for the IC register is not correct: can you connect a logic analyzer on SPI(CLK, MISO, MOSI and CS) + IRQ_ST25R100 and send me the trace?

Regarding the tag, ST25R100 supports:

  • ISO14443A/NFC-A tags e.g. ST25TA or ST25TN tags (and of course any tag compliant with ISO14443A)
  • ISO144443B/NFC-B tags
  • ISO15693/NFC-V tags e.g. ST25TV or ST25DV  (and of course any tag compliant with ISO15693)
  • ST25TB tags
  • Kovio, CTS, and B’ tags

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.