|
|
5 ماه پیش | |
|---|---|---|
| .. | ||
| .settings | 6 ماه پیش | |
| board | 8 ماه پیش | |
| figures | 11 ماه پیش | |
| packages | 6 ماه پیش | |
| rzn | 6 ماه پیش | |
| rzn_cfg | 6 ماه پیش | |
| rzn_gen | 6 ماه پیش | |
| script | 6 ماه پیش | |
| src | 11 ماه پیش | |
| .api_xml | 11 ماه پیش | |
| .config | 6 ماه پیش | |
| .cproject | 6 ماه پیش | |
| .gitignore | 11 ماه پیش | |
| .project | 6 ماه پیش | |
| .secure_azone | 11 ماه پیش | |
| .secure_rzone | 6 ماه پیش | |
| .secure_xml | 6 ماه پیش | |
| Kconfig | 6 ماه پیش | |
| README.md | 5 ماه پیش | |
| README_zh.md | 5 ماه پیش | |
| SConscript | 6 ماه پیش | |
| SConstruct | 11 ماه پیش | |
| buildinfo.ipcf | 6 ماه پیش | |
| buildinfo.json | 6 ماه پیش | |
| configuration.xml | 6 ماه پیش | |
| envsetup.sh | 11 ماه پیش | |
| mklinks.bat | 11 ماه پیش | |
| mklinks.sh | 11 ماه پیش | |
| ozone_scons.jdebug | 11 ماه پیش | |
| project.ewd | 6 ماه پیش | |
| project.ewp | 6 ماه پیش | |
| project.ewt | 6 ماه پیش | |
| project.eww | 11 ماه پیش | |
| rtconfig.h | 6 ماه پیش | |
| rtconfig.py | 11 ماه پیش | |
| rzn_cfg.txt | 6 ماه پیش | |
| template.ewd | 6 ماه پیش | |
| template.ewp | 6 ماه پیش | |
| template.eww | 11 ماه پیش | |
English | 中文
This project provides basic Ethernet functionalities, including ping, tftp, ntp, and iperf.
To use Ethernet, connect the development board to any one of the three network ports using an Ethernet cable, and the other end should be connected to a network switch that has internet access.
Open the project configuration file configuration.xml and add the r_gamc stack:
Next, click on g_ether0 Ethernet, and configure the interrupt callback function to user_ether0_callback:
Now configure the PHY settings. Select g_ether_phy0, set the common configuration to "User Own Target", change the PHY LSI address to 1 (refer to the schematic for the exact address), and set the PHY initialization callback function to ether_phy_targets_initialize_rtl8211_rgmii(). Also, set the MDIO to GMAC.
Next, configure g_ether_selector0, set the Ethernet mode to "Switch Mode", set the PHY link to "Default Active-Low", and choose "RGMII" for the PHY interface mode.
Configure the Ethernet pin parameters and select the operating mode to RGMII:
Finally, configure ETHER_GMAC:
Return to the Studio project, and configure RT-Thread Settings. Click on "Hardware", find the chip device driver, and enable Ethernet:
In the RT-Thread Settings, search for the netutils software package and enable the tftp, iperf, and ntp features:
After flashing the code to the development board, open the serial terminal to view the logs:
netutils-v1.3.3\tools:tftp_server command to start the TFTP server service:Open the installed Tftpd64-4.60 software:
Back at the development board terminal, input ls to see that the 1.txt file has been received. You can input cat 1.txt to check if the file content matches what was sent:
echo "rtthread" 2.txt to create a file with custom content:Open the installed Tftpd64-4.60 software:
2.txt has been successfully received, and its content matches the file in the development board's file system:NTP (Network Time Protocol) is a protocol used to synchronize computer clocks with a global time standard.
After flashing the code to the development board, open the serial terminal to view the logs:
Input the ntp_sync command, and you should see the network time synchronization result. Input the date command to check that the RTC time has been synchronized: