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.
So, now I have two questions:
1. How do tell the compiler to include the ret (or reti) instruction if
the function is void?
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?

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


-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Dmitry
Sent: Saturday, December 21, 2002 7:36 AM
To: [email protected]
Subject: Re: [Mspgcc-users] Having trouble w/ BT IRQ



Did yo specify mcu arch?
Did you include appropreate header?
If you did not something, the system will behave as you get.


~d

On Friday 20 December 2002 19:02, Mark Stokes wrote:
> I'm trying to have the basic timer simply tell the CPU to turn back on
> every 250ms.  I am pretty sure I have the BT stuff setup right, but
I'm
> not getting the asm I expect for the ISR itself.  Here's the .lst from
> the BT IRQ:
>
> interrupt (BASICTIMER_VECTOR) wakeup BasicTimerIRQ(void)
> {
>     nop( );
>     14a6:     03 43                   nop
>
> 000014a8 <wait>:
> }
>
> Note, the 000014a8 <wait>: statement is signaling the start of the
next
> function (called "wait").  The only reason I have the noop in there is
> for clarity.
> Two things I don't see that I expect:
> 1. There is no IRET instruction at the end (much less a regular
"ret").
> 2. I read the docs to say that if I used the "wakeup" attribute, it
> would cause the compiler to set the CPU on.  For IRQ's, this has to be
> done by clearing the CPUOFF bit in the "saved" Status register on the
> stack.  This is also not being done.
> Any ideas?
> Thanks
> -Mark
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:  The Best Geek Holiday Gifts!
> Time is running out!  Thinkgeek.com has the coolest gifts for
> your favorite geek.   Let your fingers do the typing.   Visit Now.
> T H I N K G E E K . C O M        http://www.thinkgeek.com/sf/
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users



-------------------------------------------------------
This SF.NET email is sponsored by: Order your Holiday Geek Presents Now!
Green Lasers, Hip Geek T-Shirts, Remote Control Tanks, Caffeinated Soap,
MP3 Players,  XBox Games,  Flying Saucers,  WebCams,  Smart Putty.
T H I N K G E E K . C O M       http://www.thinkgeek.com/sf/
_______________________________________________
Mspgcc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mspgcc-users


Reply via email to