modiallen wrote on Wednesday, May 02, 2012:
i think, i found the reason for the problem now.
it was not detected stackoverflow, the freertos could not find it out every time it happend.
here is the code:
the receiving task:
void SemaphorTestTask(void *pvParameters)
{
int count=0;
char ReceivedByte;
for( ;; )
{
if (xQueueReceive(xPROTQueue,&ReceivedByte,portMAX_DELAY)== pdPASS)
{
halLcdPrintSingleChar(‘P’,0);
++ count;
if (count == 136)
{
halLcdClearScreen();
halLcdPrintLine( " www.FreeRTOS.org", 0, OVERWRITE_TEXT );
count=0;
}
}
}
}
and here ist the ISR:
#pragma vector=USCI_A1_VECTOR
__interrupt void USCI_A1_ISR(void)
{
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
char ReceivedByte;
ReceivedByte = UCA1RXBUF;
xQueueSendFromISR(xPROTQueue,&ReceivedByte,&xHigherPriorityTaskWoken );
__bic_SR_register_on_exit(LPM3_bits);
portYIELD_FROM_ISR( xHigherPriorityTaskWoken );
}
this implementation is working without any problem.