<?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>watchdog with multiple channels fails on nrf52 using zephyr (ncs v1.2.0)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/65789/watchdog-with-multiple-channels-fails-on-nrf52-using-zephyr-ncs-v1-2-0</link><description>Hi, 
 
 I&amp;#39;m using Zephyr with nrf52 and want to setup watchdog support with multiple channels (different timer settings for separate different threads). 
 
 I can add 1 channel, but adding two, get&amp;#39;s me a fail, error. 
 This should not happen on the 52</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 22 Sep 2020 08:36:28 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/65789/watchdog-with-multiple-channels-fails-on-nrf52-using-zephyr-ncs-v1-2-0" /><item><title>RE: watchdog with multiple channels fails on nrf52 using zephyr (ncs v1.2.0)</title><link>https://devzone.nordicsemi.com/thread/270752?ContentTypeID=1</link><pubDate>Tue, 22 Sep 2020 08:36:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:deb44e58-f11b-4efb-bbe1-94b55f722837</guid><dc:creator>Johan</dc:creator><description>&lt;p&gt;Yes sure.&amp;nbsp;&lt;br /&gt;I got it working with more channels now, due to not trying to change the timer for next channel. Thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog with multiple channels fails on nrf52 using zephyr (ncs v1.2.0)</title><link>https://devzone.nordicsemi.com/thread/270747?ContentTypeID=1</link><pubDate>Tue, 22 Sep 2020 07:56:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b314556-d130-4cbc-af62-d876df69642d</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;This is unfortunately not possible, if you look in &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fps_nrf52840%2Fwdt.html&amp;amp;cp=4_0_0_5_35"&gt;the infocenter&lt;/a&gt;&amp;nbsp;you can see that the nRF52840 only has one watchdog, with only one CRV register and counter. This is taken into account in Zephyr and if you try to configure different timeouts for different channels, it will fail in&amp;nbsp;&lt;em&gt;zephyr\drivers\watchdog\wdt_nrfx.c--&amp;gt;wdt_nrf_install_timeout(&lt;span&gt;)&lt;/span&gt;&lt;/em&gt;&lt;span&gt;:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;	if (get_dev_data(dev)-&amp;gt;m_allocated_channels == 0U) {
        .
        .
    // If choosing different timeouts
	} else if (cfg-&amp;gt;window.max != get_dev_data(dev)-&amp;gt;m_timeout) {
		return -EINVAL;
	}&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog with multiple channels fails on nrf52 using zephyr (ncs v1.2.0)</title><link>https://devzone.nordicsemi.com/thread/270163?ContentTypeID=1</link><pubDate>Thu, 17 Sep 2020 16:28:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68d51adc-1e35-43ba-83a3-5e08cf1c4780</guid><dc:creator>Johan</dc:creator><description>&lt;p&gt;Ok, I see you do set the same timeout for the different timers.&lt;br /&gt;I want different timeouts for each channel.&lt;br /&gt;We have different threads, with different challenges, thus different timeouts.&lt;/p&gt;
&lt;p&gt;Sure worst case would be to use the longest needed timeout for every thread, if there can only be one setting for all timers. That would be strange though.&lt;/p&gt;
&lt;p&gt;I might be misunderstanding the usage of channels for the watchdog. Can you explain what is the purpose of channels?&lt;/p&gt;
&lt;p&gt;In my brain, I&amp;#39;m thinking, setting the wdt timeout, and it needs to be feed before it timeouts. One timer only exists, so any thread could reload the wdt. What is a channel I do not understand in this case, since there are not multiple wdt-timers.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Johan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: watchdog with multiple channels fails on nrf52 using zephyr (ncs v1.2.0)</title><link>https://devzone.nordicsemi.com/thread/269141?ContentTypeID=1</link><pubDate>Fri, 11 Sep 2020 11:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da08e83a-cfcb-4ae1-b67b-ad40b82b4526</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I tested this with an nRF52840 DK (I don&amp;#39;t have an nRF52832 DK available at the moment) and was able to make it work with NCS v1.2.0. I added two channels and configured the timeout to 1 second. In the sample I uploaded, the chip will reset after a second, since only one of the reload registers are fed.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-b054545a06a246efad5cb3ad4c5b6d97/watchdog.7z"&gt;devzone.nordicsemi.com/.../watchdog.7z&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>