Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Timer HAL driver SDK15

Hi,

I am trying to run a simple LED blinking program using timer 0 using HAL library.

in functions such as 

  nrf_timer_bit_width_set (NRF_TIMER_Type *p_reg, nrf_timer_bit_width_t bit_width)

 

  nrf_timer_frequency_set (NRF_TIMER_Type *p_reg, nrf_timer_frequency_t frequency)

I tried passing the Timer 0 Memory location(mentioned in the nRF52 datasheet) to NRF_TIMER_Type, But I am getting the following error

main_timer.c(70): error: #167: argument of type "const NRF_TIMER_Type *" is incompatible with parameter of type "NRF_TIMER_Type *"
nrf_timer_mode_set(timer0_addr,NRF_TIMER_MODE_TIMER);

And the SDK documentation (Nordic info center) doesn't have any explanations for "NRF_TIMER_Type".

1. How to point the register structure? 

2. I tried finding the nrf_timer.c file, but couldn't find it, where are the HAL function routines?

Related