hcs12,can't clear the RTIF flag

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

Reply to
blisca
Loading thread data ...

have

1(strangely,but

no,thanks,but the RTIF bit is the first on the left,i mean the one that wheights 2^7 and not 2^0

Reply to
blisca

have

ok,the

formatting link

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

Reply to
blisca

1(strangely,but

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

Reply to
blisca

try LDAA #%00000001

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

--
"I\'m never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5
Reply to
Jamie

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.