cancel
Showing results for 
Search instead for 
Did you mean: 

SPIRIT1. Entering and Exiting LDCR mode on the receiver RF module.

RrW1
Associate III

Hello,

What is the best way to utilize the sleep state/low power feature of the SPIRIT1 device? I am using two SPIRIT1 modules (one as a transmitter and one as a receiver). The receiver will be powered by a small battery and I would like the receiver to be in its sleep state when a signal is not sent by the transmitter.

The most applicable scenario to the project is in section 1.1.1 RX Timeout Using Sync Detection of AN4193 (https://www.st.com/content/ccc/resource/technical/document/application_note/47/50/91/3a/f5/fd/4d/c1/DM00068699.pdf/files/DM00068699.pdf/jcr:content/translations/en.DM00068699.pdf).

I have attempted programming the receiver as suggested in section 2 Programming Tips of AN4193. I configured the LDC cycle time by writing to the LDC_PRESCALER field (register 0x55) and LDC_COUNTER field (register 0x56) within the TIMER registers, configured the RX timeout value by writing to the RX_TIMEOUT_COUNTER (register 0x54) and RX_TIMEOUT_PRESCALER (register 0x53) fields within the TIMER registers.

I also configured the LDCR cycle by writing to the LDC_RELOAD_COUNTER and LDC_RELOAD_PRESCALER registers but the receiver does not wake up from its sleep cycle after the first data was transmitted from the transmitter.

I was also reading the SPIRIT1 Datasheet (https://www.st.com/resource/en/datasheet/spirit1.pdf) and there is a brief procedure on page 37 regarding operating the receiver in sleep mode but I do not understand how the device wakes up from sleep mode on the RX_DATA_READY interrupt.

Are there also any prerequisites on the transmitter side so that the receiver can operate in low power mode effectively? (I also modified the interrupt so that the RX data ready condition, Sync word detected condition, and Wake-up timeout in LDCR mode condition would generate interrupts by writing to the IRQ_MASK registers (0x92 and 0x93) )

-------------------------

Regarding the code that I am using, I based it off the P2P example project provided by ST. It was found under <User>/STM32Cube/Repository/STM32Cube_FW_L4_V1.15.1/Projects/B-L475E-IOT01A/Applications/SubGhz. The current project is ran on a custom PCB carrying an STM32F303K8Tx connected to the Spirit1. However, prior to this, I was using the B-L475E-IOT01A as it already has an integrated RF module.

-------------------------

Any help would be greatly appreciated. Thank you in advance!

1 REPLY 1
RrW1
Associate III

Update: I have successfully configured the receiver in LDCR mode and exiting the LDCR mode. I disabled LDC (sleep) mode by writing the bit 0 into the LDC_MODE field of the PROTOCOL[2] register and then transitioning the SPIRIT1 device into READY state upon each RX_DATA_READY interrupt. As for enabling the LDCR mode, I had to configure the Wakeup timer (registers 0x55, 0x56), the Rx timeout (registers 0x53, 0x54), and enabling the LDC mode every time the receiver receives data (configurations done prior to the state transition to the RX state).

This method has issues - the receiver could only receive data at certain timeframes. I set the RX timeout to 2 seconds and the wakeup timer to 1 second. I utilized a user LED to observe the state transitions (flashes when the SPIRIT1 is not in its SLEEP state, and disabled/off when SPIRIT1 is in its SLEEP state). The light blinks every 4 seconds (with the pattern: 1st second - on, 2nd second - off, 3rd second - off, 4th second - off). I noticed that the signal is received correctly from the transmitter when received on the 3rd, 4th, and 1st second (fails when data is transmitted exactly after the 1st second till the end of the 2nd second).

I have been reading on automatically reloading the wake-up timer at the time the SYNC is received, but I do not understand how to achieve this. I have tried configuring the LDC_RELOAD_PRESCALER and LDC_RELOAD_COUNTER values (registers 0x57, 0x58), and activating LDC_RELOAD_ON_SYNC in PROTOCOL[1] but it does not resolve the issue. Is there a method to wake up the device properly when the receiver is still in its SLEEP state? Any help would be greatly appreciated.

Thank you!

0693W000001pqCPQAY.png