This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

RL-ARM TCP Stack and AT91SAM9260-EK EMAC driver issues

Hallo,

Keil RL-ARM ( RTOS and TCP Stack ) provides a EMAC driver for AT91SAM7X microcontroller using AT91SAM7X-EK. I did take this EMAC driver and ported it to AT91SAM9260-EK ( almost the same thing despite different IO pins and so on ).

The EMAC driver is being configured to use MII mode, PCLK is ~200Mhz and MCLK is ~100Mhz. The SAM9260-EK jumpers and resistors where changed in order to make it use MII instead of RMII interface ( Factory Default setting ).

I'm testing TCP and UDP performance using an application that works fine on several ARM based eval board like MCB2300, MCBSTR9 and AT91SAM7X-EK.

Here's what happens when I run those tests on AT91SAM9260-EK.:

UDP:

Average transfer speed is 47.2Mbits, this is working as expected.

TCP SAM9260-EK as a server ( using tcp_listen() and telnet on PC ):

I use telnet as a client and the average throughput is 0.4Mbits. Telnet receives data at maximum speed during a few milliseconds and then it issues a TCPZeroWindow ( no more room to receive any data ). SAM9260-EK will retry sending data after one second ( minimum possible retransmission time on RL-ARM TCP Stack ). So on average the performance is tremendously reduced. During a few milliseconds of data burst speed gets up to 24Mbits.

TCP SAM9260-EK as a client ( using tcp_connect () and a specific TCP application on PC ):

It will never connect. PC application and SAM9260-EK will carry a strange conversation where nobody sens to understand each other ( ...1.95 is SAM9260-EK and ...1.31 is my PC ):

No.     Time        Source                Destination           Protocol Info
      1 0.000000    192.168.1.95          192.168.1.37          TCP      4 > cadlock2 [SYN] Seq=0 Win=5840 Len=0

No.     Time        Source                Destination           Protocol Info
2        0.000036    192.168.1.37          192.168.1.95          TCP      cadlock2 > 4 [RST, ACK] Seq=1 Ack=1 Win=0 Len=0

No.     Time        Source                Destination           Protocol Info
3        0.894013    192.168.1.37          192.168.1.95          TCP      cadlock2 > compressnet [SYN, ACK] Seq=0 Ack=0 Win=65535 Len=0 MSS=1460

No.     Time        Source                Destination           Protocol Info
4        0.999346    192.168.1.95          192.168.1.37          TCP      4 > cadlock2 [RST] Seq=0 Win=5840 Len=0

No.     Time        Source                Destination           Protocol Info
5        0.999387    192.168.1.95          192.168.1.37          TCP      rje > cadlock2 [SYN] Seq=0 Win=5840 Len=0

No.     Time        Source                Destination           Protocol Info
6        0.999410    192.168.1.37          192.168.1.95          TCP      cadlock2 > rje [RST, ACK] Seq=1 Ack=1 Win=0 Len=0

No.     Time        Source                Destination           Protocol Info
7        1.998682    192.168.1.95          192.168.1.37          TCP      rje > cadlock2 [SYN] Seq=0 Win=5840 Len=0

My application must send 40MB of data acquisition from the microcontroller's SDRAM to a PC application that will do some work on it.

An TCP download/upload ( depends on the point of view ) is taking ( 40MB / ( 0.4Mbits / 8 bits ) ) = 800 seconds!

Does anybody have attempted to use AT91SAM9260-EK and RL-ARM TCP/IP Stack with better results?

Does anybody have any test application that I could use in order to see a different scene? I don't mind sending my AT91SAM9260-EK EMAC drivers.

Thanks.
Alex

  • Hello, Dear Alex
    I think that your code for TCP protocol dosn't work as expected, because in this protocole, for timing implimetations RL-ARM uses some timers of AT91SAM7X256 that are specific for that MCU and the user interface registers for timers of AT91SAM9260 are different. this dosen't creat any problem in UDP protocol.
    Could I have your code for AT91SAM9260? I will read your code and if i could help, i do.

    bayat@sharif.edu

    Best Regards,
    Pejman Bayat