<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Timer change interval</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/5378/timer-change-interval</link><description>Hello! How can I dynamically change timer interval by the button, without using PPI?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 01 Feb 2015 20:36:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/5378/timer-change-interval" /><item><title>RE: Timer change interval</title><link>https://devzone.nordicsemi.com/thread/18785?ContentTypeID=1</link><pubDate>Sun, 01 Feb 2015 20:36:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5a0163dd-4fcd-4847-a54c-b6bf5d19969c</guid><dc:creator>bishop</dc:creator><description>&lt;p&gt;I understood.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void timer0_init(void)
{
    NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED = 0;
    NRF_CLOCK-&amp;gt;TASKS_HFCLKSTART    = 1;

    while (NRF_CLOCK-&amp;gt;EVENTS_HFCLKSTARTED == 0) 
    {}
    pTimer-&amp;gt;TASKS_CLEAR = 1;
    pTimer-&amp;gt;PRESCALER = 4;
    pTimer-&amp;gt;CC[0]     = 100;
    pTimer-&amp;gt;MODE      = TIMER_MODE_MODE_Timer;
    pTimer-&amp;gt;BITMODE   = TIMER_BITMODE_BITMODE_24Bit;
    pTimer-&amp;gt;SHORTS    = (TIMER_SHORTS_COMPARE0_CLEAR_Enabled &amp;lt;&amp;lt; TIMER_SHORTS_COMPARE0_CLEAR_Pos);
    pTimer-&amp;gt;INTENSET = (TIMER_INTENSET_COMPARE0_Enabled &amp;lt;&amp;lt; TIMER_INTENSET_COMPARE0_Pos);

    NVIC_EnableIRQ(TIMER0_IRQn);
    __enable_irq();
    pTimer-&amp;gt;TASKS_START = 1;
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And just need to change &lt;strong&gt;pTimer-&amp;gt;CC[n]&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>