Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Target System

The port EtherCAT stack is was implemented and tested with on the 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 the AT-SAM53x as host and is internal connected with CPU which is internally connected to 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 internally connected with the
external interrupt lines (pins PB23, PB16) from of the AT-SAM53x CPU.

The driver used uses some modules from of the LAN9255 Peripheral Library provided by Microchip.
The sources are taken from Microchip examples and are adapted as needed. These They are already included in the following delivered package folder:../

  • bsp/microchip/lan9255

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

  • examples/microchip_lan9255/

Additonal the The package support optionally supports a FreeRTOS implementation.
For acivation In order to activate this feature in the ethercat EtherCAT stack, the following project preprocessor defines are necessaryrequired:

  • EC_CONFIG_THREAD_SAFE

  • EC_CONFIG_USE_FREERTOS

For a Please see the following folders for a working FreeRTOS implementation please see in the example folders:..\

  • examples

...

  • /microchip_lan9255

...

  • /s1_lan9255_freertos

...

  • examples

...

  • /microchip_lan9255

...

  • /s10_lan9255_isr_pdi_dc_freertos

These two examples were created with FreeRTOS support. All other examples are bare metal projects.

The FreeRTOS sources are not part of the delivery.
Please download the sources from FreeRTOS (https://www.freertos.org/index.html).

Open IDE projects

...

  1. open

...

  1. the project from the examples folder

...

  1. from within the MPLABX IDE:

    Image Modified

Now you can build both projects.

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

...

The sample projects are designed with port’s ICC tool. The HW configuration uses the LAN9255 CPU entry. Shown here for example s1s01:

...

Please install the ICC plugin for LAN9255 and use this setting also for your own customer projects.

...

  • 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 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 FreeRTOS project version available

  • s11_lan9255_cia402

    • EtherCAT slave with CiA 402 profile example application

...