<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<div><br></div><div>Thanks for the reply. I changed the code as shown below but still WDT is not enabled.</div><div><br></div><div><span style="font-size: 12pt;">void start_wdt(void)</span></div><div><div>{</div><div><span class="Apple-tab-span" style="font-size: 12pt; white-space: pre;">     </span><span style="font-size: 12pt;">PM->APBCMASK.reg |= PM_APBAMASK_WDT;</span></div><div><span class="Apple-tab-span" style="white-space:pre">  </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>WDT->CTRL.bit.ENABLE = 0;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>while(WDT->STATUS.bit.SYNCBUSY == 1);</div><div><span class="Apple-tab-span" style="white-space:pre">     </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>WDT->CTRL.bit.ALWAYSON = 0;</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>while(WDT->STATUS.bit.SYNCBUSY == 1);</div><div><span class="Apple-tab-span" style="white-space:pre">     </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>GCLK->CLKCTRL.reg = (uint32_t)((GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK4 | (WDT_GCLK_ID << GCLK_CLKCTRL_ID_Pos)));</div><div><span class="Apple-tab-span" style="white-space:pre">       </span>while (GCLK->STATUS.bit.SYNCBUSY);</div><div><span class="Apple-tab-span" style="white-space:pre">        </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>WDT->CONFIG.bit.PER = 0x7;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>WDT->CTRL.bit.WEN = 0;</div><div><span class="Apple-tab-span" style="white-space:pre">    </span>while(WDT->STATUS.bit.SYNCBUSY == 1);</div><div><span class="Apple-tab-span" style="white-space:pre">     </span></div><div><span class="Apple-tab-span" style="white-space:pre">     </span>WDT->INTENSET.bit.EW = 0;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>WDT->CTRL.bit.ENABLE = 1;</div><div><span class="Apple-tab-span" style="white-space:pre"> </span>while(WDT->STATUS.bit.SYNCBUSY == 1);<span class="Apple-tab-span" style="font-size: 12pt; white-space: pre;"> </span></div><div><br></div><div><span class="Apple-tab-span" style="white-space:pre">    </span>return;</div><div>}</div><div><br></div><div><br></div><div>Thanks</div><div>Abdul</div><div><hr id="stopSpelling">Date: Tue, 21 Apr 2015 08:25:27 +0200<br>From: peter.kietzmann@haw-hamburg.de<br>To: users@riot-os.org<br>Subject: Re: [riot-users] enabling WDT on SAM R21<br><br>
  
    
  
  
    Hi Abdul,<br>
    <br>
    I haven't got a concrete answer for you but:<br>
    <br>
    Is the APBA clock for the WDT enabled in the power manager
    (APBAMASK  register)?<br>
    <br>
    Is the GCLK generic clock selection enabled (CLKCTRL register)?<br>
    <br>
    <br>
    Best,<br>
    Peter<br>
    <br>
    <br>
    <br>
    <div class="ecxmoz-cite-prefix">Am 21.04.2015 um 05:41 schrieb
      Abdulkhadar Abdulla:<br>
    </div>
    <blockquote cite="mid:BAY169-W45C8FF99385934BAFAB94D9BEF0@phx.gbl">
      
      <style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}

--></style>
      <div dir="ltr">Hi,
        <div><br>
        </div>
        <div>Can anybody help me in enabling the wdt sam r21? I tried
          the following code segment but didn't enable the WDT. Am I
          missing anything here?</div>
        <div><br>
        </div>
        <div>void start_wdt(void)</div>
        <div>{</div>
        <div>WDT->CONFIG.bit.PER = 0xB;</div>
        <div>WDT->CTRL.bit.WEN = 0;</div>
        <div>while(WDT->STATUS.bit.SYNCBUSY == 1);</div>
        <div>WDT->INTENSET.bit.EW = 0;</div>
        <div>WDT->CTRL.bit.ENABLE = 1;</div>
        <div>while(WDT->STATUS.bit.SYNCBUSY == 1);</div>
        <div>}<br>
          <br>
          and in the main loop, I used WDT->CLEAR.bit.CLEAR = 0xA5;
          to clear the WDT counter.</div>
        <div><br>
        </div>
        <div>Thanks</div>
        <div>Abdul<br>
          <div>
            <hr id="ecxstopSpelling">Date: Thu, 9 Apr 2015 10:19:27 +0200<br>
            From: <a class="ecxmoz-txt-link-abbreviated" href="mailto:hauke.petersen@fu-berlin.de">hauke.petersen@fu-berlin.de</a><br>
            To: <a class="ecxmoz-txt-link-abbreviated" href="mailto:users@riot-os.org">users@riot-os.org</a><br>
            Subject: Re: [riot-users] sixlowapp Ping not working in SAM
            R21<br>
            <br>
            hi,<br>
            <br>
            <div class="ecxmoz-cite-prefix">On 08.04.2015 09:15,
              Abdulkhadar Abdulla wrote:<br>
            </div>
            <blockquote cite="mid:BAY169-W71B17CF51D457ADF9E23759BFC0@phx.gbl">
              <style><!--
