BSW is a standardized layer of services that serve as an interface between the HW and SWCs. BSW comprises the service layer abstraction layer ECU abstraction layer and the uC; as well as a cluster of complex drivers.
BSW can be subdivided into the following services that are offered to SWCs:
- I / O, abstraction of standardized access to sensors, actuators and peripherals of other ECUs
- Memory, abstraction of standardized access to internal and external memories.
- Crypto, abstraction of standardized access to drivers, primitive types and cryptographic entities.
- Communication outside the vehicle, Abstraction of standardized access to Car2-X communication for wireless connection systems.
- System Offers standardized operating system and ECU-specific services. For example, watchdog manager, OS manager, Timers, Errors and ECU states.
- Communication ECUs, CAN bus support, LIN, FlexRay, J1939, Ethernet, ect.
BSW will request internal / external resources from the uC through drivers; These drivers can be internal or external. Examples of internal drivers are EEPROM, CAN / LIN / Ethernet drivers or ADC samples. Examples of external drivers are SBCs (transceivers and external watchdogs). Abstractions from internal drivers will be positioned in the microcontroller abstraction layer, while abstractions from external drivers will be positioned in the ECU abstraction layer.
The service layer is the main provider of basic services to application SWCs. The service layer provides operating system functionality, in-vehicle network management and communication services, memory services, diagnostic services and ECU status management.
The service layer contains:
- System services. It is a group of modules that interfaces can be used by any layer for OS status, error handling, diagnostic event handling, watchdog and communication management.
- Memory services. It consists only of the NVRAM Manager which is responsible for the correct writing / reading of non-volatile data from different abstractions of memory drivers.
- Communication services. It is a group of modules for all vehicle network communication (CAN, Ethernet, FlexRay, ect). They interface with HW abstraction and diagnostics; It also provides communication management services for SWCs and BSW.
- Crypto Services. Mainly based by the Crypto Service Manager (CSM) who is responsible for handling crypto jobs and key storage. CSM Jobs is an abstraction of CMS keys, CMS queues, and primitive CSM types.
ECU Abstraction Layer
The ECU abstraction layer interfaces all drivers from the uC abstraction layer to the services layer. It also contains drivers external to the uC. It abstracts all access to peripherals (whether internal / external to the uC). The ECU abstraction layer is made up of the following clusters:
- Onboard Device Abstraction, contains abstractions of drivers for onboard ECU devices that cannot be considered sensors or actuators (watchdogs for example).
- Memory Hardware Abstraction, contains abstractions of peripheral memory devices, either internal or external. Memory drivers are accessed through abstraction and emulation modules. By emulating the EEPROM on top of the Flash hardware, a general memory path is enabled for use as an abstraction.
- Crypto Hardware Abstraction, is a group of modules that abstract through internal access mechanisms to primitives from internal cryptography or from external devices.
- Wireless Communication HW Abstraction, contain abstractions for wireless communication.
- Communication Hardware Abstraction, is a group of modules that abstract through access mechanisms to bus channels regardless of their accommodation (on-chip / on-board).
- I / O Hardware Abstraction, is a group of modules that abstract I / O devices (on-board or on-chip) through a representation of I / O signals that are connected to the hw of the ECU (current, frequency, voltage). This abstraction does not abstract sensors and actuators.
uC Abstraction Layer
The microcontroller’s abstraction layer is the lowest SW layer in BSW. It contains all internal uC drivers, therefore, with direct access to the microcontroller and its internal peripherals. Its main objective is to make the upper layers independent of uC. The uC abstraction layer is made up of the following clusters:
- Microcontroller drivers.
- Memory drivers
- Crypto drivers
- Wireless communication drivers
- Communication drivers
- I / O drivers
The complex driver layer is a direct extension of the drivers to RTE. It provides the option to integrate special purpose functionalities that are not specified by Autosar, have high time limits or come from a migration.
RTE is the layer that provides application SWCs with communication with BSW, intra-ECU SWCs or inter-ECU SWCs. RTE makes SWCs independent of ECU mapping.
When a SWC want to send data to the ECU, RTE can handle data in a buffer in-place, or not:
- RTE calls the SOME / IP Transformer hosted internally on RTE.
- SOME / IP Transformer converts the data to an byte array and saves it in a buffer.
- This byte array is used by a Safe Transformer to add data security mechanisms.
- Depending on whether or not an in-place buffer is configured, an additional buffer is used to keep the data transformed.
- RTE transfers the transformed data to COM.
- COM serializes data from RTE as configured (communication matrix).