diff --git a/src/test_gpio.c b/src/test_gpio.c index 02aa0ee..1cafe72 100644 --- a/src/test_gpio.c +++ b/src/test_gpio.c @@ -254,7 +254,7 @@ int main() // printf("Set loopback mode.\n\r"); /* set 100mbps and reset PHY */ - phy_reg = 0x3300; + phy_reg = 0x3300; MiiGpio_PhyWrite(&mii_gpio, PHY_ADDR, 0, phy_reg | 0x8000); /* wait for reset to complete */ @@ -285,8 +285,8 @@ int main() // Disable promiscious mode // *pEmac_rx_ctrl |= EMAC_RX_CTRL_PROMISCIOUS; -// *pEmac_rx_ctrl |= EMAC_RX_CTRL_GIGABIT; -// *pEmac_tx_ctrl |= EMAC_TX_CTRL_GIGABIT; + *pEmac_rx_ctrl |= EMAC_RX_CTRL_GIGABIT; + *pEmac_tx_ctrl |= EMAC_TX_CTRL_GIGABIT; // Set MAC address *(pEmac_maddr+0) = 0x00003110; @@ -385,9 +385,9 @@ int main() */ start = clock(); - for (j=0; j < 1000; j++) + for (j=0; j < 10000; j++) { - Eth_pkt_create(&packet, TYPE_PROTO_IP, eth_myself, pARP->eth_addr_src); + Eth_pkt_create(&packet, TYPE_PROTO_IP, eth_myself, eth_bcst); UDP_create(&packet, myIP, 10001, arpIpDst, 10002, data, sizeof(data)); size = Eth_pkt_send(&packet); tx_byte_cnt += size; @@ -395,10 +395,10 @@ int main() } stop = clock(); - fprintf(stderr, "\n"); - fprintf(stderr, "TX number of burst packets : %d\n", j); - fprintf(stderr, "Throughput: %.2f Mbit/s\n\n", 8.0E-6*(j*size)/((double)(stop-start)/CLOCKS_PER_SEC)); - fprintf(stderr, "%d packets transmitted (%d bytes)\n\n", tx_pkt_cnt, tx_byte_cnt); + fprintf(stdout, "\n"); + fprintf(stdout, "TX number of burst packets : %d\n", j); + fprintf(stdout, "Throughput: %.2f Mbit/s\n\n", 8.0E-6*(j*size)/((double)(stop-start)/CLOCKS_PER_SEC)); + fprintf(stdout, "%d packets transmitted (%d bytes)\n\n", tx_pkt_cnt, tx_byte_cnt); } return 0;