cancel
Showing results for 
Search instead for 
Did you mean: 

Configure Energy Harvesting of M24LR-Discovery Kit

alkatatod
Associate

Hello all,

I am using the M24LR Discovery kit which has an RF transceiver board with a CR95HF transceiver IC controlled by an STM32 MCU and a wireless tag, containing the M24LR04E-R EEPROM with an RF interface, controlled by an STM8 MCU. There is a demo application software provided, but it has limited utility which is why I had to source firmware for both individual boards and program them individually.

I am having some difficulties as I cannot power the M24LR board from the energy harvesting from the antenna of the CR95HF board. According to the M24LR04E-R datasheet (pages 27 - 28), in order to turn on Energy Harvesting, bits 0, 1, and 2 of the configuration byte (table 14) must be set. This will then set bit 0 (named EH_enable) of the control byte (table 15) which enables the Energy Harvesting. I've tried all combinations of bits 0, 1, and 2 of the configuration bytes, but I have not been able to turn on Energy Harvesting as the tag is not powered from the CR95HF board and bit 0 of the control register is not 1 (I can manually read that byte). Furthermore, I receive an error from the CR95HF board, saying that the frame has timed out, meaning that there is no tag-detected (maybe because the EH bits are 0). I've noted that when the M24LR board is powered externally, the EH_enable bit is on, and the CR95HF board returns a success response as it detects the presence of the M24LR board. This might mean that without the external power, the voltage is dissipating and the EH_enable bit cannot turn on - resulting in an error code on the side of the CR95HF board.

I appreciate all kinds of advice on this.

Thanks! 

1 ACCEPTED SOLUTION

Accepted Solutions
alkatatod
Associate

Hello, 

Thank you for your reply.

I was able to solve this problem by tweaking the configuration byte to a different value, suitable for my application. Details of it can be found in table 126 of the datasheet. For my application writing 0xF2 or 0xF3 to the configuration register worked (later found out that 0xF3 was the default value under the original firmware). 

I have a different problem though, with the PORsequence() of the CR95HF's board not being able to run properly. I am developing custom firmware based on the firmware provided in the supporting materials (STSW-M24LR007: Firmware for RF Transceiver Board of M24LR-Discovery-Kit). Each time I reset/supply power, the PORsequence() returns an error and therefore no communication is established. I've found this weird trick that if I change the interface from SPI to UART (in the drv_CR95HF.c file) and run it I enter an infinite loop. But then if I still keep the board connected to power and change the interface back to SPI and run it again, the PORsequence() returns success and the board successfully can communicate with the M24LR NFC tag. 

View solution in original post

2 REPLIES 2
JL. Lebon
ST Employee

Hello, 

If I understand well, you have developed your own firmware for the M24LR Discovery board, but EH is not working?
Where you able to see EH working with the original firmware? JP1 jumper must connect pins 2 to 3 to have RF_POWER supply. When approaching the CR95HF antenna to the M24LR board's antenna, you should wait a few seconds so that the C15 (4.7uF) capacitor has time to fully charge.
Best regards.

alkatatod
Associate

Hello, 

Thank you for your reply.

I was able to solve this problem by tweaking the configuration byte to a different value, suitable for my application. Details of it can be found in table 126 of the datasheet. For my application writing 0xF2 or 0xF3 to the configuration register worked (later found out that 0xF3 was the default value under the original firmware). 

I have a different problem though, with the PORsequence() of the CR95HF's board not being able to run properly. I am developing custom firmware based on the firmware provided in the supporting materials (STSW-M24LR007: Firmware for RF Transceiver Board of M24LR-Discovery-Kit). Each time I reset/supply power, the PORsequence() returns an error and therefore no communication is established. I've found this weird trick that if I change the interface from SPI to UART (in the drv_CR95HF.c file) and run it I enter an infinite loop. But then if I still keep the board connected to power and change the interface back to SPI and run it again, the PORsequence() returns success and the board successfully can communicate with the M24LR NFC tag.