nobody wrote on Tuesday, August 15, 2006:
First of all many thanks for your fast reply!
Yes it is correct, that the sample ISRs are working fine! But if i extend one of the examples with another ISR, it crashes.
I’ve used both the FreeRTOS-uP-Rowley-demo and Rowleys-sample startup skript for Philips LPC210X (both are called “Philips_LPC210X_Startup.s”), but it always results in the same error.
I’ve compared the two scripts and found out that only the bootloader’s got a different checksumm (if Preprocessiordefinition VECTORED_IRQ_INTERRUPTS is set like in my IDE, Checkum is 0xB9205F88 (Rowley-startup) or 0xB9205F84 (FreeRTOS-startup))?!
The Interrupts are called vector directly like it is given on the FreeRTOS-Homepage and I tried it with or without a context-switch.
<my context switching-Timer1ISR>
void __attribute__ ((interrupt(naked))) timer1ISR(void);
portLONG lSwitchRequired = 1;//0L;
/*Reset Timer 1-IR by clearing IR-Flag and setting Counter to Zero*/
T1_IR = ( ( unsigned portCHAR ) 0x01 );
T1_TC = 0;
VICVectAddr = ( ( unsigned portLONG ) 0 );
</my context switching-Timer1ISR>
What now happens is:
the FreeRTOS-Systemticker (Timer0) works fine and all Threads are started normally. When my timer1-IRQ occurs (like described above) I could debug that the uC jumps correct into the ISR (can watch it by debugging and setting a breakpoint on it) and let the LED toggle. But this happens only about 2…5 times, then an error handler occurs (mostly undef-handler).
This also happens if the program jumps in to the ISR by pressing the Button on EINT2.
I could imagine that it has something to do with nested interrupts, but I’ve tried everything that comes in my mind (disable all IRQs when entering ISR, context switching etc.) and nothing worked.