Here's something I had done a long time ago: - Set your stack size large (maybe the 0x1000 you have is way too big?) - When you set up the stack in your boot.s or startup.s, fill it with a known pattern (like 0xBEEF) - Run your code for a while (definition of "while" is up to you... :-) - Stop the processor and look at your stack in memory. Whatever is still your known pattern is what wasn't used. You can roughly estimate stack usage by looking at the calls you're making from your ISR. You shouldn't be making too many nested routine calls inside an ISR, and especially not with lots of parameters. Local variables also factor in heavily. Trade-off is between how much stack you want to take up and how many global variables you really need. Jim On 6/29/05, elef_papa <elef_papa@...> wrote: > > Hi, > > After many hours trying to figure out why the cpu kept freezing, i > fixed it by changing the following in my startup file: > > was: .equ IRQ_Stack_Size, 0x00000080 > changed to: .equ IRQ_Stack_Size, 0x00001000 > > obviously the original value was not enough for the IRQ function and > it was probably overwriting the stack from the USR mode (im > guessing?!? correct me if im wrong) > > Anyways, im using winarm (GNU GCC 4.0.0) and want to know how can i > tell how much ram a function/IRQ needs, so i can set the .equ > IRQ_Stack_Size without having to guess? > > Thanks > Eleftherios > [Non-text portions of this message have been removed]
Message
Re: [lpc2000] how to tell IRQ stack size
2005-06-29 by Jim Parziale
Attachments
- No local attachments were found for this message.