Skip to main content
Visitor II
September 24, 2008
Question

Ulta 09 LTCSR TBF being cleared

  • September 24, 2008
  • 3 replies
  • 849 views
Posted on September 24, 2008 at 10:20

Ulta 09 LTCSR TBF being cleared

    This topic has been closed for replies.

    3 replies

    brian4Author
    Visitor II
    June 13, 2008
    Posted on June 13, 2008 at 08:58

    Hi I am using and ST7 Flite Ultra 09

    I am using ''bset LTCSR,#WDGD'' to reset the Watchdog in my main loop

    This seems to be clearing the Interupt flag, does a ''bset'' command have the same affect as a read.

    If so whats the solution to resetting the watchdog?

    Re B

    [ This message was edited by: BrianM on 13-06-2008 12:34 ]

    brian4Author
    Visitor II
    September 23, 2008
    Posted on September 23, 2008 at 10:32

    Bump

    Anybody help with this please....

    Re Brian

    Visitor II
    September 24, 2008
    Posted on September 24, 2008 at 10:20

    Brian,

    BSET LTCSR,#WDGD is equal to the following instructions:

    LD A,LTCSR

    OR A,#$01

    LD LTCSR,A

    For this reason, the first instruction clears the Timebase Interrupt Flag.

    The only way to delay the watchdog action without losing the Timebase Interrupt is:

    LD A,#%10010011 ;enables Input Capture and Timebase Interrupts too

    LD LTCSR,A

    According to the datasheet, the Input Capture and Timebase flags should remain unchanged.

    Regards

    EtaPhi