Re: [Amforth] AVR8 watchdog (reset and interrupt) atmega328p

2017-05-02 Thread Matthias Trute
Hi Tristan, > > > > It would be a great contribution for the cookbook. Esp if it works > > with > > Forth code. > This made me think that writing 4 or 5 assembler words was not the > best way. Instead, have one assembler word wd! to perform the timed > write to WDTCSR and then have forth words fo

Re: [Amforth] AVR8 watchdog (reset and interrupt) atmega328p

2017-05-02 Thread Tristan Williams
Hello Matthias, > IIRC only the "disable watchdog" sequence is timing critical (the > 4 cpu cycles you mention). All other tasks can be performed at > lower speed, so a forth implementation should be fine. My atmega328p seems to require any change to WDTCSR to be completed within 4 cycles (I have