AN-ISC-2-1052 CANbedded and Operating Systems
AN-ISC-2-1052 CANbedded and Operating Systems
AN-ISC-2-1052 CANbedded and Operating Systems
Version 1.0
2007-01-18
Application Note AN-ISC-2-1052
Table of Contents
1.0 Overview
The Vector CANbedded components have some requirements for the run-time environment. Some of these might
impact the usage of the operating system elements as well as the real-time design.
Two run-time environments are explicitly supported by CANbedded:
• A system without operating system
• An OSEK Operating System (version 2.1r1 onwards) such as Vector osCAN
In the following chapters the requirements are listed and for some cases where no explicitly support exists
workarounds are described.
1
Copyright © 2007 - Vector Informatik GmbH
Contact Information: www.vector-informatik.com or ++49-711-80 670-0
CANbedded and Operating Systems
Since the CANbedded components have to interface directly with the communication hardware adequate access
privileges are required.
If an operating system other than OSEK is used the following workaround is possible:
If OSEK-OS and OSEK-OS category 2 ISR support are selected in the generation tool the ISR has the following C
syntax:
ISR(CanInterrupt)
{
…
}
Supply a header file osek.h with the following macro, to make the ISR available in other modules as a void-void
function.
Example for an operating system which provides a service OSRegisterISR to register an ISR:
If the prototype of the ISR required by the OS is not of the kind void x(void) an intermediate function must be used
to circumvent type conflicts.
2
Application Note AN-ISC-2-1052
CANbedded and Operating Systems
Some CANbedded components have specific requirements concerning processing priorities and reentrancy. These
requirements are described in the technical reference of the individual component.
Application 1 Application 2
Communication application
CANbedded stack
Communication hardware
To move data between the applications operating system services are required which have the capability to tunnel
the address barrier (drawn with blue arrows)..
3
Application Note AN-ISC-2-1052
CANbedded and Operating Systems
If such a privilege level is not possible for tasks but only for ISRs a cyclic timer ISR can be used to perform all
required CANbedded cyclic processing. Note that such an ISR must have a lower interrupt level than the ISRs of
the CANbedded drivers.
Application 1 Application 2
Wrapper layer
CANbedded stack
4
Application Note AN-ISC-2-1052
CANbedded and Operating Systems
9.0 Contacts
5
Application Note AN-ISC-2-1052