<?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>App timer problem in nRF 52832 bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21156/app-timer-problem-in-nrf-52832-bootloader</link><description>Hello, 
 I am working with the latest version of nRF52 SDK 13.0.0, when I was implementing my own bootloader application, I tried to start an app timer in my code to invert BSP_BOARD_LED_0. The initialization of lfclk and app timer was successful but</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Jan 2021 06:56:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21156/app-timer-problem-in-nrf-52832-bootloader" /><item><title>RE: App timer problem in nRF 52832 bootloader</title><link>https://devzone.nordicsemi.com/thread/288521?ContentTypeID=1</link><pubDate>Tue, 12 Jan 2021 06:56:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:766decc3-dae8-4dad-8f37-2573a42afe4f</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;ol&gt;
&lt;li&gt;&amp;nbsp;&lt;span style="font-family:monospace;"&gt;The original poster was making a custom bootloader where the bootloader example from our SDK was modified.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;As stated above, this was a custom bootloader, the unmodified bootloader example from our SDK does not require this fix. The answer I gave was that he should set&amp;nbsp;APP_TIMER_CONFIG_USE_SCHEDULER 0 because he did not have the code listed below in his main.c file.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Its hard to say whats going on without seeing the actual code.&amp;nbsp;&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App timer problem in nRF 52832 bootloader</title><link>https://devzone.nordicsemi.com/thread/281455?ContentTypeID=1</link><pubDate>Tue, 24 Nov 2020 08:24:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a88efa9d-7574-4651-a113-7a8bc269874d</guid><dc:creator>rananna</dc:creator><description>&lt;p&gt;&lt;span&gt;&amp;nbsp;I am&lt;/span&gt;&amp;nbsp;having the very same problem with my bootloader code not working with app_timer and was pulling my hair out trying to get it to work when I came across this older Post.&lt;/p&gt;
&lt;p&gt;I have some questions:&lt;/p&gt;
&lt;p&gt;1.&lt;span&gt;Could you please explain WHY this fix is needed. I do not understand why events are a problem with the bootloader example.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2. You seem to be suggesting to do contradictory things, first to disable scheduling in sdk_config, then enabling scheduling in the while loop? Which is it?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;3 I have an additional possibly related issue. I am trying to sense a pin state on entering bootloader and use app_timer to enter the bootloader after a few seconds if it remains pushed. When I call app_button_is_pushed the nrf52840 resets. If I call nrf_gpio_pin_read it works fine. What is happening?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App timer problem in nRF 52832 bootloader</title><link>https://devzone.nordicsemi.com/thread/82785?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 02:03:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:585c3a92-f60a-434e-8a6b-ea9cf273fda0</guid><dc:creator>Daniel</dc:creator><description>&lt;p&gt;Thanks, it works!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: App timer problem in nRF 52832 bootloader</title><link>https://devzone.nordicsemi.com/thread/82784?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2017 12:51:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d838ea21-26d2-4318-901a-31407fb11d72</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Daniel,&lt;/p&gt;
&lt;p&gt;you have to set the &lt;code&gt;APP_TIMER_CONFIG_USE_SCHEDULER&lt;/code&gt; in &lt;code&gt;sdk_config.h&lt;/code&gt; to 0, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#ifndef APP_TIMER_CONFIG_USE_SCHEDULER
#define APP_TIMER_CONFIG_USE_SCHEDULER 0
#endif
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you want to use the scheduler, then you have to define&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define SCHED_MAX_EVENT_DATA_SIZE       MAX(APP_TIMER_SCHED_EVENT_DATA_SIZE, 0)                
#define SCHED_QUEUE_SIZE                20           
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and initialize the scheduler in main()&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;APP_SCHED_INIT(SCHED_MAX_EVENT_DATA_SIZE, SCHED_QUEUE_SIZE);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and call app_sched_execute() in the infinite while loop, i.e.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;while(1)
{   
    app_sched_execute();
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Best regards&lt;/p&gt;
&lt;p&gt;Bjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>