GithubHelp home page GithubHelp logo

1132520084 / canopennode Goto Github PK

View Code? Open in Web Editor NEW

This project forked from canopennode/canopennode

1.0 2.0 0.0 436 KB

License: GNU Lesser General Public License v2.1

C 97.37% Makefile 0.40% HTML 1.39% C++ 0.84%

canopennode's Introduction

CANopenNode is an opensource CANopen Stack.

CANopen is the internationally standardized (EN 50325-4) CAN-based higher-layer protocol for embedded control system. For more information on CANopen see http://www.can-cia.org/

Stack is written in ANSI C in object-oriented way. Code is documented. License is LGPL V2.1.

Variables (communication, device, custom) are ordered in CANopen object dictionary and are accessible from both: C code and from CAN network.


CANopen Features:
 - NMT slave to start, stop, reset device.
 - Heartbeat producer/consumer error control.
 - PDO linking and dynamic mapping for fast exchange of process variables.
 - SDO expedited, segmented and block transfer for service access to all parameters.
 - SDO master.
 - Emergency message.
 - Sync producer/consumer.
 - Nonvolatile storage.


Flowchart of a typical CANopenNode implementation:
                           +-----------------------+
                           |     Program start     |
                           +-----------------------+
                                       |
                           +-----------------------+
                           |     CANopen init      |
                           +-----------------------+
                                       |
                           +-----------------------+
                           |     Start threads     |
                           +-----------------------+
                                 |     |     |
            +--------------------+     |     +--------------------+
            |                          |                          |
+-----------------------+  +-----------------------+  +-----------------------+
| CAN receive thread    |  | Mainline thread       |  | Timer interval thread |
|                       |  |                       |  |                       |
| - Fast response.      |  | - Processing of time  |  | - Realtime thread with|
| - Detect CAN ID.      |  |   consuming tasks     |  |   constant interval,  |
| - Partially process   |  |   in CANopen objects: |  |   typically 1ms.      |
|   messages and copy   |  |    - SDO server,      |  | - Network synchronized|
|   data to target      |  |    - Emergency,       |  | - Copy inputs (RPDOs, |
|   CANopen objects.    |  |    - Network state,   |  |   HW) to Object Dict. |
|                       |  |    - Heartbeat.       |  | - May call application|
|                       |  | - May cyclically call |  |   for some processing.|
|                       |  |   application code.   |  | - Copy variables from |
|                       |  |                       |  |   Object Dictionary to|
|                       |  |                       |  |   outputs (TPDOs, HW).|
+-----------------------+  +-----------------------+  +-----------------------+

             +-----------------------+
             | SDO client (optional) |
             |                       |
             | - Can be called by    |
             |   external application|
             | - Can read or write   |
             |   any variable from   |
             |   Object Dictionary   |
             |   from any node in the|
             |   CANopen network.    |
             +-----------------------+


Usage of the CANopenNode:
    CANopenNode itself doesn't have complete working code for any microcontroller.
    It is only the library with the stack and drivers for different
    microcontrollers. It has example, which should compile on any sistem with
    template driver (drvTemplate), which actually doesn't access CAN hardware.
    CANopenNode should be used as a git submodule included in a project with
    specific hardware and specific application.


Supported microcontrollers:
 - Template for new microcontroller support for CANopenNode:
   - Contributed by Janez Paternoster
   - Status:
     - Well commented.
     - Should compile on any system.
     - No interface to any CAN hardware.
     - Template for parameter storage via objects 0x1010 and 0x1011.

 - Linux socketCAN:
   - Contributed by Janez Paternoster
   - Status:
     - ...

 - eCos RTOS:
   - The driver supports any hardware that is supported by the eCos CAN framework.
     See http://ecos.sourceware.org/
   - Contributed by Uwe Kindler:
     - See: http://sourceforge.net/p/canopennode/discussion/387151/thread/7603e3b5/
   - Tested (sep 2013):
     - Olimex LCP-E2294-1MB board: https://www.olimex.com/Products/ARM/NXP/LPC-E2294-1MB/
     - Olimex LPC-L2294-1MB board: https://www.olimex.com/Products/ARM/NXP/LPC-L2294-1MB/
   - Status:
     - stable.
     - Parameter storage via objects 0x1010 and 0x1011 (eCos generic flash support).

 - Microchip PIC32MX:
   - Contributed by Janez Paternoster
   - Tested (date):
     - 
   - Status:
     - Stable.
     - Parameter storage via objects 0x1010 and 0x1011 (external eeprom).

 - Microchip PIC24H and dsPIC33F:
   - Contributed by Janez Paternoster
   - Tested (date):
     - 
   - Status:
     - stable/unconfirmed

 - Microchip dsPIC30F:
   - Contributed by Janez Paternoster
   - Tested (?):

 - NXP LPC177x (Cortex M3) and FreeRTOS.
   - Contributed by AmitH(sourceforge) (17.9.2014):
     - See: http://sourceforge.net/p/canopennode/discussion/387151/thread/d1b43992
   - Status:
     - unconfirmed

 - Atmel SAM3X:
   - Used with Atmel ASF library.
   - Contributed by Olof Larsson (dec 2014):
     - See: http://sourceforge.net/p/canopennode/discussion/387151/thread/8e789d60/
   - Status:
     - unconfirmed

 - Freescale MCF5282 (ColdFire V2)
   - Contributed by Laurent Grosbois (mar 2012):
     - See: http://sourceforge.net/p/canopennode/code_complete/ci/master/tree/mcf5282_ongoingdev/
   - Status:
     - unconfirmed

 - ST STM32:
   - Contributed by ?
   - Status:
     - unknown


Other known implementations with source code:
 - AD ADSP-CM408 mixed signal controller
   - http://www.analog.com/en/processors-dsp/cm4xx/adsp-cm408f/products/cm40x-ez/eb.html
   - Contributed by Analog devices, Inc. (dec 2014):
     - See: http://sourceforge.net/p/canopennode/discussion/387151/thread/bfbcab97/
   - Package and setup user guide are available at:
     - http://sourceforge.net/projects/canopennode-for-adsp-cm408f/
     - http://sourceforge.net/projects/canopennode-for-adsp-cm408f/files


Discontinued implementations from earlier versions of CANopenNode:
 - Microchip PIC18F
 - BECK IPC Embedded Web-Controller SC243


History of the project:
Project was initially hosted on http://sourceforge.net/projects/canopennode/
It started in 2004 with PIC18F microcontrollers from Microchip.
Fresh, cleaned repository of CANopenNode stack started on 25.7.2015.
For older history see http://sourceforge.net/p/canopennode/code_complete/

canopennode's People

Contributors

canopennode avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.