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

nrfx timer

Hi,

I have a problem with timer and nrfx. I use the migration guide:

So I remove the old configuration entries related to the nrf_drv_* drivers from my sdk_config.h and I enable *_ENABLED entry for a particular driver in sdk_config.h. But I still have an error when I try to build:

I didn't understand why so I searched on the internet, but there is no answer. I know thanks to Nordic that nrfx_timer_t is a Struct Reference, so maybe I need to declare this structure in nrf_drv_timer.h  Note that I work with the example "simple_timer", with sdk15.3 and my IDE is segger embedded.

if anyone could help me that would be nice.

Thanks

Parents
  • I am not sure I understand what you are trying to do. The example uses a library component that does use nrf_drv_timer.h, so it would seem normal that it breaks if you do not give it the definitions required for that file.

    ./components/libraries/simple_timer/

    If understanding the porting is your aim, you might just want to get rid of that component dependency in your project, copy the files (simple_timer_app.h and simple_timer_app.c) to your project directory and port them NOT to include nrv_drv_timer.h but to include nrfx_timer.h directly.

  • If i include nrfx_timer.h instead of nrf_drv_timer.h in the file app_simple_timer.c, this file doesn't compile because it depends of nrf_drv_timer_t. I tried to replace it with nrfx_timer_t but it's the same problem: unknown type name. I don't understand why the original example doesn't work.

Reply Children
Related