This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRFX_TIMER3_INST_IDX' undeclared here (not in a function);

I am trying to copy from this example:

    https://github.com/NordicPlayground/nRF52-ADC-examples/tree/master/ble_app_uart__saadc_timer_driven__scan_mode

but I get:

    ./nrf5_SDK_Current/modules/nrfx/drivers/include/nrfx_timer.h:72:39: error: 'NRFX_TIMER3_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_TIMER_INSTANCE'?

Looking through the form it sounds like in sdk_config.h you just have to enable NRFX_TIMER_ENABLED and NRF_TIMER3_ENABLED which I did but I still get the error.  What I'm wondering is how that example can compile when none of THEIR sdk_cnofig.h files have these timers enabled, either.  I checked their emProject files to see if it was defined in the project preprocessor options, but it doesn't appear to be so.

I'm using 17.0.2 and S140 targeting a nRF52840-DK but eventually moving to dongles.  I'm trying to merge some ADC readings into my existing BLE peripheral.

Parents Reply Children
  • Hello wz2b, 

    wz2b said:
    would you still use the PPI even if you want VERY slow samples, for example once a minute?

    In general, yes, I would.
    PPI lets you initiate peripherals' tasks without CPU intervention. This is very useful, since it lets the CPU continue doing other things / being in a low-power state while the task is triggered. It also ensures that the triggering of the task will happen when the event occur, rather then when the CPU is free to process the event.
    As you may know, the SoftDevice takes priority over any application-layer processes. Therefore, if you do not use PPI, the sampling may then be delayed until the SoftDevice releases the CPU.

    Best regards,
    Karl 

Related