That's a silly statement, the build code is exactly the same.  One has a 
warning, one
doesn't.
And if you only want to wake for a serial IRQ, then put the wakeup in the 
serial IRQ
handler.  If that's still not good enough, then have the main code retest for 
"time to
wakeup" and if it fails, just go to sleep again.
-Mark
 

-----Original Message-----
From: mspgcc-users-ad...@lists.sourceforge.net
[mailto:mspgcc-users-ad...@lists.sourceforge.net] On Behalf Of Grant Edwards
Sent: Monday, March 20, 2006 10:26 AM
To: mspgcc-users@lists.sourceforge.net
Subject: [Mspgcc-users] Re: How to exit from low power mode?

On 2006-03-20, Stokes, Mark <msto...@idexcorp.com> wrote:

> This may sound like a completely stupid question at this
> point, but why not simply use the "wakeup" function modifier? 

Because that wakes up the processor unconditionally at the end
of the interrupt service routine.  I only want to wake up the
processor under certain conditions (e.g. a complete frame has
been received via a serial link).

> Such as in this example:
>
> interrupt (BASICTIMER_VECTOR) wakeup BasicTimerIRQ(void)
>
> You never said which power mode

It doesn't matter.  You get the warning regardless of which
power mode you're switching from.

> or in which type of function you are trying to switch modes
> from.

I'm switching modes from an ISR.  The only place you can use
_BIC_SR_IRQ() is from an ISR.

> I had the same problem w/ the warning for many months and I
> decided I didn't like it, so I changed my code to use this and
> it works perfectly, no warning.

Your solution only works if you need to wake up the processor
on _every_ interrupt.  That's not what I need to do.

> Personally, I don't like patching the compiler just to remove
> a warning.

Neither do I, but I dislike even more shipping code that won't
build cleanly.  I always use -Wall -Werror, and I'll fix the
compiler before I'll ship code that won't compile without
warnings.

> Especially when there is a good way to avoid that warning.

There isn't.

> That's why there are compiler switches that allow certain
> warnings to be ignored.

Which compiler switch disables that warning?

-- 
Grant Edwards                   grante             Yow!  It's a lot of fun
                                  at               being alive... I wonder if
                               visi.com            my bed is made?!?



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Mspgcc-users mailing list
Mspgcc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mspgcc-users

Reply via email to