# reboot netarm

**URL:** <https://forums.digi.com/t/reboot-netarm/5282>\
**Category:** NET+OS\
**Created:** [June 28, 2004, 4:37pm UTC](https://forums.digi.com/t/reboot-netarm/5282 "2004-06-28T16:37:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![mfan](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mfan](https://forums.digi.com/u/mfan)\
**Post date:** [June 28, 2004, 4:37pm UTC](https://forums.digi.com/t/reboot-netarm/5282/1 "2004-06-28T16:37:37Z")

</div>

How can I programmatically reboot a NETARM device? Cheers, Minlin

---

<div class="post-metadata">

**Author:** ![mfan](https://avatars.discourse-cdn.com/v4/letter/m/c57346/32.png) [@mfan](https://forums.digi.com/u/mfan)\
**Post date:** [June 29, 2004, 9:13am UTC](https://forums.digi.com/t/reboot-netarm/5282/2 "2004-06-29T09:13:23Z")

</div>

I am replying myself just in case others might need to know. I found out NETOS6 has a API function “customizeReset” that will do it.

---

<div class="post-metadata">

**Author:** ![Jesper](https://avatars.discourse-cdn.com/v4/letter/j/49beb7/32.png) [@Jesper](https://forums.digi.com/u/Jesper)\
**Post date:** [July 29, 2004, 11:28am UTC](https://forums.digi.com/t/reboot-netarm/5282/3 "2004-07-29T11:28:09Z")

</div>

The actual way that the default customizeReset is to enable the watchdog and configure it to generate a hardware reset so if your program uses the watchdog and “feeds” it this routine will probably not generate a reset. Note also that the default watchdog-timeout configured by this routine is the maximum so the actual reset will no be generated for 2^25/FXTALE seconds which should be taken into account.

---

<div class="post-metadata">

**Author:** ![compie](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@compie](https://forums.digi.com/u/compie)\
**Post date:** [September 28, 2007, 11:48am UTC](https://forums.digi.com/t/reboot-netarm/5282/4 "2007-09-28T11:48:20Z")

</div>

How can I set the watchdog-timeout to 1 second so that customizeReset immediately resets the unit?

Currently when I call customizeReset() nothing happens.

I found this code, but I don’t understand it:

```
	narm_write_reg(NARM_GSCR_REG, NARM_GSCR_ADDR, swt, 2); /* time out period is (2**24)/F_XTAL */
	narm_write_reg(NARM_GSCR_REG, NARM_GSCR_ADDR, swri, 2); /* program watch dog to create reset*/
	narm_write_reg(NARM_GSCR_REG, NARM_GSCR_ADDR, swe, 1); /* enable the watchdog timer circuit*/

```

---

<div class="post-metadata">

**Author:** ![compie](https://avatars.discourse-cdn.com/v4/letter/c/4af34b/32.png) [@compie](https://forums.digi.com/u/compie)\
**Post date:** [October 16, 2007, 11:43am UTC](https://forums.digi.com/t/reboot-netarm/5282/5 "2007-10-16T11:43:29Z")

</div>

I managed to reboot the unit with the following code:

#include “gpiomux\_def.h”

#define NOT\_USED 0  
#define DELAY\_BEFORE\_RESET (2\*NABspTicksPerSecond)

static TX\_TIMER resetTimer;

static void reset(ULONG notUsed)  
{  
NA\_UNUSED\_PARAM(notUsed);  
customizeReset(); /\* reset\*/  
}

tx\_timer\_create (&resetTimer, “Reset Timer”, reset, NOT\_USED, DELAY\_BEFORE\_RESET, NOT\_USED, TX\_AUTO\_ACTIVATE);
