cancel
Showing results for 
Search instead for 
Did you mean: 

Ulta 09 LTCSR TBF being cleared

brian4
Associate II
Posted on September 24, 2008 at 10:20

Ulta 09 LTCSR TBF being cleared

3 REPLIES 3
brian4
Associate II
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 ]

brian4
Associate II
Posted on September 23, 2008 at 10:32

Bump

Anybody help with this please....

Re Brian

fggnrc
Associate II
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