成人免费无码不卡毛片,亚洲AⅤ无码精品一区二区三区,国产尤物精品视频,久久精品日本亚洲,欧美成人一区三区无码乱码A片,中文字日产幕码一区二区色哟哟,亞洲日韓中文字幕網AV

  • 正文
  • 推薦器件
  • 相關(guān)推薦
申請入駐 產(chǎn)業(yè)圖譜

RT1176千兆以太網(wǎng)速率測試

2024/05/19
3779
加入交流群
掃碼加入
獲取工程師必備禮包
參與熱點資訊討論

NXP針對以太網(wǎng)的操作提供了相當(dāng)齊全的例程。主要是freertos加lwip的方案,很經(jīng)典也很好用。

今天筆者就簡單測一下RT1176板卡的千兆以太網(wǎng)速率。這里使用的例程是SDK_2_10_0_MIMXRT1170-EVKboardsevkmimxrt1170lwip_exampleslwip_iperfbmcm7mdk。

iperf是是一個網(wǎng)絡(luò)性能測試工具。Iperf可以測試最大TCPUDP帶寬性能,具有多種參數(shù)和UDP特性,可以根據(jù)需要調(diào)整,可以報告帶寬、延遲抖動和數(shù)據(jù)包丟失。

可以在下面的代碼里面配置默認(rèn)的ip地址、掩碼、網(wǎng)關(guān)。

/* IP address configuration. */
#define configIP_ADDR0 192
#define configIP_ADDR1 168
#define configIP_ADDR2 0
#define configIP_ADDR3 102

/* Netmask configuration. */
#define configNET_MASK0 255
#define configNET_MASK1 255
#define configNET_MASK2 255
#define configNET_MASK3 0

/* Gateway address configuration. */
#define configGW_ADDR0 192
#define configGW_ADDR1 168
#define configGW_ADDR2 0
#define configGW_ADDR3 100

設(shè)備接線

串口打印,這里筆者選擇了1模式,測試TCP的RX速率

上位機顯示,測試時間為60s

最終速率達(dá)到了253Mbit/s,對于一個單片機來說可以說相當(dāng)驚人了。

之后筆者測試了freertos的tcp服務(wù)器的RX速度。不對接收到的數(shù)據(jù)做任何處理

static void
tcpecho_thread(void *arg)
{
struct netconn *conn, *newconn;
err_t err;
LWIP_UNUSED_ARG(arg);

/* Create a new connection identifier. */
/* Bind connection to well known port number 7. */
#if LWIP_IPV6
conn = netconn_new(NETCONN_TCP_IPV6);
netconn_bind(conn, IP6_ADDR_ANY, 7);
#else /* LWIP_IPV6 */
conn = netconn_new(NETCONN_TCP);
netconn_bind(conn, IP_ADDR_ANY, 7);
#endif /* LWIP_IPV6 */
LWIP_ERROR("tcpecho: invalid conn", (conn != NULL), return;);

/* Tell connection to go into listening mode. */
netconn_listen(conn);

while (1) {

/* Grab new connection. */
err = netconn_accept(conn, &newconn);
/*printf("accepted new connection %pn", newconn);*/
/* Process the new connection. */
if (err == ERR_OK) {
struct netbuf *buf;
void *data;
u16_t len;

while ((err = netconn_recv(newconn, &buf)) == ERR_OK) {
// /*printf("Recvedn");*/
// do {
// netbuf_data(buf, &data, &len);
// err = netconn_write(newconn, data, len, NETCONN_COPY);
//#if 0
// if (err != ERR_OK) {
// printf("tcpecho: netconn_write: error "%s"n", lwip_strerr(err));
// }
//#endif
// } while (netbuf_next(buf) >= 0);
netbuf_delete(buf);
}
/*printf("Got EOF, loopingn");*/
/* Close connection and discard connection identifier. */
netconn_close(newconn);
netconn_delete(newconn);
}
}
}

速度大約有45Mbit/s,這里估計是NXP并沒有對其代碼做優(yōu)化,有時間可以繼續(xù)試一下。

推薦器件

更多器件
器件型號 數(shù)量 器件廠商 器件描述 數(shù)據(jù)手冊 ECAD模型 風(fēng)險等級 參考價格 更多信息
AT24C32D-SSHM-T 1 Microchip Technology Inc IC EEPROM 32KBIT 1MHZ 8SOIC

ECAD模型

下載ECAD模型
$0.37 查看
DSC1123BL5-125.0000T 1 Microchip Technology Inc CRYSTAL OSCILLATOR, CLOCK, 125MHz, LVDS OUTPUT
$9.66 查看
ASE-50.000MHZ-L-R-T 1 Abracon Corporation CMOS Output Clock Oscillator, 50MHz Nom, ROHS COMPLIANT, SMD, 4 PIN
$2.75 查看

相關(guān)推薦

板桥市| 阿瓦提县| 台东县| 瓦房店市| 肃宁县| 鄂托克前旗| 兴业县| 昌平区| 定襄县| 宁国市| 五河县| 吴忠市| 泗洪县| 讷河市| 屏南县| 娱乐| 元氏县| 石楼县| 南靖县| 福安市| 鄂托克旗| 行唐县| 会泽县| 天祝| 马鞍山市| 胶州市| 左云县| 扎囊县| 深圳市| 武宁县| 西宁市| 太保市| 乌拉特后旗| 晋江市| 秦安县| 白水县| 瑞金市| 德钦县| 井冈山市| 南昌市| 鄂尔多斯市|