lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] TCPIP and MAC thread task priorities


From: Sylvain Rochet
Subject: Re: [lwip-users] TCPIP and MAC thread task priorities
Date: Mon, 27 Feb 2017 14:40:14 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

Hi,

On Mon, Feb 27, 2017 at 01:24:39PM +0100, Sylvain Rochet wrote:
> On Mon, Feb 27, 2017 at 11:50:26AM +0000, Noam Weissman wrote:
> > 
> > If you set your interrupt level to be higher priority than the 
> > FreeRTOS timer tick that part will never Be masked and your critical 
> > section will not work as expected.
> 
> I don't understand any of this, portENTER_CRITICAL/portEXIT_CRITICAL 
> proper implementation is to disable *ALL* interrupts, therefore having a 
> critical section which is not enforced for whatever reason can't happen 
> at all.

To be more precise here, *ALL* interrupts which might call the FreeRTOS 
API, you indeed don't care for interrupts that are outside the FreeRTOS 
scope, which don't even need to be naked at all, and therefore can't 
wake up tasks.


> By the way, FreeRTOS is not supposed to run with nested interrupts, you 
> have to put all OS calls from interrupts (i.e. *FromISR() functions) in 
> a critical section.

Except if your FreeRTOS port support it, looks like some of them do :-)


Anyway, this is a bit outside the initial subject. The RX thread (if 
any) should have a higher priority than the TCPIP thread, both 
priorities should obviously be within the allowed priorities window 
which only depend on your FreeRTOS port.


Sylvain

Attachment: signature.asc
Description: Digital signature


reply via email to

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