Hi Naga, the LPCUSB library has good examples of how to do inline assembly with the function prolog and eiplog. These should not be done as functions, they should just be inline assembly at the beginning and end of the function.
With regard to the multiple firings of your interrupt, make sure that your clearing the corresponding bits of the peripheral for the interrupt. If you don't clear those bits, then the interrupt will just continue firing. regards, -dave On Tue, Oct 4, 2011 at 2:03 PM, Nagasrinivas Pinjala <[email protected]> wrote: > Hi, > I have made some progress with the interrupt project I am working on. The > micro-controller is responding to the push button interrupt but seems that > it is not able to come out of the interrupt. I know that when a > micro-controller responds to an interrupt it disables the interrupt but in > my case it does not. The LED, which should glow just once when the button is > pushed, turns on and off indefinitely. > > Last week Dave told that are a few problems with the ARM GCC compiler which > made me think that may be the compiler isn't producing the correct epilogue > for the interrupt function. I decided to declare the function attribute as > "naked" and write the function prologue and epilogue myself. Should I embed > the code in the interrupt handler or should I declare separate functions for > prologue and epilogue respectively ? If I can embed the code how can I do > that ? > Are there any examples in the library that I can follow ? > Thanks, > Naga. > > _______________________________________________ > psas-avionics mailing list > [email protected] > http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics > > _______________________________________________ psas-avionics mailing list [email protected] http://lists.psas.pdx.edu/mailman/listinfo/psas-avionics
