the following are knowledges from Internet, if copyright against, please contact me.
autosar: 微控制器抽象层 MCAL
微控制器驱动
GPT Driver
WDG Driver
MCU Driver
Core test
存储器驱动
通信驱动
Ethernet驱动
FlexRay 驱动
CAN 驱动
LIN 驱动
SPI 驱动
I/O驱动
AUTOSAR:基础软件层
AUTOSAR软件体系结构包含了完全独立于硬件的应用层(Application Layer)和与硬件相关的基础软件层(BasicSoftware,BSW),并在两者中间设立了一个运行时环境(Run Time Environment),从而使两者分离,形成了一个分层体系架构。
基础软件层组件
系统,提供标准化(os, timer, error)规定和库函数
内存,对内、外内存访问入口进行标准化
通信,对汽车网络系统、ECU间、ECU内的通信访问入口进行标准化
I/O, 对传感器、执行器、ECU的IO进行标准化
服务层与复杂驱动
系统服务
比如, os定时服务、错误管理。为应用程序和基础软件模块提供基础服务。
存储器服务
通信服务
通信服务通过通信硬件抽象与通信驱动程序进行交互
复杂驱动
复杂驱动(CCD)层跨越于微控制器硬件层和RTE之间,其主要任务是整合具有特殊目的且不能用MCAL进行配置的非标准功能模块。复杂驱动程序跟单片机和ECU硬件紧密相关。
Autosar time sync
11 Time sync
对于自适应平台,考虑了以下三种不同的技术来满足所有必要的时间同步需求:
经典平台的StbM
库chrono -要么std::chrono (c++ 11),要么boost::chrono
时间POSIX接口
TBRs充当时间基代理,提供对同步时间基的访问。通过这样做,TS模块从“真实的(real)”时基提供者中抽象出来。
autoSar: time sync protocol specification
Precision Time Protocol (PTP)
generalized Precision Time Protocol (gPTP)
Time Synchronization over Ethernet, IEEE802.1AS
time master: is an entity which is the master for a certain Time Base and which propagates this Time Base to a set of Time Slaves within a certain segment of a communication network. If a Time Master is also the owner of the Time Base then he is the Global Time master.
time slave: is the recipient for a certain Time Base within a certain
segment of a communication network, being a consumer for this Time Base
time measurement with Switches:
in a time aware Ethernet network, HW types of control unit exists:
Endpoints directly working on a local Ethernet-Controller
Time Gateways, time aware bridges, where the local Ethernet-Controller connects to an external switch device. A Switch device leads to additional delays, which have to be considered for the calculation of the corresponding Time Base
specification of time sync over Ethernet
Global Time Sync over Ethernet(EthTSyn) interface with:
Sync time-base manager(StbM), get and set the current time value
Ethernet Interface(EthIf), receiving and transmitting messages
Basic Software Mode Manager(BswM), coord of network access
Default Error Tracer(DET), report of errors
A time gateway typically consists of one Time Slave and one or more Time
Masters. When mapping time entities to real ECUs, an ECU could be Time Master (or even Global Time Master) for one Time Base and Time Slave for another Time Base.
time sync in automotive Ethernet
The principal methods for time synchronization in the automotive industry are currently based on AUTOSAR 4.2.2, IEEE 802.1AS, and the revised IEEE 802.1AS-ref, which was developed by the Audio/Video Bridging Task Group, which is now known as the TSN (Time Sensitive Networking) Task Group.
The type of network determines the details of the synchronization process. For example, with CAN and Ethernet, the Time Slave corrects the received global time base by comparing the time stamp from the transmitter side with its own receive time stamp. With FlexRay, the synchronization is simpler because FlexRay is a deterministic system with fixed cycle times that acts in a strictly predefined time pattern. The time is thus implicitly provided by the FlexRay clock. While the time stamp is always calculated by software in CAN, Ethernet allows it to be calculated by either software or hardware