Hi,
there are a few aspects to what you want to do:
- Please review AN5320, the last chapter talks about considerations when inductive wakeup is used together with AAT.
- The NFC06A1 does have varicaps. With this board you need to either use swTagDetect=true or increase the delta / use autoAvg to avoid false wake-ups due to varicap settling. Of course this will also decrease detection range. You can do so by changing discParam.wakeupConfig[Default].
- The software at hand defaults to swTagDetect=true with period 500ms. In this mode the ST25R3916 creates an interrupt every 500ms. MCU needs to execute rfalWorker() which triggers inductive measurements and evaluates the results.
For putting the MCU to some sleep/wait-for-interrupt mode you can place before the rfalWorker() the following pseudo-code:
if (RFAL_NFC_STATE_WAKEUP_MODE == rfalNfcGetState())
{
// Theoretically a race condition could occur but practially the time between starting and first interrupt is >10ms, default 500ms.
// ...... put MCU into some sleep mode
wfi();
// ...... put MCU back into normal mode
}
rfalWorker();
Such code would need to be added in both cases of swTagDetect =1 and =0 case. But the difference will be the expected time until wake-up event on the MCU and periodicity.
Regards, Ulysses