Civil Engineering Reference
In-Depth Information
using the lowest layer, the MCAL. In this lowest layer, the drivers for accessing the
hardware are implemented. This lowest layer has to be developed for each new mi-
crocontroller—it is the only piece of software which is not hardware independent.
4.2.2.2
Microcontroller Abstraction Layer
As mentioned above, the MCAL is the only layer which depends on the hardware.
The above layers have no dependency any more, except the OS. This principle is the
basis for an easy adaptation of the basic software to new hardware architecture or a
new derivative; only this deepest layer will be exchanged. The layers above will be
tested together with the exchanged lower layers in an integration test system. There
are exceptions within the higher levels of software if special hardware features shall
be used there, too. If these features are not able to be implemented only in the
MCAL, a hardware dependency is placed in the higher level software—the supplier
of this basic software has to check if this dependency is maintainable and/or if the
costs for hardware dependency are less than the, e.g. speed advantage gained by
using special hardware features.
The drivers, of the MCAL, can be subdivided into the following four groups:
• Microcontroller drivers—they contain software to control the microcontroller
core (Micro-Controller Unit (MCU) driver), timer modules (General Purpose
Timer (GPT) driver) and on-chip watchdog (watchdog driver).
• Memory drivers—these are the drivers to access EEPROM and FLASH memory.
• Communication drivers—these are used to connect bus systems like Serial Pe-
ripheral Interface (SPI) bus for inter-ECU communication, e.g. to connect an
external SPI EEPROM device, and to access common used bus systems like
CAN, Local Interconnect Network (LIN), FlexRay and also Ethernet.
• I/O drivers—these drivers connect the on-chip peripherals like digital I/O, ana-
log digital converter (ADC), input capture unit, pulse width modulation (PWM)
and the port driver for the configuration of each port pin functionality.
Within the AUTOSAR architecture, hardware access will be enabled by two soft-
ware modules: the driver of the MCAL and the corresponding interface of the layer
above—the ECU abstraction layer.
4.2.2.3
ECU Abstraction Layer
For almost each driver of the hardware-dependent layer exists an interface to en-
capsulate the lowest layer. The access to this interface layer is always identical for
all layers above. For example, multiple CAN modules can be summed-up abstract
by the interface layer, e.g. by controlling several CAN drivers. The AUTOSAR
COM module in the service layer can access the CAN interface always in a same
way, sending only a protocol data unit (PDU) 3 to the interface. The interface is
Search WWH ::




Custom Search