.ExternalClass .ecxhmmessage P {
padding:0px;
}

.ExternalClass body.ecxhmmessage {
font-size:12pt;
font-family:Calibri;
}


--></style>
              <div dir="ltr">Hi Oleg,
                <div><br>
                </div>
                <div>Thank you. </div>
                <div><br>
                </div>
                <div>Hi <span style="font-size:12pt;">Hauke,</span></div>
                <div><span style="font-size:12pt;"><br>
                  </span></div>
                <div>Can you please help me in this?</div>
              </div>
            </blockquote>
            I fear I can not really help, aside from telling you that I
            have just taken on the work to fix the radio driver. I hope
            I will be able to pull request a fixed version next week...<br>
            <br>
            Cheers,<br>
            Hauke<br>
            <br>
            <blockquote cite="mid:BAY169-W71B17CF51D457ADF9E23759BFC0@phx.gbl">
              <div dir="ltr">
                <div><br>
                </div>
                <div>Thanks</div>
                <div>Abdul<br>
                  <br>
                  <div>Date: Wed, 8 Apr 2015 09:02:22 +0200<br>
                    From: <a class="ecxmoz-txt-link-abbreviated" href="mailto:oliver.hahm@inria.fr">oliver.hahm@inria.fr</a><br>
                    To: <a class="ecxmoz-txt-link-abbreviated" href="mailto:users@riot-os.org">users@riot-os.org</a><br>
                    Subject: Re: [riot-users] sixlowapp Ping not working
                    in SAM R21<br>
                    <br>
                    <pre>Hi Abdul!
 
> I observed another problem, when using sixlowapp with SAM R21. I have 3 sam
> r21 boards. I flashed sixlowapp in all the boards. When I start the boards,
> one of the node freezes but other two nodes can exchange data using nc
> command. Any of you observed this problem before?
 
Just yesterday I learned that there is probably a bug in the SPI driver that
may cause this problem. Maybe Hauke can tell more about this issue.
 
Cheers,
Oleg
-- 
The great thing about SQL transaction jokes is that once you BEGIN, you can
ROLLBACK if nobody gets them.
</pre>
                    <br>
                    _______________________________________________
                    users mailing list <a class="ecxmoz-txt-link-abbreviated" href="mailto:users@riot-os.org">users@riot-os.org</a>
                    <a class="ecxmoz-txt-link-freetext" href="http://lists.riot-os.org/mailman/listinfo/users" target="_blank">http://lists.riot-os.org/mailman/listinfo/users</a></div>
                </div>
              </div>
              <br>
              <fieldset class="ecxmimeAttachmentHeader"></fieldset>
              <br>
              <pre>_______________________________________________
users mailing list
<a class="ecxmoz-txt-link-abbreviated" href="mailto:users@riot-os.org">users@riot-os.org</a>
<a class="ecxmoz-txt-link-freetext" href="http://lists.riot-os.org/mailman/listinfo/users" target="_blank">http://lists.riot-os.org/mailman/listinfo/users</a>
</pre>
            </blockquote>
            <br>
            <br>
            _______________________________________________
            users mailing list
            <a class="ecxmoz-txt-link-abbreviated" href="mailto:users@riot-os.org">users@riot-os.org</a>
            <a class="ecxmoz-txt-link-freetext" href="http://lists.riot-os.org/mailman/listinfo/users" target="_blank">http://lists.riot-os.org/mailman/listinfo/users</a></div>
        </div>
      </div>
      <br>
      <fieldset class="ecxmimeAttachmentHeader"></fieldset>
      <br>
      <pre>_______________________________________________
users mailing list
<a class="ecxmoz-txt-link-abbreviated" href="mailto:users@riot-os.org">users@riot-os.org</a>
<a class="ecxmoz-txt-link-freetext" href="http://lists.riot-os.org/mailman/listinfo/users" target="_blank">http://lists.riot-os.org/mailman/listinfo/users</a>
</pre>
    </blockquote>
    <br>
    <pre class="ecxmoz-signature">-- 
Peter Kietzmann

Hamburg University of Applied Sciences
Dept. Informatik, Internet Technologies Group
Berliner Tor 7, 20099 Hamburg, Germany
Fon: +49-40-42875-8426 
Web: <a class="ecxmoz-txt-link-freetext" href="http://www.haw-hamburg.de/inet" target="_blank">http://www.haw-hamburg.de/inet</a>
</pre>
  

<br>_______________________________________________
users mailing list
users@riot-os.org
http://lists.riot-os.org/mailman/listinfo/users</div></div>                                           </div></body>
</html>