lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] [LwIP-1.4.1 + ChibiOS-2.6 + STM32F407]memp_malloc: out


From: Noam weissman
Subject: Re: [lwip-users] [LwIP-1.4.1 + ChibiOS-2.6 + STM32F407]memp_malloc: out of memory in pool PBUF_POOL
Date: Sat, 21 Jun 2014 18:35:40 +0300

Hi,

Some hints...

If you work with FreeRTOS normally the LwIP stack uses its own heap.

Define a heap for OS at around 40-50K and memory and LwIP at around 10-12K
you should not have any problems.

One important thing. The OS uses an interrupt. The porting for LwIP made by ST 
uses 
semaphores. FreeRTOS semaphore related functions use blocks of critical section.
If you do not define your ETH IRQ a bit higher than OS own IRQ this may cause 
the
TCP stack to stop working. This is how interrupt levels are defines in Cortex-M

If you define ETH IRQ at a higher level then the OS, it means that all those 
critical
section code blocks in the FreeRTOS code do not work as they should. 
Unpredictable 
things happened to me when I had this settings wrong :-(...  

This is what I would check. 

Good luck,
Noam.


-----Original Message-----
From: address@hidden on behalf of Sergio R. Caprile
Sent: Fri 6/20/2014 10:03 PM
To: address@hidden
Subject: Re: [lwip-users] [LwIP-1.4.1 + ChibiOS-2.6 + STM32F407]memp_malloc: 
out of memory in pool PBUF_POOL
 
Hi,
I will guess:
- Since you describe something ending with 'OS', you are using an (RT)OS
port, probably with NO_SYS = 0.
-- If you have multiple tasks, check you call lwIP only from one task
(unless you know exactly what you do and why you are doing it). This
includes the netif input.
-- Who did the port ? Has it been thoroughly tested ? (I just don't know
of it, but I'm no expert whatsoever)
- A google search for STM32F407 yields it has a huge amount of RAM, so
it is not likely that the compiler let you compile for more RAM than you
actually have. However, the stack/heap you configured (or your OS did
for you) is probably not enough for whatever you are doing that you
don't say. Check that.

If your problem persists, you'll probably have to dive into your OS
memory management and see it is not fighting lwIP's own. I have no
expertise here (I prefer to fight bare metal instead of OSs) and won't
be able to help.

_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users

 
 
************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************







************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer 
viruses.
************************************************************************************



<<winmail.dat>>


reply via email to

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