[En-Nut-Discussion] Watchdog AT91SAM7X

Eric Haver havereric1 at gmail.com
Sat Mar 7 14:33:11 CET 2009


On Sat, Mar 7, 2009 at 7:05 AM, Jason Bourne <jucanpo at hotmail.com> wrote:

>
> Hi All,
>
>
>
> I am implementing the Watchdog for the AT91SAM7X but it does not work.
>
> I do not know what am I doing wrong?
>
>
>
> Thank you
>
>
>
> Juan
>
>
Ola  Juan,The SAM7X does not give you a second chance to program the DOG,
and NutOs "saves us" by disabling it in: crtst91sam7x256_rom.S around line
175

        ldr     r1, =WDT_BASE
        ldr     r0, =WDT_WDDIS
        str     r0, [r1, #WDT_MR_OFF]

Just comment that out and make sure to program the WatchDog within 16
Seconds to the value you want.
         long WDTime ;
         if ((WDTime=NutWatchDogStart(10000l, 0)) == 0)
              printf("Watchdog Problem\n");
         else
              printf("Watchdog set at %ld Seconds\n",WDTime/1000);

         NutWatchDogEnable();

Then feed your dog regularly with:

NutWatchDogRestart();


*E





_________________________________________________________________
> Windows Live™ Contacts: Organize your contact list.
>
> http://windowslive.com/connect/post/marcusatmicrosoft.spaces.live.com-Blog-cns!503D1D86EBB2B53C!2285.entry?ocid=TXT_TAGLM_WL_UGC_Contacts_032009
> _______________________________________________
> http://lists.egnite.de/mailman/listinfo/en-nut-discussion
>



More information about the En-Nut-Discussion mailing list