<?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>[NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/77931/nrf-sdk-17-trooble-with-app_timer-when-migrate-from-sdk-16-to-17</link><description>Hi, 
 I have an issue when I migrate my app from nrf52 sdk v16 to v17. 
 I have setup an app with an uart communication, an app timer and a watchdog. All off these (uart and timer) have an irq priority set to 6. 
 All works fine in sdk 16 but when I try</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 03 Aug 2021 14:23:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/77931/nrf-sdk-17-trooble-with-app_timer-when-migrate-from-sdk-16-to-17" /><item><title>RE: [NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/thread/323145?ContentTypeID=1</link><pubDate>Tue, 03 Aug 2021 14:23:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3ae12be-eea4-4a8d-b792-109fa5a9cb17</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I see that you have mixed configs in the posted snippet (NRFX configs and legacy nrf_drv configs). If you have the legacy configs defined (regardless of whether they are set to 1 or 0), the NRFX configs will be overwritten in apply_old_config.h.&lt;/p&gt;
&lt;p&gt;Can you post the full project for us to reproduce and debug this issue?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/thread/322824?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 10:02:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c630d781-481f-4112-8365-6d4ce1af826c</guid><dc:creator>neicureuil</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I have remove the ampersand reference but the same issue appear.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When I don&amp;#39;t use WDT, all works fine but when I use it (only init it, not feed it =&amp;gt; to try if its works if its never feed) my timer never create an interrupt and the WDT never reboot the board or call the event function.&lt;/p&gt;
&lt;p&gt;All of my interrupt (WDT, timer and uart) have their irq priority set to 6.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Some of my WDT config in my sdk config :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;1=&amp;gt; Run in SLEEP, Pause in HALT
// &amp;lt;8=&amp;gt; Pause in SLEEP, Run in HALT
// &amp;lt;9=&amp;gt; Run in SLEEP and HALT
// &amp;lt;0=&amp;gt; Pause in SLEEP and HALT
#ifndef NRFX_WDT_CONFIG_BEHAVIOUR
#define NRFX_WDT_CONFIG_BEHAVIOUR 1
#endif


// &amp;lt;1=&amp;gt; Run in SLEEP, Pause in HALT
// &amp;lt;8=&amp;gt; Pause in SLEEP, Run in HALT
// &amp;lt;9=&amp;gt; Run in SLEEP and HALT
// &amp;lt;0=&amp;gt; Pause in SLEEP and HALT
#ifndef WDT_CONFIG_BEHAVIOUR
#define WDT_CONFIG_BEHAVIOUR 1
#endif


// &amp;lt;0=&amp;gt; Include WDT IRQ handling
// &amp;lt;1=&amp;gt; Remove WDT IRQ handling
#ifndef NRFX_WDT_CONFIG_NO_IRQ
#define NRFX_WDT_CONFIG_NO_IRQ 0
#endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/thread/322816?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 09:27:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b5da819e-f2f7-4cc1-bc00-5dbc75bdff31</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Please try to remove the ampersand reference from the event handler in the init function:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;uint32_t err = nrfx_wdt_init(&amp;amp;wdt_config, watdog_evt_handler);  &lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Also, make sure that&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__nrfx__wdt__config.html#gaeeb2020e1775bb931a298862d7fec64a"&gt;NRFX_WDT_CONFIG_NO_IRQ&lt;/a&gt;&amp;nbsp;is not set in your sdk_config.h file.&lt;/p&gt;
&lt;p&gt;Have you verified that the error codes returned from&amp;nbsp;nrfx_wdt_init() and&amp;nbsp;nrfx_wdt_channel_alloc() is NRF_SUCCESS/zero?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/thread/322803?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 08:29:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9ab7756-a8a4-4903-9962-766b3e46ad36</guid><dc:creator>neicureuil</dc:creator><description>&lt;p&gt;Hi, I have tried to update my watchdog code but it didn&amp;#39;t work anymore.&lt;/p&gt;
&lt;p&gt;My watchdog init without error but never be trigger even if i never feed it. (I never enter in the event handler function and the board never reboot)&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;quot;watchdog.h&amp;quot;

#include &amp;quot;nrfx_wdt.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;

// The watchdog timeout in seconds
#define WATCHDOG_TIMEOUT_S 30
// The watchdog channel
static nrfx_wdt_channel_id* wtd_channel;

// Watchdog event handler
void watdog_evt_handler(void)
{
  NRF_LOG_INFO(&amp;quot;WDT Evt&amp;quot;);
}

// Initialize the watch dog
void watchdog_init(void)
{
  nrfx_wdt_config_t wdt_config = NRFX_WDT_DEAFULT_CONFIG;
  uint32_t err = nrfx_wdt_init(&amp;amp;wdt_config, &amp;amp;watdog_evt_handler);  
  uint32_t err2 =nrfx_wdt_channel_alloc(wtd_channel);
  nrfx_wdt_enable();
  NRF_LOG_INFO(&amp;quot;Watchdog init %x - %x&amp;quot;, err, err2);
}

// Feed the watchdog
void watchdog_feed(void)
{
  nrfx_wdt_channel_feed(*wtd_channel);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/thread/322790?ContentTypeID=1</link><pubDate>Mon, 02 Aug 2021 07:30:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ac4f14f-268f-44a3-8279-adaa6f0f7a9c</guid><dc:creator>neicureuil</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I just saw that I&amp;#39;m not using the app_timer but the app_timer_mesh.c because I&amp;#39;m based on the sdk coexist example.&lt;/p&gt;
&lt;p&gt;The problem disappear when I remove the watch dog so I think its this that cause the issue.&lt;/p&gt;
&lt;p&gt;Is my watchdog specific code correct for sdk 17 and mesh sdk 5.0 ?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/thread/322464?ContentTypeID=1</link><pubDate>Thu, 29 Jul 2021 12:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd3603cf-0375-4b5a-83c3-273fe8348c6a</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The source file of app_timer_v2 uses a different name, app_timer2.c, while the old app_timer is named app_timer.c. You will also have additional &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/migration.html#migr_dfu_libs_app_timer"&gt;preprocessor symbols defined for APP_TIMER_V2&lt;/a&gt;&amp;nbsp;in the project.&lt;/p&gt;
&lt;p&gt;It would be helpful if you can debug the application to see if it gets stuck somewhere. That is the only reason I can think of that should cause this problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/thread/322144?ContentTypeID=1</link><pubDate>Wed, 28 Jul 2021 07:25:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52b34744-2cd3-42b1-be78-4395cc8e4e46</guid><dc:creator>neicureuil</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;How can I now which app_timer version I used ?&lt;/p&gt;
&lt;p&gt;Also, after few tests, Its seems to be the Watchdog that cause this issue but I don&amp;#39;t understand why.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: [NRF SDK 17] Trooble with app_timer when migrate from sdk 16 to 17</title><link>https://devzone.nordicsemi.com/thread/322081?ContentTypeID=1</link><pubDate>Tue, 27 Jul 2021 14:34:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e53b98e3-9d86-4b4f-b734-4d1b7b0e421c</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Have you debugged the application to see if it gets stuck somewhere?&lt;/p&gt;
&lt;p&gt;What is the clock configuration for the LFCLK?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you using app_timer_v2, or the old app_timer?&lt;/p&gt;
&lt;p&gt;Can you post the full project, for us to reproduce and debug this issue?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>