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

identifier "TIMER0_INSTANCE_INDEX" is undefined

im trying to use nrf_drv_timer_t with timer0 but I get identifier "TIMER0_INSTANCE_INDEX" is undefined error. TIMER0_INSTANCE_INDEX is defined in nrf_drv_config but this file contain #if (TIMER0_ENABLED == 1) . shoudl I explicitly declare TIMER0_ENABLED == 1 and where

Parents
  • Hi Makouda,

    When adding the timer module to your project, the timer must be enabled in using TIMER0_ENABLED as you suggest. All of these configuration options for the nRF HAL are located in nrf_drv_config.h which is found in the SDK in components/drivers_nrf/config. If you are using Keil and the Packs architecture it should be located in your project's RTE folder in nRF_Drivers//config.

    In this config file, you can set TIMER0_ENABLED to 1 which will enable this timer instance. This is true for any other driver you wish to enable on your system.

    Hope this helps,

    Eric

Reply
  • Hi Makouda,

    When adding the timer module to your project, the timer must be enabled in using TIMER0_ENABLED as you suggest. All of these configuration options for the nRF HAL are located in nrf_drv_config.h which is found in the SDK in components/drivers_nrf/config. If you are using Keil and the Packs architecture it should be located in your project's RTE folder in nRF_Drivers//config.

    In this config file, you can set TIMER0_ENABLED to 1 which will enable this timer instance. This is true for any other driver you wish to enable on your system.

    Hope this helps,

    Eric

Children
Related