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?
@Ole As you are comment, I have to 16Mhz osc for accurate 1ms tick. currently, my system is using a system clock 16MHz. For using RTC1, Is the system clock set 32.768KHz?
@Ole As you are comment, I have to 16Mhz osc for accurate 1ms tick. currently, my system is using a system clock 16MHz. For using RTC1, Is the system clock set 32.768KHz?
I'm not quite sure I understand your question correctly, but no matter what clock source you use, the MCU will run on 16 MHz. Could you perhaps explain a little more if you have further questions?
@Ole I'm sorry for making a confusion to you. I made code like to below for using 16Mhz system clock.
/* Start 16 MHz crystal oscillator */ NRF_CLOCK->EVENTS_HFCLKSTARTED = 0; NRF_CLOCK->TASKS_HFCLKSTART = 1;
/* Wait for the external oscillator to start up */
while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)
{
}
NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
after this routine, I would like to configure 1ms tick timer. I think that the 1ms tick timer seem to be made using timer interrupt(timerX_IRQn). So, Can I make the tick timer using 32.768Hz with system clock 16MHz? If this is possible, How can I make code?
I look forward to wait for your detailed guide.
@Ole I'm sorry for making a confusion to you. I made code like to below for using 16Mhz system clock.
/* Start 16 MHz crystal oscillator */ NRF_CLOCK->EVENTS_HFCLKSTARTED = 0; NRF_CLOCK->TASKS_HFCLKSTART = 1;
/* Wait for the external oscillator to start up */
while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0)
{
}
NRF_CLOCK->EVENTS_HFCLKSTARTED = 0;
after this routine, I would like to configure 1ms tick timer. I think that the 1ms tick timer seem to be made using timer interrupt(timerX_IRQn). So, Can I make the tick timer using 32.768Hz with system clock 16MHz? If this is possible, How can I make code?
I look forward to wait for your detailed guide.