[En-Nut-Discussion] Storing Uservalues

Ole Reinhardt ole.reinhardt at kernelconcepts.de
Tue Sep 28 12:20:41 CEST 2004


Hi Gerd,

> thank you, but how do I define or find spare space in the eeprom? And
> how can I reboot the device via software?

Spare space should be available from address 0x0200 (perhaps also below.
Don't know exactly how much NutOS needs for it's own purpose.)

Reboot:

void reboot(void)
{
        cli();
        wdt_reset();
        wdt_enable(1);
        while(1);
}

This will stop interrupts, clear and enable the watchdog with the
shortest possible time and enter an endless loop. If the watchdog is not
resettet after the configured time it will hardreset the ATMega.

If you have other hardware on your board you'll perhaps need to trigger
a reset signal in you startup code.

Regards,

Ole Reinhardt

-- 
kernel concepts    Tel: +49-271-771091-14
Dreisbachstr. 24   Fax: +49-271-771091-19
D-57250 Netphen    E+ : +49-177-7420433
--





More information about the En-Nut-Discussion mailing list