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

Upgrade to the nrfx API (SDK V15)

Hello,

I am using the NRF52-DK softdevice 6.0.0 and NRF SDK 15.0.
The app is based on on the ble_app_template PCA10040e S112 (The final chip will be a NRF52810 that's why I use the PCA10040e.)

I am trying to conform to the new nrfX module (compare to the previous nrf module).
Based on a clean ble_app_template  my aim is to run a timer + PPI.

I want to add static const nrfx_timer_t m_timer1 = NRFX_TIMER_INSTANCE(1); in my main.c
(previously it was : static const nrf_drv_timer_t m_timer1 = NRF_DRV_TIMER_INSTANCE(1);)

in sdk_config.h I then setup :
#define NRFX_TIMER_ENABLED 1
#define NRFX_TIMER1_ENABLED 1

I then add the nrfx_timer.c to "nrF driver" folder
I Add #include "nrfx_timer.h" in the main.c

If I compile, I have the following issue :
'NRFX_TIMER1_INST_IDX' undeclared here (not in a function)

If I go to the nrfx_timer.h NRFX_CHECK(NRFX_TIMER1_ENABLED) is not recognized and then that's why NRFX_TIMER1_INST_IDX, is not enumerated.

I do not understand why as I previously defined NRFX_TIMER_ENABLED 1 in the sdk_config.hI tried to clean the all project and build it again without success.Could you please explain me what is my mistake?Thanks

Related