Skip to main content
Visitor II
June 22, 2004
Question

ST7lite09 watchdog and eeprom

  • June 22, 2004
  • 2 replies
  • 658 views
Posted on June 22, 2004 at 07:41

ST7lite09 watchdog and eeprom

    This topic has been closed for replies.

    2 replies

    olivier23Author
    Visitor II
    June 15, 2004
    Posted on June 15, 2004 at 07:55

    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 ?
    Visitor II
    June 22, 2004
    Posted on June 22, 2004 at 07:41

    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