This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LP-AM243:LP-AM243 as the server and actively sends data to the client

Part Number: LP-AM243
Other Parts Discussed in Thread: SYSCONFIG

HI

Requirement: Each time LP-AM243 sends no more than 32K data, with 1800 frames per second. How do you recommend sending in packets and how many frames should be sent once

LP-AM243 as the server and actively sends data to the client, I  can send it through the following methods

  • Hi Haojie, 

    Did you try sending the data at required speed? 

    If you face any issue in the data communication, please let me know

    Regards,
    Shaunak Deshpande

  • Hi,

    Please do not close the thread。I will reply if there are any issues。

  • Hi,

    Wireshark display:

    Code:

    How to improve transmission efficiency? The arrow points at: Sending only starts after an interval of 500ms

  • Hi Haojie,

    I'll look into it and get back to you, meanwhile can you please let me know if the data transmission that you were trying to achieve is working? and the concern here is only the delay, right?

    Regards,

    Shaunak

  • 你好,

    目前数据正常,如果速度快的话不确定会出现什么情况。

    CPSW  and  ICSSG  ,How should I choose。

  • Hi Haojie, 

    Could you please re-type the same in English please?

    Regards,

    Shaunak

  • Also

    Can you please help me understand about the code.

    Did you modify the out of box example and take the piece of code for netconn_write()?, if yes, what is the 1000us sleep required for? Did you try reducing it and check if the interval time decreases?

    Regards,

    Shaunak

  • At present, the data is normal. If the speed is fast, it is uncertain what will happen?

    CPSW  and  ICSSG  ,How should I choose。

  • 你好,

    基于  enet_ cpsw_ tcpserver ,修改如下:

  • Based on ENET_ Cpsw_ Tcpserver, modify as follows:

    1. Change from DHCP to static IP   https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1248948/lp-am243-problems-discovered-when-modifying-ethernet-to-static-ip/4727597#4727597

    2. Add send array and send function

    test: 1000us sleep reduced to 500us / 800us and unable to establish connection

  • Hi Haojie,

    You should choose CPSW, CPSW will perform better than ICSS in a general use case. ICSS would be preferred when you are looking for a custom switch which will provide redundancy, determinism etc. If you would have been working on protocols such as EtherNET IP or EtherCAT, we would have preferred the use of ICSS, but in this case of standard ethernet functionality, we would recommend CPSW.

    And is 500ms interval time after you start your application or after you have established a TCP connection?

    Regards,
    Shaunak

  •  Hi,

    1.ClockP_usleep(1000); Modify to  

    ClockP_usleep(500); / ClockP_usleep(800);

    The client cannot connect to the server

    2.  I want to establish a system Project. 

    a.R5F0_0:  freertos  ,Implement Ethernet transmission function  。ENET_ Cpsw_ The tcpserver program     

    b.R5F0_1     nofreertos , Implement function on this project: form two send array(36K per array) when the send array is ready ,notify R5F0_0 freertos to send this array out over Ethernet tcpserver.

    c.Dual core Shared memory about 75K

    Based on, ipc_spinlock_sharedmem 。How do I transplant ENET_ Cpsw_ The tcpserver program ?Or is there any other migration plan that can help me quickly establish this system Project. 

  • Hi Haojie,

    You can use ipc_spinlock_sharedmem out-of-box example to get started as it already has FreeRTOS on R5F0_0 and NoRTOS on R5F0_1.

    Are you using CCS for development or gmake build system?

    Based on that I can guide you with the steps for migrating enet_cpsw_tcpserver to this example

    Regards,

    Shaunak

  • Hi,

    Here is my IPC project,I may need to be based on :ipc_spinlock_sharedmem. I am using CCS,and I have already run through the ipc_spinlock_sharedmem. I need your guidance on my future migration  . Including the modification of Shared memory size

  • Hi Haojie,

    Listing down the steps below:

    1. Import the IPC spinlock sharedmem example in CCS workspace

    2. Add the C and header files present in the enet_cpsw_tcpserver example to your ipc_spinlock_sharedmem project.

    3. Open project properties, make sure in ARM Compiler you have the enet and lwip include search paths, something similar to shown below.

    4. In ARM Linker, make sure the include library files and library search paths are configured correctly as well.

    5. Then rebuild the project

    Following the above steps, you will be able to integrate the enet_tcp_server in your ipc shared memory example.

    You can refer the makefile of enet_cpsw_tcpserver example to check the compiler and linker paths and add it as mentioned above.

    Please try it out and let me know if you face any problems.

    Regards,
    Shaunak

  • 1.Please help me solve this problem first

    ClockP_usleep(1000); Modify to  

    ClockP_usleep(500); / ClockP_usleep(800);

    The client cannot connect to the server

    Target:Each time LP-AM243 sends no more than 32K data, with 1800 frames per second

    2.Migration results

    Add relevant files

    rebuild the project  

    The relevant files are empty。

    It should be  missing related configuration sysconfig

  • Hi Haojie,

    1. The issue here is that it is a delay while loop and not just a sleep for the TCP Server task, it will stop and consume the whole CPU performance, the OS tick is configured to have accuracy of 1ms or (1000us), so anything less than that would block the CPU and basically the TCP Server task thread would become blocked. Due to this, even if your TCP client tries to connect to the Server, since the Server task thread is blocked, it won't be able to accept the incoming connection. So, I recommend not changing the Sleep to less than 1000us as it is not the Server thread sleep but the whole CPU operation being put to hold.

    2. Yes, sorry i missed out on mentioning, you need to change the example.syscfg as well, for ENET_CPSW_TCPSERVER, you can refer the example.syscfg file of examples/networking/lwip/enet_cpsw_tcpserver/am243x-lp/rf5ss0-0_freertos/example.syscfg. You will have to add components such as CPSW accordingly in syscfg. Please follow the example's syscfg file and add the same configurations to your ipc shared mem example as well.

    Please just compare the example.syscfg files and add the modules accordingly, apologies for missing out on this point in my previous reply.

    Adding syscfg configurations and rebuilding should resolve the mentioned errors.

    Regards,
    Shaunak

  • 1.So how should I achieve my goal? Currently, the transmission efficiency is too low, and there will be a delay interval of about 500ms after sending a few frames. As can be seen from the previous problem description, is it caused by the update window? Can you help me solve it?

    Target:Each time LP-AM243 sends no more than 32K data, with 1800 frames per second。

  •  if there is a software issue with my client's upper computer, which  software should I try to use for testing。

    Here is the client software I am using

  • HI Haojie

    1.I'll just confirm again, you don't face issue in sending the data, right? You are able to send all the data, It is just that the delays are an issue. Confirming so we don't go on the wrong debug track here. If bad performance caused by the delay here is the issue, i'll have to check internally with the development team and get back to you. 

    2. Instead of sscom, you could try using Hercules (Hercules SETUP utility | HW-group.com)

    Regards,
    Shaunak

  • Hi,

    Yes, the data can be sent normally, mainly due to efficiency issues, which cannot meet our goals. Also, do we need to enable the AM243 Ethernet giant frame packet function

  • Hi Haojie,

    Just to let us understand the issue better, can you help me by performing some changes in your code.

    1. Instead of a delay after every netconn_write operation, can you create a for loop as described below and try sending out the data. Please let me know what the behavior of application is when you do so.

    while(1)
    {
        ClockP_sleep(1000);
        App_printCpuLoad();
        for(uint8_t i=0; i<15; i++)
        {
            if(pClientConn!=NULL)
            {
                netconn_write(pClientConn, g_aucTxDisBuf1, LENGTH, 1);
            }
        }
    }

    2. Can you try sending data in batch operations instead of Jumbo frames, for example, send out 2-3 frames every 1ms?

    If you can help me out with the above results I can internally try and get a solution for improving your efficiency.

    Regards,
    Shaunak

  • HI,

    Hercules (Hercules SETUP utility | HW-group.com)   Easy to get stuck。

    I use my own software

    There is still a gap:about   500ms

    The following message appears

  • Hi Haojie, 

    I am looking into it

    ~Shaunak

  • Hi,
    Okay, thank you. This is very important for us
  • Hi Shaunak,

    I'm Sirui Zhu, FAE of ti. This is my customer's project. Could you please help if you have any update?

    BR
    Sirui

  • HI Sirui,

    I would like to replicate the setup with single core project.  If I convert the requirements in to speed, it turn out to be 21.6 mbps. (assuming 1500B per frame @ 1800 frames/sec).
    With TCP on AM243x, it is not difficult to achieve this data rate.
    What is the data rate of 32kB packets need to be send via TCP, in packets per second?
    Can you please share how is your TCP server client setup? I want to recreate this locally and propose the solution.

    With regards,

    Pradeep

  • Hi Sirui,
      Would suggest the below changes in the application (example), syscfg GUI and  LwIP TCP/IP configuration.
    With this locally I am able to improve TCP Tx throughput numbers, ofcourse, by compromising on the memory footprints.

    1. Increase the pktInfoMem Only Count to 128 in syscfg GUI packet pool config

     

     

    1. Increase TX DMA descriptors-

     

     

     

    1. Configure TCP specific parameters as per the attached file ‘tcp_perf_patch.txt’.
      Changes are 'enet_cpsw_tcpserver' example, lwip_opts.h and lwip_pools.h files

     

    diff --git a/examples/networking/lwip/enet_cpsw_tcpserver/am243x-lp/r5fss0-0_freertos/example.syscfg b/examples/networking/lwip/enet_cpsw_tcpserver/am243x-lp/r5fss0-0_freertos/example.syscfg
    index 51e1cb4c7d..c7f85eda98 100644
    --- a/examples/networking/lwip/enet_cpsw_tcpserver/am243x-lp/r5fss0-0_freertos/example.syscfg
    +++ b/examples/networking/lwip/enet_cpsw_tcpserver/am243x-lp/r5fss0-0_freertos/example.syscfg
    @@ -2,7 +2,7 @@
      * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
      * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
      * @cliArgs --device "AM243x_ALX_beta" --package "ALX" --part "ALX" --context "r5fss0-0" --product "MCU_PLUS_SDK@07.03.01"
    - * @versions {"tool":"1.14.0+2667"}
    + * @versions {"tool":"1.17.0+3128"}
      */
     
     /**
    @@ -37,19 +37,20 @@ gpio1.pinDir               = "OUTPUT";
     gpio1.$name                = "CONFIG_ENET_RGMII_PHY_RST";
     gpio1.GPIO.$assign         = "GPIO0";
     gpio1.GPIO.gpioPin.pu_pd   = "pu";
    -gpio1.GPIO.gpioPin.$assign = "ball.W20";
    +gpio1.GPIO.gpioPin.$assign = "GPMC0_AD11";
     
     gpio2.pinDir               = "OUTPUT";
     gpio2.$name                = "CONFIG_ENET_RGMII_MUX_SEL";
     gpio2.GPIO.$assign         = "GPIO0";
     gpio2.GPIO.gpioPin.pu_pd   = "pu";
    -gpio2.GPIO.gpioPin.$assign = "ball.Y20";
    +gpio2.GPIO.gpioPin.$assign = "GPMC0_AD12";
     
     i2c1.$name               = "CONFIG_I2C0";
     eeprom1.peripheralDriver = i2c1;
     i2c1.I2C.$assign         = "I2C0";
     
    -pruicss1.$name = "CONFIG_PRU_ICSS0";
    +pruicss1.$name                           = "CONFIG_PRU_ICSS0";
    +pruicss1.AdditionalICSSSettings[0].$name = "CONFIG_PRU_ICSS_IO0";
     
     debug_log.enableUartLog        = true;
     debug_log.enableCssLog         = false;
    @@ -86,21 +87,23 @@ mpu_armv76.$name    = "CONFIG_MPU_REGION6";
     mpu_armv76.size     = 27;
     mpu_armv76.baseAddr = 0x60000000;
     
    -enet_cpsw1.$name                       = "CONFIG_ENET_CPSW0";
    -enet_cpsw1.DisableMacPort2             = true;
    -enet_cpsw1.PktInfoOnlyEnable           = true;
    -enet_cpsw1.LargePoolPktCount           = 32;
    -enet_cpsw1.mdioMode                    = "MDIO_MODE_MANUAL";
    -enet_cpsw1.txDmaChannel[0].$name       = "ENET_DMA_TX_CH0";
    -enet_cpsw1.rxDmaChannel[0].$name       = "ENET_DMA_RX_CH0";
    -enet_cpsw1.pinmux[0].$name             = "ENET_CPSW_PINMUX0";
    -enet_cpsw1.pinmux[0].MDIO.$assign      = "MDIO0";
    -enet_cpsw1.pinmux[0].MDIO.MDC.$assign  = "ball.W1";
    -enet_cpsw1.pinmux[0].MDIO.MDIO.$assign = "ball.V2";
    -enet_cpsw1.pinmux[0].RGMII1.$assign    = "RGMII1";
    -enet_cpsw1.pinmux[0].RGMII2.$assign    = "RGMII2";
    +enet_cpsw1.$name                        = "CONFIG_ENET_CPSW0";
    +enet_cpsw1.DisableMacPort2              = true;
    +enet_cpsw1.PktInfoOnlyEnable            = true;
    +enet_cpsw1.mdioMode                     = "MDIO_MODE_MANUAL";
    +enet_cpsw1.LargePoolPktCount            = 32;
    +enet_cpsw1.PktInfoOnlyCount             = 128;
    +enet_cpsw1.txDmaChannel[0].$name        = "ENET_DMA_TX_CH0";
    +enet_cpsw1.txDmaChannel[0].PacketsCount = 128;
    +enet_cpsw1.rxDmaChannel[0].$name        = "ENET_DMA_RX_CH0";
    +enet_cpsw1.pinmux[0].$name              = "ENET_CPSW_PINMUX0";
    +enet_cpsw1.pinmux[0].MDIO.$assign       = "MDIO0";
    +enet_cpsw1.pinmux[0].MDIO.MDC.$assign   = "PRG1_MDIO0_MDC";
    +enet_cpsw1.pinmux[0].MDIO.MDIO.$assign  = "PRG1_MDIO0_MDIO";
    +enet_cpsw1.pinmux[0].RGMII1.$assign     = "RGMII1";
    +enet_cpsw1.pinmux[0].RGMII2.$assign     = "RGMII2";
     enet_cpsw1.netifInstance.create(1);
    -enet_cpsw1.netifInstance[0].$name      = "NETIF_INST_ID0";
    +enet_cpsw1.netifInstance[0].$name       = "NETIF_INST_ID0";
     
     const udma         = scripting.addModule("/drivers/udma/udma", {}, false);
     const udma1        = udma.addInstance({}, false);
    @@ -111,31 +114,31 @@ enet_cpsw1.udmaDrv = udma1;
      * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
      * re-solve from scratch.
      */
    -i2c1.I2C.SCL.$suggestSolution                       = "ball.B16";
    -i2c1.I2C.SDA.$suggestSolution                       = "ball.B15";
    -debug_log.uartLog.UART.RXD.$suggestSolution         = "ball.B10";
    -debug_log.uartLog.UART.TXD.$suggestSolution         = "ball.B11";
    -enet_cpsw1.pinmux[0].RGMII1.RD0.$suggestSolution    = "ball.T5";
    -enet_cpsw1.pinmux[0].RGMII1.RD1.$suggestSolution    = "ball.R2";
    -enet_cpsw1.pinmux[0].RGMII1.RD2.$suggestSolution    = "ball.U2";
    -enet_cpsw1.pinmux[0].RGMII1.RD3.$suggestSolution    = "ball.T1";
    -enet_cpsw1.pinmux[0].RGMII1.RX_CTL.$suggestSolution = "ball.Y3";
    -enet_cpsw1.pinmux[0].RGMII1.RXC.$suggestSolution    = "ball.U1";
    -enet_cpsw1.pinmux[0].RGMII1.TD0.$suggestSolution    = "ball.Y14";
    -enet_cpsw1.pinmux[0].RGMII1.TD1.$suggestSolution    = "ball.Y16";
    -enet_cpsw1.pinmux[0].RGMII1.TD2.$suggestSolution    = "ball.U13";
    -enet_cpsw1.pinmux[0].RGMII1.TD3.$suggestSolution    = "ball.AA14";
    -enet_cpsw1.pinmux[0].RGMII1.TX_CTL.$suggestSolution = "ball.W16";
    -enet_cpsw1.pinmux[0].RGMII1.TXC.$suggestSolution    = "ball.W13";
    -enet_cpsw1.pinmux[0].RGMII2.RD0.$suggestSolution    = "ball.AA10";
    -enet_cpsw1.pinmux[0].RGMII2.RD1.$suggestSolution    = "ball.Y10";
    -enet_cpsw1.pinmux[0].RGMII2.RD2.$suggestSolution    = "ball.Y11";
    -enet_cpsw1.pinmux[0].RGMII2.RD3.$suggestSolution    = "ball.V12";
    -enet_cpsw1.pinmux[0].RGMII2.RX_CTL.$suggestSolution = "ball.Y12";
    -enet_cpsw1.pinmux[0].RGMII2.RXC.$suggestSolution    = "ball.V10";
    -enet_cpsw1.pinmux[0].RGMII2.TD0.$suggestSolution    = "ball.Y6";
    -enet_cpsw1.pinmux[0].RGMII2.TD1.$suggestSolution    = "ball.AA8";
    -enet_cpsw1.pinmux[0].RGMII2.TD2.$suggestSolution    = "ball.Y9";
    -enet_cpsw1.pinmux[0].RGMII2.TD3.$suggestSolution    = "ball.W9";
    -enet_cpsw1.pinmux[0].RGMII2.TX_CTL.$suggestSolution = "ball.V9";
    -enet_cpsw1.pinmux[0].RGMII2.TXC.$suggestSolution    = "ball.Y8";
    +i2c1.I2C.SCL.$suggestSolution                       = "I2C0_SCL";
    +i2c1.I2C.SDA.$suggestSolution                       = "I2C0_SDA";
    +debug_log.uartLog.UART.RXD.$suggestSolution         = "UART0_RXD";
    +debug_log.uartLog.UART.TXD.$suggestSolution         = "UART0_TXD";
    +enet_cpsw1.pinmux[0].RGMII1.RD0.$suggestSolution    = "PRG0_PRU1_GPO7";
    +enet_cpsw1.pinmux[0].RGMII1.RD1.$suggestSolution    = "PRG0_PRU1_GPO9";
    +enet_cpsw1.pinmux[0].RGMII1.RD2.$suggestSolution    = "PRG0_PRU1_GPO10";
    +enet_cpsw1.pinmux[0].RGMII1.RD3.$suggestSolution    = "PRG0_PRU1_GPO17";
    +enet_cpsw1.pinmux[0].RGMII1.RX_CTL.$suggestSolution = "PRG0_PRU0_GPO9";
    +enet_cpsw1.pinmux[0].RGMII1.RXC.$suggestSolution    = "PRG0_PRU0_GPO10";
    +enet_cpsw1.pinmux[0].RGMII1.TD0.$suggestSolution    = "PRG1_PRU1_GPO7";
    +enet_cpsw1.pinmux[0].RGMII1.TD1.$suggestSolution    = "PRG1_PRU1_GPO9";
    +enet_cpsw1.pinmux[0].RGMII1.TD2.$suggestSolution    = "PRG1_PRU1_GPO10";
    +enet_cpsw1.pinmux[0].RGMII1.TD3.$suggestSolution    = "PRG1_PRU1_GPO17";
    +enet_cpsw1.pinmux[0].RGMII1.TX_CTL.$suggestSolution = "PRG1_PRU0_GPO9";
    +enet_cpsw1.pinmux[0].RGMII1.TXC.$suggestSolution    = "PRG1_PRU0_GPO10";
    +enet_cpsw1.pinmux[0].RGMII2.RD0.$suggestSolution    = "PRG1_PRU1_GPO0";
    +enet_cpsw1.pinmux[0].RGMII2.RD1.$suggestSolution    = "PRG1_PRU1_GPO1";
    +enet_cpsw1.pinmux[0].RGMII2.RD2.$suggestSolution    = "PRG1_PRU1_GPO2";
    +enet_cpsw1.pinmux[0].RGMII2.RD3.$suggestSolution    = "PRG1_PRU1_GPO3";
    +enet_cpsw1.pinmux[0].RGMII2.RX_CTL.$suggestSolution = "PRG1_PRU1_GPO4";
    +enet_cpsw1.pinmux[0].RGMII2.RXC.$suggestSolution    = "PRG1_PRU1_GPO6";
    +enet_cpsw1.pinmux[0].RGMII2.TD0.$suggestSolution    = "PRG1_PRU1_GPO11";
    +enet_cpsw1.pinmux[0].RGMII2.TD1.$suggestSolution    = "PRG1_PRU1_GPO12";
    +enet_cpsw1.pinmux[0].RGMII2.TD2.$suggestSolution    = "PRG1_PRU1_GPO13";
    +enet_cpsw1.pinmux[0].RGMII2.TD3.$suggestSolution    = "PRG1_PRU1_GPO14";
    +enet_cpsw1.pinmux[0].RGMII2.TX_CTL.$suggestSolution = "PRG1_PRU1_GPO15";
    +enet_cpsw1.pinmux[0].RGMII2.TXC.$suggestSolution    = "PRG1_PRU1_GPO16";
    diff --git a/examples/networking/lwip/enet_cpsw_tcpserver/app_tcpserver.c b/examples/networking/lwip/enet_cpsw_tcpserver/app_tcpserver.c
    index db018d1ff2..562879e017 100644
    --- a/examples/networking/lwip/enet_cpsw_tcpserver/app_tcpserver.c
    +++ b/examples/networking/lwip/enet_cpsw_tcpserver/app_tcpserver.c
    @@ -47,7 +47,8 @@
     /* ========================================================================== */
     #define APP_SERVER_PORT  (8888)
     
    -static const uint8_t APP_CLIENT_TX_MSG1[] = "Greetings from Texas Instruments!";
    +#define  APP_CLIENT_TX_MSG1_LEN (20000U)
    +static uint8_t APP_CLIENT_TX_MSG1[APP_CLIENT_TX_MSG1_LEN] = {'A'};
     
     /* ========================================================================== */
     /*                         Structure Declarations                             */
    @@ -69,64 +70,50 @@ static void AppTcp_ServerTask(void *arg);
     /*                          Function Definitions                              */
     /* ========================================================================== */
     
    -static void AppTcp_echoPckt(struct netconn *pClientConn)
    +static err_t AppTcp_sendPckt(struct netconn *pClientConn)
     {
    -    struct netbuf *buf;
    -    void *data;
    -    u16_t len;
         err_t err;
     
    -    while ((err = netconn_recv(pClientConn, &buf)) == ERR_OK)
    +    err = netconn_write(pClientConn, APP_CLIENT_TX_MSG1, APP_CLIENT_TX_MSG1_LEN, NETCONN_COPY);
    +    if (err != ERR_OK)
         {
    -        err = netconn_write(pClientConn, APP_CLIENT_TX_MSG1, sizeof(APP_CLIENT_TX_MSG1), NETCONN_COPY);
    -        if (err != ERR_OK)
    -        {
    -            printf("tcpecho: netconn_write: error \"%s\"\r\n", lwip_strerr(err));
    -            break;
    -        }
    -        do
    -        {
    -            netbuf_data(buf, &data, &len);
    -            err = netconn_write(pClientConn, data, len, NETCONN_COPY);
    -            if (err != ERR_OK)
    -            {
    -                printf("tcpecho: netconn_write: error \"%s\"\r\n", lwip_strerr(err));
    -            }
    -
    -        } while (netbuf_next(buf) >= 0);
    -        netbuf_delete(buf);
    +        printf("tcpecho: netconn_write: error \"%s\"\r\n", lwip_strerr(err));
         }
    +    return err;
     }
     
     static void AppTcp_ServerTask(void *arg)
     {
         struct netconn *pConn = NULL, *pClientConn = NULL;
         err_t err;
    -    LWIP_UNUSED_ARG(arg);
    -
    +    LWIP_UNUSED_ARG(arg);   
    +    memset(APP_CLIENT_TX_MSG1, 'a', APP_CLIENT_TX_MSG1_LEN);
    +    APP_CLIENT_TX_MSG1[APP_CLIENT_TX_MSG1_LEN - 1] = '\0'; // NULL termination
         pConn = netconn_new(NETCONN_TCP);
         netconn_bind(pConn, IP_ADDR_ANY, APP_SERVER_PORT);
         LWIP_ERROR("tcpecho: invalid conn\r\n", (pConn != NULL), return;);
     
         /* Tell connection to go into listening mode. */
         netconn_listen(pConn);
    -
    +    
         while (1)
         {
    -
             /* Grab new connection. */
    +        printf("waiting for client connection request\r\n");
             err = netconn_accept(pConn, &pClientConn);
             printf("accepted new connection %p\r\n", pClientConn);
    -
             /* Process the new connection. */
    -        if (err < ERR_OK)
    +        if ((err < ERR_OK) && (pClientConn == NULL))
             {
                 DebugP_log("Unable to accept connection: errno %d\r\n", err);
    -            break;
    +            continue;
             }
    -
    -        AppTcp_echoPckt(pClientConn);
    -
    +        while (err == ERR_OK)
    +        {
    +            err = AppTcp_sendPckt(pClientConn);
    +//            ClockP_usleep(1);
    +        }
    +        DebugP_log("Client Closed | errno: %d\r\n", err);
             /* Close connection and discard connection identifier. */
             netconn_close(pClientConn);
             netconn_delete(pClientConn);
    diff --git a/source/networking/lwip/lwip-config/am243x/lwipopts.h b/source/networking/lwip/lwip-config/am243x/lwipopts.h
    index 52ada5cb03..748b2df09e 100644
    --- a/source/networking/lwip/lwip-config/am243x/lwipopts.h
    +++ b/source/networking/lwip/lwip-config/am243x/lwipopts.h
    @@ -164,7 +164,7 @@ extern "C"
     /* MEMP_NUM_PBUF: the number of memp struct pbufs. If the application
        sends a lot of data out of ROM (or other static memory), this
        should be set high. */
    -#define MEMP_NUM_PBUF           128
    +#define MEMP_NUM_PBUF           256
     /* MEMP_NUM_RAW_PCB: the number of UDP protocol control blocks. One
        per active RAW "connection". */
     #define MEMP_NUM_RAW_PCB        3
    @@ -173,13 +173,13 @@ extern "C"
     #define MEMP_NUM_UDP_PCB        4
     /* MEMP_NUM_TCP_PCB: the number of simulatenously active TCP
        connections. */
    -#define MEMP_NUM_TCP_PCB        5
    +#define MEMP_NUM_TCP_PCB        10
     /* MEMP_NUM_TCP_PCB_LISTEN: the number of listening TCP
        connections. */
     #define MEMP_NUM_TCP_PCB_LISTEN 8
     /* MEMP_NUM_TCP_SEG: the number of simultaneously queued TCP
        segments. */
    -#define MEMP_NUM_TCP_SEG        128
    +#define MEMP_NUM_TCP_SEG        800
     /* MEMP_NUM_SYS_TIMEOUT: the number of simulateously active
        timeouts. */
     #define MEMP_NUM_SYS_TIMEOUT    17
    @@ -187,14 +187,14 @@ extern "C"
     /* The following four are used only with the sequential API and can be
        set to 0 if the application only will use the raw API. */
     /* MEMP_NUM_NETBUF: the number of struct netbufs. */
    -#define MEMP_NUM_NETBUF         128
    +#define MEMP_NUM_NETBUF         512
     /* MEMP_NUM_NETCONN: the number of struct netconns. */
    -#define MEMP_NUM_NETCONN        10
    +#define MEMP_NUM_NETCONN        20
     /* MEMP_NUM_TCPIP_MSG_*: the number of struct tcpip_msg, which is used
        for sequential API communication and incoming packets. Used in
        src/api/tcpip.c. */
    -#define MEMP_NUM_TCPIP_MSG_API   128
    -#define MEMP_NUM_TCPIP_MSG_INPKT 128
    +#define MEMP_NUM_TCPIP_MSG_API   512
    +#define MEMP_NUM_TCPIP_MSG_INPKT 512
     
     /* Debug checks - will impact throughput if enabled */
     #define MEMP_OVERFLOW_CHECK      (0)
    @@ -242,11 +242,11 @@ extern "C"
     #define TCP_MSS                 1460
     
     /* TCP sender buffer space (bytes). */
    -#define TCP_SND_BUF             (8 * TCP_MSS)
    +#define TCP_SND_BUF             (24 * TCP_MSS)
     
     /* TCP sender buffer space (pbufs). This must be at least = 2 *
        TCP_SND_BUF/TCP_MSS for things to work. */
    -#define TCP_SND_QUEUELEN       (8 * TCP_SND_BUF/TCP_MSS)
    +#define TCP_SND_QUEUELEN       (32 * TCP_SND_BUF/TCP_MSS)
     
     /* TCP writable space (bytes). This must be less than or equal
        to TCP_SND_BUF. It is the amount of space which must be
    @@ -257,13 +257,13 @@ extern "C"
     #define TCP_WND                 (TCP_SND_BUF)
     
     /* Maximum number of retransmissions of data segments. */
    -#define TCP_MAXRTX              12
    +#define TCP_MAXRTX              2
     
     /* Maximum number of retransmissions of SYN segments. */
     #define TCP_SYNMAXRTX           4
     
    -#define DEFAULT_THREAD_STACKSIZE    (5 * 1024)
    -#define TCPIP_THREAD_STACKSIZE      (8 * 1024)
    +#define DEFAULT_THREAD_STACKSIZE    (8 * 1024)
    +#define TCPIP_THREAD_STACKSIZE      (10 * 1024)
     
     //#define LWIP_FREERTOS_THREAD_STACKSIZE_IS_STACKWORDS (1)
     
    diff --git a/source/networking/lwip/lwip-config/am243x/lwippools.h b/source/networking/lwip/lwip-config/am243x/lwippools.h
    index 5549c46206..24ff65256d 100644
    --- a/source/networking/lwip/lwip-config/am243x/lwippools.h
    +++ b/source/networking/lwip/lwip-config/am243x/lwippools.h
    @@ -8,9 +8,9 @@
     
     #if MEM_USE_POOLS
     LWIP_MALLOC_MEMPOOL_START
    -LWIP_MALLOC_MEMPOOL(25, 128)
    -LWIP_MALLOC_MEMPOOL(18, 1568)
    -LWIP_MALLOC_MEMPOOL(4, 4096)
    +LWIP_MALLOC_MEMPOOL(64, 128)
    +LWIP_MALLOC_MEMPOOL(128, 1568)
    +LWIP_MALLOC_MEMPOOL(32, 4096)
     LWIP_MALLOC_MEMPOOL_END
     #endif /* MEM_USE_POOLS */
     

    - You may refer to https://lwip.fandom.com/wiki/Maximizing_throughput and https://lwip.fandom.com/wiki/Tuning_TCP  to know more.

    1. Try to increase the TCP window length in the sscom5.11c software.
    2. Please modify the example ‘examples/networking/lwip/enet_cpsw_tcpserver’ as per suggestion in ‘tcp_perf_patch.txt’.
    3. Recompile the libraries:
      $ cd C:/ti/<mcu_plus_sdk>/
      $ gmake -s -j 4 DEVICE:=am243x PROFILE:=debug libs-clean
      $ gmake -s -j 4 DEVICE:=am243x PROFILE:=release libs-clean
      $ gmake -s -j 4 DEVICE:=am243x PROFILE:=debug libs
      $ gmake -s -j 4 DEVICE:=am243x PROFILE:=release libs
    4. Recompile the example

    6. After this recompile the libraries and ‘examples/networking/lwip/enet_cpsw_tcpserver’ and run the example. 

    Please note that the above changes are improves the transmission performance by compromising on memory. Let me know if it helps.

    With regards,

    Pradeep