This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I am working with nrf52840

Dear team ,

             i am working on ble_app_lbs_nus_c   project when in this project try to add  nrfx_timer.c file 

 we got an error like this. 

Building ‘ble_app_lbs_nus_c_pca10056_s140’ from solution ‘ble_app_lbs_nus_c_pca10056_s140’ in configuration ‘Debug’
Compiling ‘main.c’
nrfx.h
nrf_gpio.h
boards.h
main.c
'NRFX_TIMER0_INST_IDX' undeclared here (not in a function); did you mean 'NRFX_TIMER_INSTANCE'?
in definition of macro 'NRFX_CONCAT_3_'
in expansion of macro 'NRFX_CONCAT_3'
in expansion of macro 'NRFX_TIMER_INSTANCE'
in expansion of macro 'NRF_DRV_TIMER_INSTANCE'
passing argument 1 of 'channel_survey_get_report_event' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
main.c
expected 'ble_gap_evt_qos_channel_survey_report_t *' {aka 'struct <anonymous> *'} but argument is of type 'const ble_gap_evt_qos_channel_survey_report_t *' {aka 'const struct <anonymous> *'}
passing argument 3 of 'sd_ble_cfg_set' makes integer from pointer without a cast [-Wint-conversion]
nrf_mbr.h
app_util.h
nrf_section_iter.h
nrf_sdh.h
main.c
expected 'uint32_t' {aka 'unsigned int'} but argument is of type 'uint32_t *' {aka 'unsigned int *'}
in definition of macro 'SVCALL'
implicit declaration of function 'saadc_sampling_event_enable'; did you mean 'saadc_sampling_event_init'? [-Wimplicit-function-declaration]
Compiling ‘SEGGER_RTT_Syscalls_SES.c’
Compiling ‘SEGGER_RTT.c’
Compiling ‘SEGGER_RTT_printf.c’
Compiling ‘ble_advertising.c’
Compiling ‘ble_advdata.c’
Build failed

  • Hello,

    Please make sure that you are not leaving the legacy TIMER_ENABLED defined in your sdk_config, if you intend to use the nrfx_timer driver.
    If you leave a legacy *_ENABLED defined (it is not enough to define it to 0, it will then still be defined) in the sdk_config, then the apply_old_config.c file will overwrite it when you try to compile.
    Could you confirm that you only have NRFX_TIMER_ENABLED 1 defined in your sdk_config.h, and that TIMER_ENABLED is not defined at all in sdk_config?

    If you already have made sure that only NRFX_TIMER_ENABLED 1 is defined, then please share the code in which you instanciate and initialize timer for use.

    Best regards,
    Karl

Related