Fatal error: app_timer.h: No such file or directory


Hi everyone

I’m new to particle and not much of an embedded guy, but I started using to prototype quickly in my company (using Argon right now).

I am trying to use an example from the nordic sdk for “wake on nfc” and it requires several includes, among which the following:

#include “app_timer.h”
#include “bsp.h”
#include “bsp_nfc.h”

If i hover over the import for app_timer.h, i get the following messsage:

#include errors detected. Please update your includePath. Squiggles are disabled for this translation unit (pathtomyproject/RealTime_mtof/src/test.ino).C/C++(1696), however if I cmd+click i can browse to it and i can see it’s located in the toolchain folder.

Any idea? Anyone else have experience with wake on nfc on particle?


The Particle device OS does not expose all nRF functions the SDK provides (unless you build a monolothic binary locally).

But Paticle has - at least some - alternative means to achieve what the missing APIs would otherwise provide. You’d just need to see what the example app intends with these calls and what the alternatives are.


I see. I did not see anything on the particle nfc documentation that seems to provide out of the box option to use “wake on nfc”. Are you aware of anyone having gotten this to work on particle?


Are you after NFC_EVENT_FIELD_ON? See the example below for usage OR this as an interrupt to wake from sleep?

 * Project nfc-demo
 * Description: Demonstration using NFC Features in Particle Device OS. The code is for tag emulation i.e. for NFC readers to consume.
#include "Particle.h"


static void nfcCallback(nfc_event_type_t type, nfc_event_t* event, void* context);

int counter = 0;
volatile bool updateCounter = true;
float battVoltage = 0.0;

void setup (void)
    while(!Serial.available()) delay(10);
    Serial.println("NFC example application");
    pinMode(D7, OUTPUT);
    digitalWrite(D7, 0);

void loop()
    if (updateCounter)
        updateCounter = false;
        battVoltage = 85.2;           //analogRead(BATT) * 0.0011224 / 3.7 * 100;

        char buf[64];
        snprintf(buf, sizeof(buf), "counter = %i Battery Level: %4.2f %c", ++counter, battVoltage, '%');

        NFC.setText(buf, "en");

        Serial.printlnf("next read should show: %s", buf);
//type is either of 3 cases, event is not used and neither is context
static void nfcCallback(nfc_event_type_t type, nfc_event_t* event, void* context)
    switch (type)
        case NFC_EVENT_FIELD_ON:
        digitalWrite(D7, 1);
        case NFC_EVENT_FIELD_OFF:
        digitalWrite(D7, 0);
        case NFC_EVENT_READ:
        updateCounter = true;


Wake on NFC is not supported at this time. It is a feature planned for the future, however, along with other sleep and wake modes.


This was my fear :frowning: I was hoping to use the nordic sdk to do this, but doesn’t seem possible unfortunately :frowning: at least no easily…