Steve,
there is a thing which seems wrong:
file x1126.html, topic 'variable agruments list'.
The note there is probably incorrect.
Actually, any type of calls allowed within ISR -- 
I'm using, for example, printf() in timer A iterrupts (not real-time bits ;).

Another thing I thought about it (which probably has been hidden by my poor 
english) is:
The ISR can accept arguments. Do not ask what for. 
   Anyway, one can call ISR from parent code and pass some arguments to ISR. 
The ISR will accept arguments and will perform an appropriate actions 
(returning to the middle of nowhere). As we know on interrupts r2 being 
pushed to the stack and stack pointer decrements by two. GCC minds this fact 
and will grab arguments from stack (if necessary) thinking that r2 been 
pushed. However if ISR being called from normal user process, r2 left behind.
So, gcc will get second argument from stack instead of first, third instead of 
second and so on. Nothing much else. Arguments passed via registers will 
behave as expected.

Why I've done ISRs accepting params? I dunno. probably cause of nothing to do 
:)

Another this with calls within ISR is a performance hit:
Any call (in general) clobbers r12 - r15. So, even if a tiny call being 
performed within ISR, gcc saves r12-r15 on stack. For example:

---------------
uint32_t localtime;

void incloctime()
{
        localtime++;
}

interrupt(vector) isr()
{
        incloctime();
}
------------------

will result isr() saving r12-r15 when none of them being used.



Another things:
There were some changes about returning from main(). Please check.


cheers,
~d



On Tuesday 10 June 2003 13:47, Steve Underwood wrote:
> Hi all,
>
> An mspgcc FAQ has existed for a while. However, after hearing comments
> from a number of people, I felt things needed expanding.
>
> I have produced a Docbook FAQ, and put it in the CVS docs directory.
> This has a number of Q and A comments about the use of C for small
> embedded processors, as well as the more nitty gritty MSP430 related Q
> and A stuff from the older FAQ.
>
> A working copy can also be accessed at
> http://mspgcc.sourceforge.net/faq/t2.html
>
> Comments, corrections, and additional questions (and hopefully answers)
> welcome.
>
> Regards,
> Steve
>
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by:  Etnus, makers of TotalView, The best
> thread debugger on the planet. Designed with thread debugging features
> you've never dreamed of, try TotalView 6 free at www.etnus.com.
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users

-- 
/********************************************************************
     ("`-''-/").___..--''"`-._     (\   Dimmy the Wild      UA1ACZ
      `6_ 6  )   `-.  (     ).`-.__.`)  Enterprise Information Sys 
      (_Y_.)'  ._   )  `._ `. ``-..-'   Nevsky prospekt,   20 / 44
    _..`--'_..-_/  /--'_.' ,'           Saint Petersburg,   Russia
   (il),-''  (li),'  ((!.-'             +7 (812)  3468202, 5585314
 ********************************************************************/


Reply via email to