[En-Nut-Discussion] big .bss/.data and wdt fuse

Dusan Ferbas dferbas at dfsoft.cz
Tue Jan 11 16:57:12 CET 2005


Hi Przemyslaw,

if you do not want to have watchdog switched on during power up you can use 
following WinAVR macros:

         wdt_enable (WDTO_2S); //setup watchdog for 2s
...

         while (1)
         {
                 wdt_reset(); // reset watchdog
         ...
         }


>From: Przemyslaw Rudy <prudy at audiotech.pl>
>
>Hi
>I should probably go with this question to avr-gcc list, but maybe you
>have already faced similar problem.
>Correct me if I am wrong, but:
>1. The .bss and .data are put in RAM when system starts
>2. When wdt fuse is programmed, watchdog is active since power-on
>
>If the .bss and .data are big enough (about 18k in my case) the system
>hangs just after power-on. It looks like the init code, that handles
>setting .bss/.data into the RAM, does not care about the watchdog reset.
>If this is the case, an obvious solution is to decrease .data by moving
>some to .pogmem area. But what if this is not possible and wdt fuse is
>required?
>
>Regards
>Przemek

Dusan 




More information about the En-Nut-Discussion mailing list