FreeRTOS, task umre pri cekani na semafor...

Stano stano.hw na gmail.com
Středa Říjen 30 14:33:06 CET 2013


Este posledna co by TEORETICKY mohla sposobovat problem.
Ako mate nastavene priority preruseni? Ci nahodou dane IRQ nema 
pridelenu vyssiu prioritu ako RTOS a tiez pozor na nastavenie poctu 
priority a subpriority bitov STMky. Aj ked nepredpokladam takto 
trivialnu chybu, viac ma nenapada.

Jaroslav Buchta  wrote / napísal(a):
> je to takto:
>
> #define INCLUDE_vTaskSuspend            1
>
> a ISR komplet:
> void ETH_IRQHandler(void)
> {
>   portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
>
>   /* Frame received */
>   if ( ETH_GetDMAFlagStatus(ETH_DMA_FLAG_R) == SET)
>   {
>     /* Give the semaphore to wakeup LwIP task */
>     xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken );
>   }
>
>   /* Clear the interrupt flags. */
>   /* Clear the Eth DMA Rx IT pending bits */
>   ETH_DMAClearITPendingBit(ETH_DMA_IT_R);
>   ETH_DMAClearITPendingBit(ETH_DMA_IT_NIS);
>
>   /* Switch tasks if necessary. */
>   if( xHigherPriorityTaskWoken != pdFALSE )
>   {
>     portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
>   }
> }
>
> ale kdyby chybelo portEND_SWITCHING_ISR tak se snad nic nestane krome 
> vetsiho zpozdeni, ne?
> to ETH_DMAClearITPendingBit je umistene spatne ale jine preruseni 
> stejne neni povoleno a mam overeno, ze se skutecne nevyskytuje.
>
> jeste me napada, ze je trosku dopraseny port modulu sys_arch, ktery 
> jsem syntetizoval z vice zdroju, ale stejne problemy byly i s verzi 
> LWIP 1.3.x kde byl projekt prevzaty cely takze spis ne...
>



Další informace o konferenci Hw-list