petermeier wrote on Monday, February 08, 2010:
Hi Richard,
thank you for the detailed informations.
Regarding that answer i have some more questions. Sorry about that.
1) Regarding my implementation of the interrupts and the stack usage. Iam using the compiler generated interrupt routines ->
void __ISR(_UART_1_VECTOR) UART1_ISR(void).
That means that i can set the parameter configISR_STACK_SIZE to 0, because the stack which is needed to process the interrupt is being nested in the currently active task. Even if this solution is wasting RAM. Correct?
2) If i want to use the FreeRTOS provided interrupt entry and exit code, i have to create my own interrupt service routine(provided with the demos in assembly). So the routine should look something like this:
File: UART1_ISR.S - This creates my own ISR entry and exit code.
.section .FreeRTOS, “ax”, @progbits
.set noreorder
.set noat
.ent UART1_ISR_WRAPPER
UART1_ISR_WRAPPER:
portSAVE_CONTEXT
jal UART1_ISR_HANDLER
nop
portRESTORE_CONTEXT
.end UART1_ISR_WRAPPER
File: UART1.c
void __attribute__( (interrupt(ipl2), vector(_UART1_VECTOR))) UART1_ISR_WRAPPER(void);
void UART1_ISR_HANDLER(void)
{
… whithin this i can handle my code as i did before.
… I can also access my static defined buffer to read and write to it without the need of using the Queue-Functions and the
… fromISR / toISR functions. Correct?
}
3) Am i right if i say that this interrupt (FreeRTOS provided entry/exit code) is being handled like a “normal” interrupt, that means:
An interrupt with a higher priority can interrupt the currently running interrupt?
4) How to check the stack usage within an interrupt (FreeRTOS provided entry/exit code)? Is that being done with a call to
uxTaskGetStackHighWaterMark( NULL );
within the interrupt?
Thanks very very much for all the answers in advance!
Kind regards,
Peter