XMOS Ethernet MAC library Application Note

XMOS Ethernet MAC library Application Note

Ethernet connectivity is an essential part of the explosion of connected devices known collectively as the Internet of Things (IoT). XMOS technology is perfectly suited to these applications - offering future proof and reliable ethernet connectivity whilst offering the flexibility to interface to a huge variety of “Things”.

This application note shows a simple example that demonstrates the use of the XMOS MAC library to create a layer 2 ethernet MAC interface on an XMOS multicore microcontroller.

The code associated with this application note provides an example of using the MAC Library to provide a framework for the creation of an ethernet Media Independent Interface (MII) and MAC interface for 100Mbps.

The MAC framework uses XMOS libraries to provide a simple IP stack capable of responding to an ICMP ping message. The code used in the application note provides both MII communication to the PHY and a MAC transport layer for ethernet packets and enables a client to connect to it and send/receive packets.

Required tools and libraries

  • xTIMEcomposer Tools - Version 13.1.0
  • XMOS Ethernet library - Version 2.3.2rc0
  • XMOS OTP Function Library - Version 1.0.0rc0
  • XMOS Slicekit Core Board Support Library - Version 1.0.3rc0
  • XMOS General utility: modules for developing XMOS devices
    • module_locks - Version 1.0.4rc0

Required hardware

This application note is designed to run on an XMOS xCORE-L (General Purpose family) series device. The example code provided with the application has been implemented and tested on the xCORE-L2 sliceKIT 1V2 (XP-SKC-L2) core board using ethernet sliceCARD 1V1 (XA-SK-E100). There is no dependancy on this core board - it can be modified to run on any (XMOS) development board which has the option to connect to the ethernet sliceCARD.

Prerequisites

  • This document assumes familarity with the XMOS xCORE architecture, the Ethernet standards IEEE 802.3u (MII), the XMOS tool chain and the xC language. Documentation related to these aspects which are not specific to this application note are linked to in the references appendix.
  • For a description of XMOS related terms found in this document please see the XMOS Glossary [1].
  • For an overview of Ethernet MAC library please see the XMOS Layer 2 Ethernet MAC Component [2].
[1]

http://www.xmos.com/published/glossary

[2]

https://www.xmos.com/published/xmos-layer-2-ethernet-mac-component