ANSI-C CANopen Driver Package
The CANopen Driver Packages are the driver modules of the CANopen Library by port. The Driver Packages are the keys for the usage of the target system independent protocol library. They are designed for both target systems with and without operation systems.
The CANopen Driver Packages (DP) provide access to the hardware of the CANopen Library of port. The Driver Packages are the keys for the usage of the target system independent of CANopen Library. They are designed for target systems with and without operation systems.
While the largest part of the CANopen protocol stack is written in 100% portable ANSI-C, there is still the driver package, which is partly tailored to be used with specific compilers and tool chains. This is caused by different methods of acessing the hardware or defining interrupt service routines.
In order to increase synergies, accelerate development cycles and offer better services to our customers port has strategic company partnerships on different levels with chip manufacturers and compiler manufacturers in order to increase our capabilities and customer benefit.
- ST Microelectronics
- Tasking, port partner page at Tasking, partners page at port
- Texas Instruments
The tables below, listing our supported hardware, will refer to these partners.
The CANopen Driver Packages provide all necessary functions for
- initialization of the hardware
- controlling the CAN Controller
- message filtering
- message buffering and
- provision of a timer period
by means of a well defined interface. A CANopen Driver Package is comprised from a CPU- (DP/CPU), a CAN- (DP/CAN)and where applicable a driver for an operating system (DP/OS). These drivers can be used in any combination.
The following table shows hardware combinations of CPU and CAN drivers that are often used by our customers.
All drivers are available as documented ANSI-C source code. This allows easy and quick adoption to system specific hardware and trouble-free compilation with all ANSI-C compliant ANSI-C compilers.
The driver provides access to the CAN controller by several means:
- Memory Mapped Mode
(addressing the CAN controller via the address space of the CPU)
- I/O Mapped Mode
(addressing the CAN controller via the I/O address space of the CPU)
- Latched Mode
(addressing the CAN controller via address latches)
The used access method for accessing the CAN controller register depends heavily on the used hardware and can be adopted by means of access macros.
The driver for the FullCAN controller types provide the usage of
filtering CAN messages in hardware for all channels available (1 channel for sending or receiving)
- FullCAN mode with 1 transmit channel
one transmit channel for all transmit messages
all other channels are configured as receiving channels using the hardware filter
- BasicCAN mode
- 1 transmit channel for all CAN messages
- 1 receiving channel for all CAN messages
The last two modes provide the possibility to use devices with FullCAN controller, that support more CAN objects as are provided from the hardware of the CAN controller. Many drivers do contain code for
- step by step initial operation of the driver
- quick error detection
- extensions that have been added due to customer requests
- 29 Bit extented CAN Frames, besides the 11 Bit Base-Frame format
that can be enabled via appropriate compiler defines. Besides the drivers for processors with multiple CAN controller there are several other drivers that support configuration for multi-line usage with the CANopen Library. Thus there is a wide range of drivers that can be used for multi-line devices.
Please note that there are possible hardware constraints especially with older CAN controller. Configuration of the driver is done with the CANopen Design Tool, which is enclosed to the CANopen Library as light version.
All drivers normally transmit and receive interrupt driven and therefore require the integration into the interrupt system of the device. It also can be used in polling mode for special-purpose applications.
The time base for the CANopen Library can either be provided by the CANopen Library itself by using a timer or the timer interrupt function is called cyclically by another system timer.
The CANopen Driver Packages are available as:
- reviewed hardware/system driver (DP 0565/xx) for typical hardware configurations
- freely selectable hardware driver CAN controller combinations (DP/CPU 0566/xx, DP/CAN 0567/xx)
We recommend the purchase order of pre-configured driver packages that in addition to the CPU and CAN driver contain ready to use examples. These have been prepared with project files for the compilers and configurations we use.
For application of the CANopen Library with operating systems like Windows™ or LINUX™ port provides drivers for active and passive PC cards, parallel dongles, PCMCIA cards, USB interface and external Ethernet to CAN converter (EtherCAN).
Your driver is not there? Send us an email: click here