I know that nrf51822 is not supported system tick handler ? I need system tick function. How can i make system tick function for nrf51822?
I know that nrf51822 is not supported system tick handler ? I need system tick function. How can i make system tick function for nrf51822?
I have posted some code in my answer to this thread. It implements a 1 ms tick using RTC1. Maybe this will meet your needs.
**[comprehension-question-timer](devzone.nordicsemi.com/.../comprehension-question-timer)**
I have posted some code in my answer to this thread. It implements a 1 ms tick using RTC1. Maybe this will meet your needs.
**[comprehension-question-timer](devzone.nordicsemi.com/.../comprehension-question-timer)**
Thank you for your code. I will check the code.
Thank you for your code. I will check the code.
@Philip As you inform to me, I saw RTC1_ms_timer.c registering on thread that you link. but, I don't have head file, nRF51_PF_Lib.h. Is this header same as nrf51.h file?
Altough I replace nrf51_PF_Lib.h to nrf51.h, the compiler don't find follow define variables : CLOCK_LFCLKSRC_SRC_RC, CLOCK_LFCLKSRC_SRC_Pos, RTC_EVTENSET_TICK_Enabled, RTC_EVTENSET_TICK_Pos, RTC_INTENSET_TICK_Enabled and RTC_INTENSET_TICK_Pos.
Where can these be finded?
@Philip As you inform to me, I saw RTC1_ms_timer.c registering on thread that you link. but, I don't have head file, nRF51_PF_Lib.h. Is this header same as nrf51.h file?
Altough I replace nrf51_PF_Lib.h to nrf51.h, the compiler don't find follow define variables : CLOCK_LFCLKSRC_SRC_RC, CLOCK_LFCLKSRC_SRC_Pos, RTC_EVTENSET_TICK_Enabled, RTC_EVTENSET_TICK_Pos, RTC_INTENSET_TICK_Enabled and RTC_INTENSET_TICK_Pos.
Where can these be finded?
Do not replace nrf51.h , you need it.
Replace the #include "nrf51_PF_Lib.h" with this:
extern uint32_t RTC1_Milliseconds; extern uint32_t RTC1_Seconds;