lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] LWIP infinite loop - system watchdog implementation


From: Piero 74
Subject: [lwip-devel] LWIP infinite loop - system watchdog implementation
Date: Thu, 24 Apr 2008 10:48:13 +0200

Hi all.

I'm working on an embedded system using lwip. This system has to work forever without blocks.
I'm using lwip on multitask enviroment (FreeRTOS)

I implemented a HW watchdog on my board which can reset the board if microcontroller doesn't kick it in few second.
I implemented in my code a simple watch dog manager, which does kick only if ALL tasks set periodically a flag.

LWIP has its task (tcpip thread - i'm using socket), and i saw that this task can block forever trought functions in sys_arch.c sys_arch_sem_wait and sys_arch_mbox_fetch.
I implemented these functions putting a macro functions inside a infinite loop (execute if timeout parameter is 0).

I decided that the implementation for this macro function, caoul be:

- get current task handle (using rtos api function)
- set its flag in watchdog manager searching its handle in a table


Do you think could it be a good solution???


Thanks,
Piero

reply via email to

[Prev in Thread] Current Thread [Next in Thread]