Thanks.
> Hi,
> I'm having a problem clearing the TFLG1 ($1023) register in order to get
my
> Output Compare function to work. When I tried to modify this register (to
> clear it), the Buffalo monitor says that this is a ROM location and cannot
> be written to.
If I understand, that is when you try to manually clear it, through a
command line.
> The BCLR function does not clear TFLG1,
> bclr tflg1,x,%01000000
In fact, the event flags of all peripherals are only cleared by writing
a 1 in them, even if it seems strange !
> and using the command
> STAA $1023
> results in a lost connection with the EVB. F8 is currently in memory
> location $1023 and I can't seem to change it. I can write to $1020,
$1021,
> $1022 fine, but not $1023. Any comments? BTW, I'm using a RevC
> M68HC11A1FN EVB.
>
> Thanks.
OK, hoping I've helped you.
Thierry C.
"These timer system status flags are cleared by writing a one to the bit
positions corresponding to the flag(s) which are to be cleared. Bit
manipulation instructions would be inappropriate for flag clearing
because they are read-modify-write instructions. Even though the
instruction mask implies that the programmer is only interested in
some of the bits in the manipulated location, the entire location is
actually read and rewritten which may clear other bits in the register."
I suspect that the bit is into getting cleared and you loose the connection
because you are stuck reentering the interrupt service routine.
Hope this helps.
Dave Rooney
> Hi,
> I'm having a problem clearing the TFLG1 ($1023) register in order to get
> my
> Output Compare function to work. When I tried to modify this register (to
> clear it), the Buffalo monitor says that this is a ROM location and cannot
> be written to. The BCLR function does not clear TFLG1,
> bclr tflg1,x,%01000000
bclr tflg1,x,%10111111
or
ldaa #%01000000
staa ....
RTFM 10.2.4, Tips for Clearing Timer Flags
Ian
--