Maker Pro
Maker Pro

hcs12,can't clear the RTIF flag

B

blisca

Jan 1, 1970
0
Hello,experiencing on my own with a 9s12 microcontroller i'm trying to have
it doing something in response at a Real Time Interrupt

the freescale manual says that i should clear it writing a 1(strangely,but
ok),so i try to do it using

LDAA #%10000000
STAA CRGFLG

or using

BSET CRGFLG,%10000000

but RTIF doesn't changes

anyone can explain me why???

thank you
 
B

blisca

Jan 1, 1970
0
Jamie said:
try
LDAA #%00000001

then the rest.
binary is right to left the last time i remember.
that is a value 1.
no,thanks,but the RTIF bit is the first on the left,i mean the one that
wheights 2^7 and not 2^0
 
B

blisca

Jan 1, 1970
0
blisca said:
Hello,experiencing on my own with a 9s12 microcontroller i'm trying to have
it doing something in response at a Real Time Interrupt

the freescale manual says that i should clear it writing a 1(strangely,but
ok),so i try to do it using

LDAA #%10000000
STAA CRGFLG

or using

BSET CRGFLG,%10000000

but RTIF doesn't changes

anyone can explain me why???

thank you
ok,the
http://www.freescale.com/files/microcontrollers/doc/app_note/AN2554.pdf

explains why the BSET instruction is dangerous in this case,but even
following the method of the AN2554 the RTIF don't change
 
B

blisca

Jan 1, 1970
0
ok,the
http://www.freescale.com/files/microcontrollers/doc/app_note/AN2554.pdf

explains why the BSET instruction is dangerous in this case,but even
following the method of the AN2554 the RTIF don't change
the solution was trivial,....i read an example in italian,that was probably
translated and copy-pasted from an exemple in English.....
the write forgot to change 16.384ms in 16.384 ms,this because in Italy we
use the "," between integers and decimals and "." between thousands,millions
etc...(maybe it is time to change this habit)
so i was misleaded to think that my interrupt flag should have been rearmed
every 16 seconds when in fact it happened much faster
than the step by step debugging.....my fault ,sorry
 
J

Jamie

Jan 1, 1970
0
blisca said:
Hello,experiencing on my own with a 9s12 microcontroller i'm trying to have
it doing something in response at a Real Time Interrupt

the freescale manual says that i should clear it writing a 1(strangely,but
ok),so i try to do it using

LDAA #%10000000
STAA CRGFLG

or using

BSET CRGFLG,%10000000

but RTIF doesn't changes

anyone can explain me why???

thank you
try
LDAA #%00000001

then the rest.
binary is right to left the last time i remember.
that is a value 1.
 
Top