cancel
Showing results for 
Search instead for 
Did you mean: 

code for st25r200

noamyuzukMSH
Associate II

 

Hi everyone,

I am working with the STEVAL-25R200SA evaluation board using the ST25R200 GUI software, and everything is functioning correctly.

However, I would like to develop my own software instead.

  1. Using X-CUBE-NFC10 Middleware:

    • Can I use the X-CUBE-NFC10 middleware to read and write NFC tags with this board?
    • I attempted to generate the necessary files, but the generator is not working properly. Specifically, the file "nfc_conf.h" is not being generated as expected, causing errors.
  2. Understanding the Existing Firmware:

    • I have access to the firmware code for the STEVAL-25R200SA, but it is quite complex.
    • I am unsure which parts of the code are essential and which can be ignored.
    • Could someone guide me on how to approach this or point me to relevant documentation?
    • i don't need to use uart for example.

Any help would be greatly appreciated!

Thanks!

9 REPLIES 9
Ulysses HERNIOSUS
ST Employee

Hi,

the easiest demos available are the ones in ST25 Embedded NFC lib. They include NDEF read/write, and many other demo applications. They are also  meant to be easily portable to non-STM32 MCUs.

Also X-CUBE-NFC10 should work. Not sure why that file would not be created. If you detail all the steps you are performing then maybe @Rene Lenerve could comment.

BR, Ulysses

noamyuzukMSH
Associate II

hi,

 

I tried using the X-CUBE-NFC10 package ,

but the package doesn’t build the project well,

This is my steps:

1-Configuration hardware I took from steval-25r200sa :

noamyuzukMSH_0-1742209041055.png

2- Configure the x-cube-nfc10

noamyuzukMSH_1-1742209041056.png

 

 

3- Enable the nfc 10 :

noamyuzukMSH_2-1742209041060.png

 

4- Generate code :

noamyuzukMSH_3-1742209041061.png

 

5- Build :

 

noamyuzukMSH_4-1742209041067.png

 

6- Adding nfc_conf.h , I copy into nfc_conf.txt:

 

this is my steps, what did i do wrong ?

 

best regards, 

 

noam.

 

 

 

Brian TIDAL
ST Employee

Hi,

make sure to follow the various steps described in STMicroelectronics.X-CUBE-NFC10_GettingStarted.pdf (available in <yourHomeDir>\STM32Cube\Repository\Packs\STMicroelectronics\X-CUBE-NFC10\1.0.0\Documentation)

In particular:

BrianTIDAL_0-1742373480325.png

and

BrianTIDAL_1-1742373556008.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.
noamyuzukMSH
Associate II

Hi

Thanks BT for your reply,

so i created a new project .

i took the .ioc file from steval -25R200SA evaluation board FW.

 

noamyuzukMSH_0-1742387890610.png

 

i created the project from the nfc10 :

i defined all missing HW (button EXTI and LED)

 

noamyuzukMSH_1-1742388003028.png

 

generate the project:

download the project to the stm32 .

with debugging , i can see ,the stm32 cant identify the chip id of the st25r200.

on this function :

bool st25r200CheckChipID( uint8_t *rev )

{

uint8_t ID;

 

ID = 0;

st25r200ReadRegister( ST25R200_REG_IC_ID, &ID );

 

/* Check if IC Identity Register contains ST25R200's IC type code */

if( (ID & ST25R200_REG_IC_ID_ic_type_mask) != ST25R200_REG_IC_ID_ic_type_st25r200 )

{

return false;

}

 

if(rev != NULL)

{

*rev = (ID & ST25R200_REG_IC_ID_ic_rev_mask);

}

 

return true;

}

 

after st25r200ReadRegister( ST25R200_REG_IC_ID, &ID ); function the ID remain 0.

so i cant read the st25r200 id. why is that ?

after that ,the software got stuck  on  error handler on while(1)

 

void Error_Handler(void)

{

/* USER CODE BEGIN Error_Handler_Debug */

/* User can add his own implementation to report the HAL error return state */

__disable_irq();

while (1)

{

}

/* USER CODE END Error_Handler_Debug */

}

 

 

what the reason for that , the main issue is to understand why the st25r200 chip not recognize the id number.

again, this hardware is working fine, when use the STEVAL-25R200-STM32G0B1 FW.

best regards ,

 

noam.

 

 

 

Hi,

check your SPI configuration and make sure the Reset pin of the ST25R200 is low. The st25r200CheckChipID fails due to no reply on the SPI (i.e. no reply ==> 0x00 is read on the MISO), so either the Reset pin is floating or the SPI configuration is incorrect.

BT

Rgds

 

 

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.
noamyuzukMSH
Associate II

 

Hi,

It’s working for me now.

I would like to know how to write data to a tag. Can you guide me on how to do that?

Is it possible to write to the tag using this library? I am using rewritable "A" type tags.

Best regards,

maybe one of the check box? 

 

noamyuzukMSH_0-1742746504350.png

 


Noam

Hi Noam,

our demos provide an application reading/writing NDEF in case the tag is properly formatted.

Otherwise you need to inspect the DS of the tag about the commands which need to be used.

Regards, Ulysses

noamyuzukMSH
Associate II

hi,

Great, can you show me an example, how can I use the NDEF for writing?

 

br,

NOAM.

 

 

 

Ulysses HERNIOSUS
ST Employee

Hi Noam,

the aforementioned ST25 NFC lib (stsw-st25r-lib) contains an ndef_rw example.

BR, Ulysses