CAN driver API - Migration from classical CAN to CAN FD - - PowerPoint PPT Presentation

can driver api migration from classical can to can fd
SMART_READER_LITE
LIVE PREVIEW

CAN driver API - Migration from classical CAN to CAN FD - - PowerPoint PPT Presentation

CAN driver API - Migration from classical CAN to CAN FD MicroControl CAN driver API - migration from classical CAN to CAN FD Anonymous CAN Programmers meeting Uwe Koppe Technical director CAN in Automation e.V. (CiA) I am


slide-1
SLIDE 1

MicroControl • CAN driver API - migration from classical CAN to CAN FD

CAN driver API -
 Migration from classical CAN to CAN FD

slide-2
SLIDE 2

MicroControl • CAN driver API - migration from classical CAN to CAN FD

Anonymous CAN Programmer’s meeting

  • Uwe Koppe
  • Technical director CAN in

Automation e.V. (CiA)

„I am writing software for CAN bus applications.“

slide-3
SLIDE 3

MicroControl • CAN driver API - migration from classical CAN to CAN FD

Some APIs for CAN …

The logos shown here are property of the respective rights holder.

. . a n d m a n y m

  • r

e

slide-4
SLIDE 4

MicroControl • CAN driver API - migration from classical CAN to CAN FD

Example - CANopen Conformance Test

COTI

slide-5
SLIDE 5

MicroControl • CAN driver API - migration from classical CAN to CAN FD

Requirements for CAN FD API

  • CiA 601-2

CAN controller interface specification

  • CiA 603

Requirements for network time management

slide-6
SLIDE 6

MicroControl • CAN driver API - migration from classical CAN to CAN FD

CiA 601-2 - CAN state FSA

  • receive-only
  • self-test
  • low-power
slide-7
SLIDE 7

MicroControl • CAN driver API - migration from classical CAN to CAN FD

CiA 601-2 - Message buffers

  • Message buffers
  • Single buffers
  • FIFO queue
  • Priority queue
  • Acceptance filtering
slide-8
SLIDE 8

MicroControl • CAN driver API - migration from classical CAN to CAN FD

CiA 603 - Time-stamp

  • 64 Bit
  • Defined resolution

CAN-Interface Application

Message Time-stamp

slide-9
SLIDE 9

MicroControl • CAN driver API - migration from classical CAN to CAN FD

Some additional features

  • Message marker
  • CAN error status
  • Event support
  • Request capabilities
slide-10
SLIDE 10

MicroControl • CAN driver API - migration from classical CAN to CAN FD

„Soft“ Requirements

  • Documentation
  • Code compliance
  • License
  • TCO

CiA General Assembly

15.03.2017 - 18:30

slide-11
SLIDE 11

MicroControl • CAN driver API - migration from classical CAN to CAN FD

CAN API review

  • AUTOSAR
  • can4linux
  • CANpie
  • CMSIS CAN driver
  • SocketCAN
slide-12
SLIDE 12

MicroControl • CAN driver API - migration from classical CAN to CAN FD

AUTOSAR

  • Version 4.3
  • Commercial license
  • 7 documents
  • > 100 functions
  • Configuration tool
  • Not designed for PC interfaces

The logo shown here is property of the respective rights holder.

slide-13
SLIDE 13

MicroControl • CAN driver API - migration from classical CAN to CAN FD

can4linux

  • Version 4.2
  • GPL version 2
  • HTML documentation
  • 5 functions
  • Supports a time-stamp
  • Limited to Linux
slide-14
SLIDE 14

MicroControl • CAN driver API - migration from classical CAN to CAN FD

CANpie

  • Version 3.0
  • LGPL version 3
  • PDF / HTML documentation
  • 21 functions
  • Focus on microcontroller
  • PC interface support via Qt plugins
slide-15
SLIDE 15

MicroControl • CAN driver API - migration from classical CAN to CAN FD

CMSIS CAN driver

  • Version 2.04
  • Apache 2.0
  • HTML documentation
  • 17 functions
  • Focus on ARM microcontroller
  • Part of CMSIS
slide-16
SLIDE 16

MicroControl • CAN driver API - migration from classical CAN to CAN FD

SocketCAN

  • Version unknown
  • GPL version 2
  • Text file in Linux kernel headers
  • 6 functions
  • Limited to Linux
slide-17
SLIDE 17

MicroControl • CAN driver API - migration from classical CAN to CAN FD

API comparison

AUTOSAR can4linux CANpie FD CMSIS Socketcan Version 4.3 4.2 3.0 2.04

  • Device / OS support

Microcontroller Linux Microcontroller, ARM based microcontroller Linux License Commercial GPL version 2 LGPL version 3 Apache 2.0 GPL version 2 User documentation PDF HTML PDF / HTML HTML Text file Test documentation PDF

  • PDF / HTML
  • Test cases

+

  • +
  • Test code

+

  • +
  • Code compliance

MISRA-C

  • MISRA-C

CMSIS

  • API function count

101 5 (35) 21 17 6

slide-18
SLIDE 18

MicroControl • CAN driver API - migration from classical CAN to CAN FD

API comparison

AUTOSAR can4linux CANpie FD CMSIS Socketcan FSA: general + + + + + FSA: self test

  • +

+ +

  • FSA: receive-only
  • +

+ + + FSA: low-power +

  • +
  • Message buffer

+ + + (255 max.) +

  • Acceptance filtering
  • +(1)

+ (255 max.) + + (SW) Message marker

  • +
  • Transmit sequence

FIFO / buffer FIFO FIFO / buffer FIFO / buffer FIFO

slide-19
SLIDE 19

MicroControl • CAN driver API - migration from classical CAN to CAN FD

API comparison

AUTOSAR can4linux CANpie FD CMSIS Socketcan Capability request

  • +

+

  • Event support

+

  • +

+

  • CAN status

+

  • +

+ + CAN message API

  • +
  • CAN message FDF

+ + + + + CAN message BRS +

  • +

+ + CAN message ESI + + + + + CAN time-stamp

  • 1 μs

1 ns

slide-20
SLIDE 20

MicroControl • CAN driver API - migration from classical CAN to CAN FD

I have a dream ..

I have a dream that one day all manufacturers of CAN hardware will be able to sit down together at a table

  • f brotherhood.

I have a dream that one day this CAN community will rise up, and live out the true meaning of its creed: „We hold these truths to be self-evident: that all CAN APIs are created equal.’“ I have a dream today.

  • Dr. Martin Luther King
slide-21
SLIDE 21

MicroControl • CAN driver API - migration from classical CAN to CAN FD

Do your share this dream today?