Troubles entering WakeUp mode on ST25R3917
Hello,
I'm building a proprietary NFC reader based on ST25R3917 chip and STM32F070CBT6 MCU. I use Bare Metal approach without any HAL or RFAL which might complicate my query a bit but I'll try to ask anyway. So far I'm able to Poll Type A and Type B cards, carry APDU over higher protocol layer etc without any issues. What I'm struggling with is switching over to WakeUp mode to save power.
Below is a log of i2c communication from none-eabi-gdb. << represents a flow to the reader:
<< Direct Command: 0xc0
<< Address: 0x0, Data: {0x0, 0x80, 0x0}
<< Address: 0x16, Data: {0x6e, 0x9f, 0xff, 0xff}
<< Address: 0x10, Data: {0x7, 0x0}
<< Address: 0x13, Data: {0x21, 0x1b}
<< Address: 0x2, Data: {0x80}
<< Direct Command: 0xd3
<< Address: 0x34, Data: {0x63}
<< Address: 0x33, Data: {0x32, 0x30}
<< Address: 0x32, Data: {0x38, 0x34}
<< Address: 0x2, Data: {0x4}
<< Address: 0x16, Data: {0xff, 0xff, 0xfb, 0xff}
Basically I follow AN5320 wanting to implement Amplitude measurement. I turn on some basic settings, wait for the oscillator to stabilize, after I_osc interrupt happens I send Direct command: Measure amplitude which produces RF puls very similar to the one in Figure 12 in Application Note. Then I read the measured value from AD converter which hovers around 100 in decimal, save it to Amplitude measurement reference register 34h. After that I set up Wake Up parameters in registers 33h nad 32h (no averaging), turn off oscillator, set up wu bit in Operation control register 02h, disable every other IRQ but wam in 16h-19h. And then nothing happens. No other pulse is generated. No interrupt comes.
Out of curiosity I also tried to set up wto bit in Wake-up timer control register 32h and it's corresponding IRQ. That actually produced periodic interrupts so I believe that Low-power wake-up generator does it's magic. The RF part however seems to do nothing at all.
Any idea what I'm doing wrong? Thanks in advance!


