大家PING ENC28j60的速度是多少啊?
本帖最后由 onbluesun 于 2012-5-22 17:07 编辑我的似乎很慢,这个数据正常吗?
附上源码。 MCU: cortex-M3 (STM32/FM3)
软件:RT-Thread + LWIPping大包测试:
//单包
Reply from 192.168.1.30: bytes=1400 time=8ms TTL=255
Reply from 192.168.1.30: bytes=1400 time=8ms TTL=255
//两包连发
Reply from 192.168.1.30: bytes=1500 time=9ms TTL=255
Reply from 192.168.1.30: bytes=1500 time=9ms TTL=255
//3包连发
Reply from 192.168.1.30: bytes=4096 time=15ms TTL=255
Reply from 192.168.1.30: bytes=4096 time=15ms TTL=255
//4包连发
Reply from 192.168.1.30: bytes=4800 time=17ms TTL=255
Reply from 192.168.1.30: bytes=4800 time=17ms TTL=255
//5包连发
Reply from 192.168.1.30: bytes=6000 time=21ms TTL=255
Reply from 192.168.1.30: bytes=6000 time=21ms TTL=255
//6包连发
Reply from 192.168.1.30: bytes=7500 time=24ms TTL=255
Reply from 192.168.1.30: bytes=7500 time=24ms TTL=255
//7包连发
Reply from 192.168.1.30: bytes=9000 time=28ms TTL=255
Reply from 192.168.1.30: bytes=9000 time=28ms TTL=255
//8包连发 (包长大于10500)测试失败。性能测试:TCP connection established.
Packet size1k bytes:417.63 KByte/s Tx,4876 Byte/s Rx.
Packet size2k bytes:359.30 KByte/s Tx,289.21 KByte/s Rx.
Packet size4k bytes:330.78 KByte/s Tx,626.61 KByte/s Rx.
Packet size8k bytes:391.32 KByte/s Tx,631.33 KByte/s Rx.
Packet size 16k bytes:436.69 KByte/s Tx,598.15 KByte/s Rx.
Packet size 32k bytes:371.36 KByte/s Tx,609.27 KByte/s Rx.
Done.在前面的测试中,SPI是使用轮询方式,总线利用率比较低,改为DMA方式后,速度有所提升。
一次最大可以接收10个数据包:C:\>ping 192.168.1.30 -l 14792
Reply from 192.168.1.30: bytes=14792 time=28ms TTL=255
Reply from 192.168.1.30: bytes=14792 time=28ms TTL=255发送速度提高,接收速度区别不大:TCP connection established.
Packet size1k bytes:306.63 KByte/s Tx,4362 Byte/s Rx.
Packet size2k bytes:242.41 KByte/s Tx,447.93 KByte/s Rx.
Packet size4k bytes:415.20 KByte/s Tx,846.62 KByte/s Rx.
Packet size8k bytes:324.54 KByte/s Tx,850.09 KByte/s Rx.
Packet size 16k bytes:354.62 KByte/s Tx,837.03 KByte/s Rx.
Packet size 32k bytes:358.39 KByte/s Tx,832.16 KByte/s Rx.
Done.主要提高的是发送能力,详细情况如下:icmp reply speed: 1188 kBytes/s
UDP 32 bytes Rx speed: 78 kBytes/s
UDP 64 bytes Rx speed:156 kBytes/s
UDP128 bytes Rx speed:312 kBytes/s
UDP512 bytes Rx speed:833 kBytes/s
UDP 1024 bytes Rx speed: 1000 kBytes/s
UDP 1460 bytes Rx speed: 1188 kBytes/s 不加enc28j60的INT中断,裸奔情况下,这个延迟正常,加了中断或者LWIP的话,这个延迟有点大。 我用的是STC90C516RD+单片机,晶振是11.0592MHZ的。 学习了。
页:
[1]