Hello , i have tested to change the order in the arry of port and the
application get worse!!, horrible, blocking in the accept, and if pass the
accept never receive and the task delete!! the task is destroyed because the
program follow and not enter never in my task. It´s very rare!!!

another thing i´ll give more stack to my task and no enter never in the
creation.  My fixed memory is 46K and the total is 64K, i suppose FreeRTOS
use dinamic memory too.

where is the limit to stack?, where is it defined?, i´m completly lost

Can you help me? any suggestion?
Thanks

Oscar

another files
/* This header file is part of the ATMEL
AVR32-SoftwareFramework-AT32UC3A-1.4.0 Release */

/*This file is prepared for Doxygen automatic documentation generation.*/
/*! \file ******************************************************************
 *
 * \brief lwIP core & application threads configuration file.
 *
 * This file contains the possible external configuration of the Ethernet
module.
 *
 * - Compiler:           IAR EWAVR32 and GNU GCC for AVR32
 * - Supported devices:  All AVR32 devices can be used.
 * - AppNote:
 *
 * \author               Atmel Corporation: http://www.atmel.com \n
 *                       Support and FAQ: http://support.atmel.no/
 *
 ***************************************************************************/

/* Copyright (C) 2006-2008, Atmel Corporation All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
met:
 *
 * 1. Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 *
 * 3. The name of ATMEL may not be used to endorse or promote products
derived
 * from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY ATMEL ``AS IS'' AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE EXPRESSLY AND
 * SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY
DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */


#ifndef _CONF_LWIP_THREADS_H_
#define _CONF_LWIP_THREADS_H_

/*! define stack size for WEB server task */
#define lwipBASIC_WEB_SERVER_STACK_SIZE   256

/*! define stack size for TFTP server task */
#define lwipBASIC_TFTP_SERVER_STACK_SIZE  1024

/*! define stack size for Protocol RTU server task */
#define lwipBASIC_P_RTU_SERVER_STACK_SIZE  1024

/*! define stack size for lwIP task */
#define lwipINTERFACE_STACK_SIZE          1024//512

/*! define stack size for netif task */
#define netifINTERFACE_TASK_STACK_SIZE    512//256

/*! define WEB server priority */
#define lwipBASIC_WEB_SERVER_PRIORITY     ( tskIDLE_PRIORITY + 2 )  //NOT
ENABLE

/*! define TFTP server priority */
#define lwipBASIC_TFTP_SERVER_PRIORITY    ( tskIDLE_PRIORITY + 3 ) //NOT
ENABLE

/*! define Protocol RTU server priority */
#define lwipBASIC_P_RTU_SERVER_PRIORITY    ( tskIDLE_PRIORITY + 3 )


/*! define lwIP task priority */
#define lwipINTERFACE_TASK_PRIORITY       ( configMAX_PRIORITIES - 1 )

/*! define netif task priority */
#define netifINTERFACE_TASK_PRIORITY      ( configMAX_PRIORITIES - 1 )

/*! Number of threads that can be started with sys_thread_new() */
#define SYS_THREAD_MAX                    8

/*! LED used by the ethernet task, toggled on each activation */
#define webCONN_LED                       7

#endif // #ifndef _CONF_LWIP_THREADS_H_


#define configUSE_PREEMPTION      1
#define configUSE_IDLE_HOOK       0
#define configUSE_TICK_HOOK       0
#define configCPU_CLOCK_HZ        ( 66000000 ) /* Hz clk gen */
#define configPBA_CLOCK_HZ        ( 66000000 )
#define configTICK_RATE_HZ        ( ( portTickType ) 1000 )
#define configMAX_PRIORITIES      ( ( unsigned portBASE_TYPE ) 8 )
#define configMINIMAL_STACK_SIZE  ( ( unsigned portSHORT ) 256 )
/* configTOTAL_HEAP_SIZE is not used when heap_3.c is used. */
#define configTOTAL_HEAP_SIZE     ( ( size_t ) ( 1024*25 ) )
#define configMAX_TASK_NAME_LEN   ( 20 )
#define configUSE_TRACE_FACILITY  1
#define configUSE_16_BIT_TICKS    0
#define configIDLE_SHOULD_YIELD   1

/* Co-routine definitions. */
#define configUSE_CO_ROUTINES     0
#define configMAX_CO_ROUTINE_PRIORITIES ( 0 )

/* Set the following definitions to 1 to include the API function, or zero
to exclude the API function. */

#define INCLUDE_vTaskPrioritySet            1
#define INCLUDE_uxTaskPriorityGet           1
#define INCLUDE_vTaskDelete                 1
#define INCLUDE_vTaskCleanUpResources       0
#define INCLUDE_vTaskSuspend                1
#define INCLUDE_vTaskDelayUntil             1
#define INCLUDE_vTaskDelay                  1
#define INCLUDE_xTaskGetCurrentTaskHandle   1
#define INCLUDE_xTaskGetSchedulerState      0

