Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

This document describes the integration of the delivered EtherCAT example projects for Microchip LAN9255 target with the development environment MPLABX IDE.

Target System

The port EtherCAT stack is implemented and tested with Microchip Board “EVB_LAN9255”.

Toolchain:

Compiler/IDE: XC32 v1.42 / MPLABX IDE v6.05 (or newer)
Flash tool/Debugger: Microchip Pickit4

General information

The LAN9255 is a System on Chip solution. The EtherCAT Stack runs on AT-SAM53x as host and is internal connected with a Microchip LAN9253 EtherCAT® slave controller via the SPI interface.
Only this interface to the LAN9253 is implemented.
The interrupt lines IRQ and SYNC0 from the LAN9253 chip are internal connected with the
external interrupt lines (pins PB23, PB16) from the AT-SAM53x CPU.

The driver used some modules from LAN9255 Peripheral Library provided by Microchip.

You can find port’s EtherCAT example projects in the folder of the delivery package:

../examples/microchip_lan9255/

Additonal the package support a FreeRTOS implementation.
For acivation this feature in the ethercat stack the project preprocessor defines are necessary:
EC_CONFIG_THREAD_SAFE
EC_CONFIG_USE_FREERTOS

For a FreeRTOS implementation please see in the example folders:
..\examples\microchip_lan9255\s1_lan9255_freertos
..\examples\microchip_lan9255\s10_lan9255_isr_pdi_dc_freertos

All other examples are bare metal projects.

Open projects

First open a project from the examples folder inside the MPLABX IDE:

Now you can build both projects.

Next step: Open the “Project Properties” and select the appropriate compiler toolchain and the connected debug Hardware Tool:

Now you can download and test the project.

Available sample applications

  • s01_lan9255:

    • SDO read and write

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

    • bare metal or freertos project version available

  • s03_lan9255:

    • SDO read and write

    • SDO Info service

    • SDO Info object names

    • 2 RX-PDOs and 2 TX-PDOs

    • Split SDO-Access

    • Split NMT-Control

    • object dictionary containing objects of various data types

  • s04_lan9255:

    • SDO read and write

    • SDO Info service

    • SDO Info object names

    • 2 RX-PDOs and 2 TX-PDOs

    • Split SDO-Access

    • Split NMT-Control

    • object dictionary containing objects of various data types

    • EoE service with rudimentary ARP and IGMP support (ping)

    • FoE service

  • s05_lan9255:

    • SDO read and write

    • SDO Info service

    • SDO Info object names

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

    • virtual objects

  • s07_lan9255:

    • SDO read and write

    • SDO Info service

    • SDO Info object names

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

    • FoE mailbox service

    • BOOTSTRAP NMT mode

  • s09_lan9255:

    • SDO read and write

    • 2 RX-PDOs and 2 TX-PDOs

    • object dictionary containing objects of various data types

    • dynamic PDO mapping with extension module usr_dynPdoMapping

  • s10_lan9255_xxx:

    • Interrupt handling

    • xxx = isr: PDI Events are handled in an ISR

    • xxx = isr_dc: PDI Events and DC Events are handled in separate ISRs

    • bare metal or freertos project version available

  • s11_lan9255_cia402

    • EtherCAT slave with CiA 402 profile example application

  • No labels