WINC1500 Typical TCP throughput

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi everybody,

 

I'm using the winc1500-mr210pb with an STM32F103, where the final goal is to make file tranfer over WiFi.

I'd like to know if someone here can tell me the throughput i should expect with TCP packets, or at least if my testing process is good.

 

At this time, i use the Atmel WINC1500 in this configuration (This correspond to the final configuration) :

 

   - STM32F103 running at 72MHz, SPI bus is at 18MHz (maximum) with DMA enable

   - WINC1500 configuring as an Access Point (AP)

   - WINC1500 TCP packet size set to 1400 ( maximum from the source code)

   - Compile with optimization -02  (i use Em:Blocks or Keil  IDE)

 

The testing protocol is the following :

 

   1. The PC connect to the Winc1500 AP, a TCP erver is running on the PC and waiting for connection.

   2. When PC is connected, the WINC1500 open a TCP socket with the PC, and is waiting for a character

   3. When winc1500 receives a character, it keep sending a certain amount of data ( like 10 MB ). It sends always the same array from memory wich as a length of 1400 Bytes. The PC is polling for data over the socket (IT's a little program in C#, i think i can assume it should not be            the bottleneck)

   4. When the transfer is over, the stm32 gives the transfert duration, speed transfert, etc.

 

 

The main loop of the STM32 program is :

 

     while(1)

     {

        m2m_wifi_handle_events(NULL);

        if(tranferInProgress)

                send(exchange_socket, txbuffer, CHUNK_SIZE, 0);

     }

 

 

At this time i'm getting a thoughput of 2.48 Mbps ( 310 ko/s), which is not bad.

But i found a document from Atmel (i guess) which gives a throughput of  2.95 Mbits / sec (see attached document, page 6 ) with a SPI at 12MHz.

Moreover, i heard some other engineer saying they reach the Mo / s with the same configuration.

 

So i wonder if i do something bad (like not optimized) or if this is a normal throughput expected in a classic-pertubated environement (like with one Internet box, some PC's on WIFI , maybe one bluetooth device, etc...)

 

Thank you for taking the time to read this and if you have some research tracks for me !

 

 

 

 

 

Attachment(s): 

Embedded System Engineer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello une_poule,

 

I'm trying the same, but I get just a throughput of about 100 kBit/sec. I use 80Mhz Main-clock and 40Mhz Spi-clock. How do you reach MBit/sec and how do you measure it?

Could you please upload your code, so that I can find my bottlenecks?

Last Edited: Sun. Apr 2, 2017 - 07:55 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

I can't post the whole project but here is the two main files.

 

Basically the main just initializes my custom board and handles the winc events.

When a transfert is in progress, i just execute the send function from winc1500 driver in the main loop, and when the send return a success, i consider the data has been send.

 

I also configured the spi bus to use DMA to reach 300ko/s, but the difference is not that much when not using DMA (260 ko/s if i remember well).

 

The problem is that the winc1500 driver makes multiple sending/receive of one byte before sending the whole chunck, so the DMA is not very efficient here.

 

Since the last post i don't had the time to go further investigating the throughtput, maybe in the next months.

Attachment(s): 

Embedded System Engineer

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have also been looking at this.

 

If I send 1 TCP packet, wait for the 'sent' event, then send another 1... then I get a 60ms gap between packets which results in a 100kbit/sec throughput.

If I send 2 TCP packets, wait for the 'sent' event, then send another 2... then I get more continuous sending which results in a 1000kbit/sec throughput.

 

(This is with 10MHz SPI without DMA from a STM32 to WINC1500 in AP mode.)

 

I am speculating that this could be something to do with the low power sleep patterns in the WINC1500, or poor scheduling in it's firmware.

 

Last Edited: Wed. May 24, 2017 - 10:12 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi giddy,

 

Thanks for the contribution,

 

Personnaly i don't use the "sent" event because, as you said, it is relatively slow. I just keep using the send function until it returns a success (i mean not the "busy" error).

 

I think i heard that Atmel (or microship now) is preparing a firmware update, we'll see...

Embedded System Engineer