/* configTICK_USE_TC is a boolean indicating whether to use a Timer Counter
or
   the CPU Cycle Counter for the tick generation.
   Both methods will generate an accurate tick.
   0: Use of the CPU Cycle Counter.
   1: Use of the Timer Counter (configTICK_TC_CHANNEL is the TC channel). */
#define configTICK_USE_TC             0
#define configTICK_TC_CHANNEL         2

/* configHEAP_INIT is a boolean indicating whether to initialize the heap
with
   0xA5 in order to be able to determine the maximal heap consumption. */
#define configHEAP_INIT               0


#endif /* FREERTOS_CONFIG_H */

#ifndef _CONF_ETH_H_
#define _CONF_ETH_H_

/*! Phy Address (set through strap options) */
#define ETHERNET_CONF_PHY_ADDR             0x01
#define ETHERNET_CONF_PHY_ID               0x20005C90

/*! Number of receive buffers. Max ethernet frame size is 1526. A Rx buffer
is
128 Bytes long. So 12 Rx buffers are necessary to store one max sized frame.
Multiply that by 2 for performance. */
#define ETHERNET_CONF_NB_RX_BUFFERS        24

/*! USE_RMII_INTERFACE must be defined as 1 to use an RMII interface, or 0
to use an MII interface. */
#define ETHERNET_CONF_USE_RMII_INTERFACE   1

/*! Number of Transmit buffers */
#define ETHERNET_CONF_NB_TX_BUFFERS        10

/*! Size of each Transmit buffer. */
#define ETHERNET_CONF_TX_BUFFER_SIZE       512

/*! Clock definition */
#define ETHERNET_CONF_SYSTEM_CLOCK         66000000

/*! Use Auto Negociation to get speed and duplex */
#define ETHERNET_CONF_AN_ENABLE                      1

/*! Do not use auto cross capability. Unused because not supported by the
DP83848
    phy on the EVK1100. */
#define ETHERNET_CONF_AUTO_CROSS_ENABLE              0
/*! use direct cable */
#define ETHERNET_CONF_CROSSED_LINK                   0


/* ethernet default parameters */
/*! MAC address definition.  The MAC address must be unique on the network.
*/
#define ETHERNET_CONF_ETHADDR0                        0x00
#define ETHERNET_CONF_ETHADDR1                        0x04
#define ETHERNET_CONF_ETHADDR2                        0x25
#define ETHERNET_CONF_ETHADDR3                        0x40
#define ETHERNET_CONF_ETHADDR4                        0x40
#define ETHERNET_CONF_ETHADDR5                        0x40

/*! The IP address being used. */
#define ETHERNET_CONF_IPADDR0                         192
#define ETHERNET_CONF_IPADDR1                         168
#define ETHERNET_CONF_IPADDR2                         1
#define ETHERNET_CONF_IPADDR3                         7

/*! The gateway address being used. */
#define ETHERNET_CONF_GATEWAY_ADDR0                   192
#define ETHERNET_CONF_GATEWAY_ADDR1                   168
#define ETHERNET_CONF_GATEWAY_ADDR2                   1
#define ETHERNET_CONF_GATEWAY_ADDR3                   1

/*! The network mask being used. */
#define ETHERNET_CONF_NET_MASK0                       255
#define ETHERNET_CONF_NET_MASK1                       255
#define ETHERNET_CONF_NET_MASK2                       255
#define ETHERNET_CONF_NET_MASK3                       0

#endif




On Tue, Oct 6, 2009 at 2:08 PM, Oscar F <[email protected]> wrote:

> OK, good idea, i´ll try to do this. i´ll tell you.
>
> thanks
> Oscar
>
>
> On Tue, Oct 6, 2009 at 12:59 PM, Kieran Mansley <[email protected]> wrote:
>
>> On Tue, 2009-10-06 at 12:51 +0200, Oscar F wrote:
>> > Hello the problem is that the customer send the connection in this
>> > order, i can´t change because  i accept each connection in this order.
>> > I´ll tell the client change the order, or change the number port. I´ll
>> > tell you with happend when change the code.
>>
>> I didn't mean that you should actually get the customer to change their
>> application, just for you to experiment with doing things in different
>> orders so you can work out if it is the port numbers that are important,
>> or the order that is important.  If you don't have access to the client
>> to change the source yourself, just write a little application of your
>> own to connect to those ports.
>>
>> Kieran
>>
>>
>>
>> _______________________________________________
>> lwip-users mailing list
>> [email protected]
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>
>
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to