|
From: | Furiantes Furiantes |
Subject: | Re: [lwip-users] FreeRTOS :: LWIP xInsideISR == (portBASE_TYPE) |
Date: | Fri, 15 Nov 2013 08:17:19 +0100 |
Hi,
Maybe you call sys_arch_mbox_fetch(...)(by direct or indirect) inside your Interrupt Service Routine with a non-zero timeout.
If you want to call sys_arch_mbox_fetch from your ISR, you can only specify a zero-timeout.
east3
From: Furiantes Furiantes
Date: 2013-11-15 01:57
To: Mailing list for lwIP users
Subject: [lwip-users] FreeRTOS :: LWIP xInsideISR == (portBASE_TYPE)
_______________________________________________Hello,
i am using lwip 1.4.1 and FreeRTOS 7.4. in sys_arch.c i am getting this assert:
configASSERT(xInsideISR == (portBASE_TYPE) 0); (full code below). So im asking why is that happened ?
I am rookie at these staff so be patient :)
If anyone can help :)
Full code:
u32_t sys_arch_mbox_fetch(sys_mbox_t *pxMailBox, void **ppvBuffer, u32_t ulTimeOut)
{
void *pvDummy;
portTickType xStartTime, xEndTime, xElapsed;
unsigned long ulReturn;
xStartTime = xTaskGetTickCount();
if(NULL == ppvBuffer) {
ppvBuffer = &pvDummy;
}
if(ulTimeOut != 0UL) {
configASSERT(xInsideISR == (portBASE_TYPE) 0);
if(pdTRUE == xQueueReceive(*pxMailBox, &(*ppvBuffer), ulTimeOut / portTICK_RATE_MS)) {
xEndTime = xTaskGetTickCount();
xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS;
ulReturn = xElapsed;
} else {
/* Timed out. */
*ppvBuffer = NULL;
ulReturn = SYS_ARCH_TIMEOUT;
}
} else {
while(pdTRUE != xQueueReceive(*pxMailBox, &(*ppvBuffer), portMAX_DELAY));
xEndTime = xTaskGetTickCount();
xElapsed = (xEndTime - xStartTime) * portTICK_RATE_MS;
if(xElapsed == 0UL) {
xElapsed = 1UL;
}
ulReturn = xElapsed;
}
return ulReturn;
}
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users
[Prev in Thread] | Current Thread | [Next in Thread] |