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

Why counter of timer not repeat

Hi all , I using timer 0 to count from 0 to max value 32bit . In my code : 

    while (1)
    {
					NRF_TIMER0->TASKS_CAPTURE[1] = 1;	
					counter = NRF_TIMER0->CC[1];
					if(counter==100000)
					{
						nrf_gpio_pin_toggle(LED_1);
					}
	}

If I using NRF_TIMER0->TASKS_CAPTURE[1] = 1; for save counter value to CC register . It run once time and don't reset to 0 after overflow . If I using NRF_TIMER0->TASKS_CLEAR = 1; counter will be 0 . Why not reset to 0 ? Please explain to me . Thank

Related