basic-emac-project
Default mainpagebasic-emac-project
Description Graph
basic-emac-project
 
Purpose
This project uses the Ethernet MAC (EMAC) and the on-board Ethernet transceiver available on Atmel evaluation kits. It enables the device to respond to a ping command sent by a host computer.

Hardware requirements
The system reset signal NRST is connected to both the Ethernet PHY and the JTAG/ICE interface. This prevents the project from working properly when a JTAG probe is connected. To disconnect NRST from the ICE interface, the following modifications must be performed:
See

Description
Upon startup, the program will configure the EMAC with a default IP and MAC addresses and then ask the transceiver to auto-negotiate the best mode of operation. Once this is done, it will start monitoring incoming packets and processing them whenever appropriate. The basic will only answer to two kinds of packets:


To test that the board responds correctly to ping requests, type the following command-line on a computer connected to the same network as the board:
ping 10.159.245.156


Usage
  1. Build the program and download it inside the evaluation board. Please refer to the SAM-BA User Guide, the GNU-Based Software Development application note or to the IAR EWARM User Guide, depending on your chosen solution.
  2. On the computer, open and configure a terminal application (e.g. HyperTerminal on Microsoft Windows) with these settings:
    • 115200 bauds
    • 8 bits of data
    • No parity
    • 1 stop bit
    • No flow control
  3. Connect an Ethernet cable between the evaluation board and the network. The board may be connected directly to a computer; in this case, make sure to use a cross/twisted wired cable such as the one provided with the evaluation kit.
  4. Start the application. It will display the following message on the DBGU:
    -- Basic EMAC Project xxx --
    -- AT91xxxxxx-xx
    -- Compiled: xxx xx xxxx xx:xx:xx --
    MAC 00:45:56:78:9a:bc
    IP 10.159.245.156
    
  5. The program will then auto-negotiate the mode of operation and start receiving packets, displaying feedback on the DBGU. To display additional information, press any key in the terminal application.
  6. To test that the board responds to ICMP ECHO requests, type the following command line in a shell:
    ping 10.159.245.156
    
 
Source
The documentation for this Directory was generated from the following files:
  • main.c