2004-06-21 10:41 PM
2004-06-14 10:55 PM
I have a problem with the watchdog and the eeprom.
the time max before a reset by watchdog is 2ms @ 8MHz with a ST7lite09. The time for write in eeprom is around 10ms. Is it possible to used the watchdog and write to the eeprom without reset ?2004-06-21 10:41 PM
Hi Olivier,
while you are waiting simply you have to reload the watchdog by setting the WDGD bit in the LTCSR register. I think you will reload the timer at several other parts of your program. Hope, the example (programmed in Assembler and in C) can help you. ;......................ST7 Assembler..................................... ;_______store values to E²PROM___________________ bset EECSR,#1 ; begin the programming cycle l_02 btjf EECSR,#1,l_03 ; while E²PROM is busy... bset LTCSR,#0 ; ... feed the dog... jra l_02 ; ... and wait l_e03 /*........................ C ......................*/ while(EECSR & 0x02) LTCSR = LTCSR | 0x01; /* wait & feed the dog */ I didn't test this example for the LITE09, but I think it's o.k. woro