hcs12,can't clear the RTIF flag

Nov 04, 2006 4 Replies

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


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

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

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

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

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required