Thanks, and ya, I do like that macro. I found it in iomacros.h (and I
had to add a '_' to the beginning).
I'm getting the following error:
"it400a.c:364: warning: concatenation of string literals with
__FUNCTION__ is deprecated"
I can ignore it, but is there a way to avoid it?
Also, it doesn't look like "wakeup" is doing anything (even if I leave
naked off)"
interrupt (BASICTIMER_VECTOR) wakeup BasicTimerIRQ(void)
{
P1OUT=~P1OUT; //invert port 1
1346: f2 e3 21 00 xor.b #-1, &0x0021
_BIC_SR_IRQ(LPM3_bits);
134a: b1 c0 d0 00 00 00 bic #208, 0(r1) ;#0x00d0
}
1350: 00 13 reti
Thanks for the help. I'm filling in the gaps between a good assembly
programmer for mcu embedded projects and a good c/c+ programmer for dos
systems.. And some of them are wider than others heh.
-Mark
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Chris
Liechti
Sent: Monday, December 30, 2002 5:12 PM
To: [email protected]
Subject: Re: RE: [Mspgcc-users] Having trouble w/ BT IRQ
Am 30.12.2002 22:09:45, schrieb "Mark Stokes" <[email protected]>:
>I had a bit of trouble understanding that last statement, but here's
>what I found.
>I had declared the IRQ as "naked". I was unaware that this also
removes
>the ret (or reti) instruction. I don't quite understand this, but I
can
>live with it.
"naked" removes any function prologue and epilogue.
>So, now I have two questions:
>1. How do tell the compiler to include the ret (or reti) instruction if
>the function is void?
don't use "naked" or put a __asm__ ("reti")
>2. How do I tell the compiler to change the SR bit in the saved SR on
>the stack so that the CPU turns back on after the BT irq service has
>ended? I thought the "wakeup" keyword would do this, but I see no code
>being generated when I add this. Is there a header that acts on the
>"wakeup" keyword?
i think "naked" is stronger than "wakeup".
BIC_SR_IRQ(LPM0_bits);
or so is a C macro you might like ;-)
inspect signal.h in the msp430 include files
>
>Sample:
>interrupt (BASICTIMER_VECTOR) wakeup BasicTimerIRQ(void)
>{
> nop( );
> 1422: 03 43 nop
> P1OUT=~P1OUT; //invert port 1
> 1424: f2 e3 21 00 xor.b #-1, &0x0021
>}
> 1428: 00 13 reti
>
>
>Thanks for the help.
>-Mark
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users