<?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>Timer1 max value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21908/timer1-max-value</link><description>Hello, 
 I&amp;#39;m working on nrf52832-DK with SDK11 on Timer1. I can&amp;#39;t use TIMER0 because I&amp;#39;m using also the softdevice. 
 My code source is : 
 //handler
void timer_led_event_handler(nrf_timer_event_t event_type, void* p_context)
{
 
 switch(event_type</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 May 2017 14:52:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21908/timer1-max-value" /><item><title>RE: Timer1 max value</title><link>https://devzone.nordicsemi.com/thread/86023?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 14:52:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:31c5623b-ce8d-4042-9769-a2b6967295ab</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Yes, on the NRF52 all TIMERs can be 32-bit.&lt;/p&gt;
&lt;p&gt;How does your &lt;code&gt;nrf_drv_config.h&lt;/code&gt; file look like?&lt;/p&gt;
&lt;p&gt;Try to config it like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;    #define TIMER1_ENABLED 1

    #if (TIMER1_ENABLED == 1)
    #define TIMER1_CONFIG_FREQUENCY    NRF_TIMER_FREQ_16MHz
    #define TIMER1_CONFIG_MODE         TIMER_MODE_MODE_Timer
    #define TIMER1_CONFIG_BIT_WIDTH    TIMER_BITMODE_BITMODE_32Bit
    #define TIMER1_CONFIG_IRQ_PRIORITY APP_IRQ_PRIORITY_LOW
    
    #define TIMER1_INSTANCE_INDEX      (TIMER0_ENABLED)
    #endif
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 max value</title><link>https://devzone.nordicsemi.com/thread/86022?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 14:16:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c46842b-5f07-472c-9ce9-9a15610c112a</guid><dc:creator>Nabil</dc:creator><description>&lt;p&gt;Yes, If I set a pin after 5000us it doesn&amp;#39;t work. My pin is set after 5000-4097us = 903us.&lt;/p&gt;
&lt;p&gt;Timer0 can be also 32 bit ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Timer1 max value</title><link>https://devzone.nordicsemi.com/thread/86021?ContentTypeID=1</link><pubDate>Tue, 09 May 2017 14:05:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:578da813-cbee-4f1e-9118-bec595a388d6</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The TIMER BITMODE can be set to 32Bit(= max value 4294967295). What do you mean by &amp;quot;But my timer restart at the value of 4097&amp;quot; ? 4097 µs ?&lt;/p&gt;
&lt;p&gt;When you set the &lt;code&gt;time_us&lt;/code&gt; to 5000 the TIMER compare register value will be 0x00013880(=80000), and with a prescaler value of 1, the TIMER frequency will be 16MHz / 2^PRESCALER = 16MHz. You will generate event every 80000/16MHz = 0,005 s = 5000 µs&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>