cancel
Showing results for 
Search instead for 
Did you mean: 

ST25DV-i2c energy harvesting and GPO with stm32l031k6

WPARK.1
Associate III

Hello, I am trying to open a project that can turn on the low power MCU stm32l031 with ANT7-T-25DV64KC while turning high and low periodically for GPO pin of the MCU. I tried many different ways but still not done with any of them (steval code and using NFC4 and 7 provided by stm32cubeide).

Would you please suggest me for any reference or sample for St25DV-i2c?

1 ACCEPTED SOLUTION

Accepted Solutions
Rene Lenerve
ST Employee

Hi @WPARK.1​,

Great that you solved your issue, Happy for you.

  • For EH, if you have set the register to the value ST25DVXXKC_EH_ACTIVE_AFTER_BOOT, EH will be always active (when a field is present) until you modify this register. (please read the DataSheet of the ST25DV64KC to have more information on it and other features).

  • For NDEF, NDEF is a file format message described by the standard from NFC Forum specifications, it describes how data are organized in the memory. There are multiple formats defined by NFC Forum, URI is one to store URI information as for this example an URL (could be also phone number, email, ftp, ...). The field information is just additional information used for smart poster (it is an extended format that contains more fields not mandatory to store only an URL). For NDEF Text format you need to use another format than the URI, in the ndef lib you have a file named lib_NDEF_Text that allow you to build such messages. But it is recommended to read the standard or find some resources on google to learn more about NDEF format (This standard is used for applications with NFC but are not NFC spec).

I hope this can help you.

Kind Regards.

View solution in original post

32 REPLIES 32
JL. Lebon
ST Employee

Hello,

Just to be sure I understand what you want to do:

  • do you want to use the GPO pin of ST25DV to wake-up the STM32 ?
  • do you want to wake up on RF field detection, or on-demand when a RF reader (e.g. smartphone) is sending a special command to toggle the GPO pin ? (the GPO pin can be toggled on a RF command or on some RF events like RF field detection).

Best regards.

Actually, I donot need any data to read. I want to turn on the MCU using the EH of ST25 and when RF is detected, GPO makes some PWM kind of signal.

Thank you for reading.

JL. Lebon
ST Employee

Hello,

There is 2 ways of using EH: on-demand or at boot.

On demand means that you activate/deactivate it with a command from the reader. For this, you need to write a 1 into the EH_CTRL_Dyn register.

At boot means that every time the RF field is rising, the EH will be activated automatically. To enable this mode, you need first to set the EH_MODE configuration byte to 0 (you need first to present the RF configuration password to be able to write this).

Please keep in mind that EH power delivery is small and very dependent on the distance with the reader and on antennas size and coupling. So do not try to power too many thing with this.

For GPO, there is a RF command to toggle the level of the GPO pin. It is the ManageGPO command. It allows the RF reader to change level of the GPO pin on demand.

Best regards.

Yes, I am aware of that as I ran this kind of project with Arduino before using ST25 Arduino library. However, I realized that with Arduino, it is not possible to make a batteryless circuit as Atmega328 is not LP MCU. Therefore, I would like to make a project similar with STEVAL-SMARTAG1 with stm32l031. But it is not easy to find any reference project or sample code that can be operated in STM32CubeIDE.

Thank you for reading.

Rene Lenerve
ST Employee

Hi @WPARK.1​,

Unfortunately we do not have ready to use examples using STM32L031 with STM32CubeIDE.

I think the best way would be to start a new stm32 project in STM32CubeIDE with the correct MCU selected. And then include source files from NFC7 examples.

You can also start a new STM32 project using ioc file from SMARTAG1 project (which uses STM32L031) but this project is configure to work with other components (be careful that SMARTAG uses ST25DVxxK and not ST25DVxxKC, they are quite similar but some registers are different and Ref IC is not identical, so you'll need to get ST25DVxxKc component drivers from NFC7 package to use with your ANT7-T-25DV64KC).

It is not clear what you would like to do, here are some information about feature you mention on previous posts:

  • Energy Harvesting is not managed by MCU, only the activation of this feature can be set with I²C or RF, so the MCU will be power up every time the field is raising. Or you could wake up the MCU using GPO but this needs to connect GPO to a specific MCU pin (to check in MCU DataSheet).
  • GPO cannot be managed as a PWM with I²C, only the RF is able to drive the GPO level (the NFC Reader could toggle the GPO to simulate a PWM but the frequency would be limited due to the NFC commands exchange time).

Maybe if you could give more information on your project it would be easier to help.

Kind Regards.

WPARK.1
Associate III

Hello,

First of all, thank you for your clarification.

For my project, I want to collect the power from the antenna of the NFC chip (it is the reason why I am mentioning EH of ST25) to turn on the LP MCU (STM32L031). Then, through I2C, I want to make a PWM kind of digital signal at GPO of the NFC chip to periodically turn on and off a simple device (I am thinking of 2 ways actually, by setting a timer I can high and low the GPO of NFC or if the power collected by the antenna is enough, I can directly use LP MCU digital pin to do it).

Actually, I tried NFC7 package before, but I failed to modify code for STM32L031 (the original sample code triggered by reading button input so I tried to make it always on when MCU is booted but after modification, it cannot escape from a specific code).

Thank you for reading.

Hello,

First of all, thank you for your clarification.

For my project, I want to collect the power from the antenna of the NFC chip (it is the reason why I am mentioning EH of ST25) to turn on the LP MCU (STM32L031). Then, through I2C, I want to make a PWM kind of digital signal at GPO of the NFC chip to periodically turn on and off a simple device (I am thinking of 2 ways actually, by setting a timer I can high and low the GPO of NFC or if the power collected by the antenna is enough, I can directly use LP MCU digital pin to do it).

Actually, I tried NFC7 package before, but I failed to modify code for STM32L031 (the original sample code triggered by reading button input so I tried to make it always on when MCU is booted but after modification, it cannot escape from a specific code).

Thank you for reading.

JL. Lebon
ST Employee

Hi,

"Then, through I2C, I want to make a PWM kind of digital signal at GPO of the NFC chip to periodically turn on and off a simple device (I am thinking of 2 ways actually, by setting a timer I can high and low the GPO of NFC or if the power collected by the antenna is enough, I can directly use LP MCU digital pin to do it)."

Be aware that it is not possible to make ST25DV's GPO pin toggle from I2C interface of the ST25DV. It is only possible using an RF command or from specific RF events. There is no timer inside the ST25DV to toggle GPO pin like a PWM.

So you will have to do the PWM from a MCU digital pin.

Best regards.

Hello,

I see. So I need to turn on the MCU using antenna first and then, through I2C, I need to do EH for providing stable power for LP MCU, then by setting a timer on MCU, I can make periodic control on the digital pin of MCU.

Thank you for reading.