Hello, it's me again =) I have a Problem (What else?):
First of all: uVision3 with an ARM7TDMI-S on LPC2148, ARMC-Compiler V3.1...
I'm using Nested Interrupts from KEIL: http://www.keil.com/support/docs/3353.htm
They worked fine. But now, I try to fit them into the USB-IAP-Bootloader. (From KEIL too =) This mix crashs!
My Diagnostics: The Bootloader uses Registers I use for nesting my Interrupts.
My Solution: None! =(
So, could anybody help me again? It would be great!
Thanks for all Replys!
Best Regards, Adrian
why do you need nested interrupts in the bootloader? why do you need nested interrupts at all? think about it for a second.
is it possible that you don't turn interrupts off while writing to flash?
Hello Tamir... or Michael... or Mr. Tamir... Whatever: Yes, I need Nested Interrupts. My Situation: I have a lots of Interrupts occuring. Some of these Interrupts have to measure Time. The accuracy of this time is +/-0.5us... So I need them to appear instantaneous, otherwise, they are useless =(
I need them in Bootloader, otherwise I can't programme the uC.
And yes, I'm writing to a Flash File, but not via USB... I need SD-Card. So, my LPC2148 is really busy, isn't he? =)
I write to Registers R0-R3, R12-R15 in Nested Interrupt handling routine... more precisely in assembly language wrapper function.
Thanks for Reply, Adrian
PS: I'll pay you a beer, Michael... or Tamir =)
Yes, I need Nested Interrupts.
Fair enough. Now tell me WHY you think you need them. I have a 250,000 lines industrial controller, include 2 bootloaders and multiple interrupts sources all functioning on one LPC2478 without usage of nested interrupts. Again: What makes you sure you need them?
If you keep your ISRs short, are you also too late? Obviously, some functionality has to be sacrificed when in boot mode.
My Situation: I have a lots of Interrupts occuring. Some of these Interrupts have to measure Time. The accuracy of this time is +/-0.5us... So I need them to appear instantaneous, otherwise, they are useless =(
Let me reiterate: when your bootloader is running, none of this has to be executed. Disable nested interrupts, at least when in boot mode!
I know, but are there no other sacrifice i could give instead of my R0? One Interrupt (Timer0) work as Task Manager, Clock generator, State supervisor and FIFO-writer. This ISR isn't short and I see no alternative to solve all these Functions... Timer1 is used to generate another Signal (Master Clock of an external device) and as a Slope-Generator. Furthermore there are 4 external Interrupts, two ADC-Interrupts and an UART Interrupt... I Told: A lots of Interrupts =S
Do you (or someone else...) know how I can change this "Nested Interrupt Handler" without destroy Functionality?
Best Regards,
Adrian
ok, ok, My Bootloader isn't running when I'm using Interrupts. The Bootloader is just running at the beginning. I load the Programme, The Bootloader start the Programme, the Programme fail.
When I'm using Interrupts, the bootloading section is passed. My Bootloader is the "USB Secondary ISP Bootloader" and not an IAP-Bootloader how I wrote before. Sorry, my fault, shame on me!
So, if I don't use Interrupts, Nested Interrupts aren't required also.
Simple control test: does your application still crash without nested interrupts?
Can't you measure the time with capture registers, so you just read out the exact value (with 100ns or better resolution)? The timers can do more than just busy-run.