lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Lwip timer ISR priority


From: Andrea Merello
Subject: [lwip-users] Lwip timer ISR priority
Date: Tue, 15 Mar 2011 16:16:30 +0100

Hello!

I'm playing a bit with lwip and a STM32f107 microcontroller.
I'm not using any OS, and I rewrote by myself the enet driver for
didactic reasons.

Now i'm TXing and RXing UDP packets successfully, but I have a question:

I have a timer that calls etharp_tmr() and tcp_tmr() in order to
server lwip internal timers.
I'm wondering if those calls can run across the enet ISR or vice
versa. And if those calls can run across normal APIs likes udp_sendto
and vice versa.

What I do here is sending an UDP packet every 150us (and I want to be
very precise). For this purpose I have another timer from within I
call the udp_sendto.
The two timers priority and the enet ISR priority are currently the
same, so that they run in a mutually exclusive fashion (no preemption
is done).

This sometimes causes the udp_sendto call to be delayed because of the
other timer running.

Is it safe to increase the priority of the timer ISR that performs the
call to udp_sendto so that it can preempt the other timer that calls
etharp_tmr() and tcp_tmr() ?

What are in general the rules about concurrency in lwip for the Enet
ISR, the lwip timers etharp_tmr() and tcp_tmr(), and the user APIs ?

Is there a PDF book or some doc that explains in detail things like
concurrency issues in a no-OS context ?

Thank you a lot
Andrea



reply via email to

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