CAN driver API - Migration from classical CAN to CAN FD 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.“ MicroControl • CAN driver API - migration from classical CAN to CAN FD
Some APIs for CAN … e r o m y n a m d n a . . The logos shown here are property of the respective rights holder. MicroControl • CAN driver API - migration from classical CAN to CAN FD
Example - CANopen Conformance Test COTI 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 MicroControl • CAN driver API - migration from classical CAN to CAN FD
CiA 601-2 - CAN state FSA • receive-only • self-test • low-power 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 MicroControl • CAN driver API - migration from classical CAN to CAN FD
CiA 603 - Time-stamp • 64 Bit Application • Defined resolution Time-stamp CAN-Interface Message MicroControl • CAN driver API - migration from classical CAN to CAN FD
Some additional features • Message marker • CAN error status • Event support • Request capabilities 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 MicroControl • CAN driver API - migration from classical CAN to CAN FD
CAN API review • AUTOSAR • can4linux • CANpie • CMSIS CAN driver • SocketCAN MicroControl • CAN driver API - migration from classical CAN to CAN FD
AUTOSAR • Version 4.3 The logo shown here is property of the respective rights holder. • Commercial license • 7 documents • > 100 functions • Configuration tool • Not designed for PC interfaces 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 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 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 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 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 - ARM based Device / OS support Microcontroller Linux Microcontroller, Linux microcontroller 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 o - Test cases + - + o - Test code + - + o o Code compliance MISRA-C - MISRA-C CMSIS - API function count 101 5 (35) 21 17 6 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 o +(1) + (255 max.) + + (SW) Message marker - - + o - Transmit sequence FIFO / buffer FIFO FIFO / buffer FIFO / buffer FIFO MicroControl • CAN driver API - migration from classical CAN to CAN FD
API comparison AUTOSAR can4linux CANpie FD CMSIS Socketcan Capability request - - + + - Event support + - + + o CAN status + o + + + CAN message API - - + - - CAN message FDF + + + + + CAN message BRS + - + + + CAN message ESI + + + + + 1 μ s CAN time-stamp o 1 ns - - 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 of 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 MicroControl • CAN driver API - migration from classical CAN to CAN FD
Do your share this dream today? MicroControl • CAN driver API - migration from classical CAN to CAN FD
Recommend
More recommend