汽车电子软件的趋势汽车电子软件的趋势汽车电子软件的...

更新时间:2023-04-15 23:06:01 阅读量: 实用文档 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are

the property of their respective owners. ?

Freescale Semiconductor, Inc. 2007.Nov 28–29, 2007

Andreas Both, 张恩勤

汽车电子软件的趋势-AUTOSAR 如何改变您使用飞思卡尔控制器的方式

TM Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are

the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.1摘要

汽车电子软件标准AUTOSAR 规范了崭新的汽车应用领域软件的体系

结构.

沿着2006年FTF 讲座的关于AUTOSAR 基本知识介绍,本次将着重介

绍分层架构,以及MCU-相关和MCU-无关的软件的划分.

我们将展示在遵守AUTOSAR 设计方法下,使用飞思卡尔产品将有怎样

的变化

.

TM Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.2讲座安排

?AUTOSAR 定义的基础软件?

分层结构?

MCU-相关的基础软件模块?MCU-无关的基础软件模块?AUTOSAR 操作系统探讨?AUTOSAR 配置方法探讨?针对飞思卡尔控制器的AUTOSAR 软件

AUTOSAR 基础软件TM

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

4

Actuator Software Component Application Software Component Sensor Software Component Application Software Component Interface

Microcontroller Abstraction

AUTOSAR Software Component

ECU Firmware

Standard Software

Services ECU Abstraction Complex Device Drivers

Communication Operating System

Standardized Inteface

AUTOSAR 体系结构

TM Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are

the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.5Microcontroller

AUTOSAR BSW 结构—基础层

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

6

Microcontroller

AUTOSAR BSW 体系结构—细化分层

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

7

微控制器驱动

?内部外设的驱动(e.g., watchdog, 通用时钟)?直接μC 可存取的功能(e.g., Core 测试)

Microcontroller Hardware

A D C

D I O

T i m e r

P W M

L I N / S C I

C A N

S P I

E E P R O M

F l a s h

W D T

G P T

Microcontroller (MCU)

Drivers

W a t c h d o g D r i v e r

M C U D r i v e r

G P T D r i v e r

M C U P o w e r & C l o c k U n i t

微控制器抽象层

P O R T S

F l e x R a y ?

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

8

Microcontroller Hardware

A D C

D I O

T i m e r

P W M

L I N / S C I

C A N

S P I

E E P R O M

F l a s h

W D T

G P T

Microcontroller Drivers Memory Drivers

R A M T e s t

E m b e d d e d E E P R O M D r i v e r

E m b e d d e d

F l a s h D r i v e r

W a t c h d o g D r i v e r

M C U D r i v e r

G P T D r i v e r

M C U P o w e r & C l o c k U n i t

微控制器抽象层

P O R T S

F l e x R a y ?

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

9

通信驱动

?ECU 板级上的通信驱动: SPI, I2C

?车载通信驱动: LIN, CAN, FlexRay?网络

Microcontroller Hardware

A D C

D I O

T i m e r

P W M

L I N / S C I

C A N

S P I

E E P R O M

F l a s h

W D T

G P T

Microcontroller Drivers Communication Drivers

Memory Drivers R A M T e s t

C A N

D r i v e r

E m b e d d e d E E P R O M D r i v e r

E m b e d d e d

F l a s h D r i v e r

W a t c h d o g D r i v e r

L I N D r i v e r

M C U D r i v e r

F l e x R a y ?D r i v e r

G P T D r i v e r

S P I D r i v e r

M C U P o w e r & C l o c k U n i t

微控制器抽象层

P O R T S

F l e x R a y

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

10

I/O 驱动

?模拟和数字I/O 驱动: e.g., 模数转换器(ADC), 脉宽调制(PWM), 数字输入输出(DIO)

Microcontroller Hardware

A D C

D I O

T i m e r

I/O Drivers

P O R T D r i v e r

A D C D r i v e r

D I O D r i v e r

P W M D r i v e r

I C U D r i v e r

P W M

L I N / S C I

C A N

S P I

E E P R O M

F L A S H

W D T

G P T

Microcontroller Drivers Communication Drivers Memory Drivers R A M T e s t

C A N

D r i v e r

E m b e d d e d E E P R O M D r i v e r

E m b e d d e d

F l a s h D r i v e r

W a t c h d o g D r i v e r

L I N D r i v e r

M C U D r i v e r

F l e x R a y D r i v e r

G P T D r i v e r

S P I D r i v e r

M C U P o w e r & C l o c k U n i t

微控制器抽象层

P O R T S

F l e x R a y ?

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

11

微控制器抽象层的驱动

?直接与微控制器硬件接口(核和外设)?包括以下软件模块:

?微控制器驱动?内存驱动?通信驱动?I/O 驱动

Microcontroller Hardware

A D C

D I O

T i m e r

I/O Drivers

P O R T D r i v e r

A D C D r i v e r

D I O D r i v e r

P W M D r i v e r

I C U D r i v e r

P W M

L I N / S C I

C A N

S P I

E E P R O M

F l a s h

W D T

G P T

Microcontroller Drivers Communication Drivers Memory Drivers R A M T e s t

C A N

D r i v e r

I n t e r n a l E E P R O M D r i v e r

I n t e r n a l F l a s h D r i v e r

W a t c h d o g D r i v e r

L I N D r i v e r

M C U D r i v e r

F l e x R a y ?D r i v e r

G P T D r i v e r

S P I D r i v e r

M C U P o w e r & C l o c k U n i t

微控制器抽象层

P O R T S

F l e x R a y

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

12

复杂驱动

Microcontroller

C o m p l e x

D r i v e r

B a s i c S o f t w a r e (B S W )

Component

复杂驱动

?通过采用特定中断或者复杂的外设(如eTPU )的微控制器直接访问,实施复杂的传感器检测和执行单元控制?例子:

?喷油控制

?电子阀门控制?递增式位置检测

E l e c t r i c V a l v e C o n t r o l

I n j e c t i o n C o n t r o l

I n c r e m e n t a l P o s i t i o n D e t e c t i o n

C o m p l e x

D e v i c e D r i v e r X Y

e T P U

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

13

通信硬件抽象层

Microcontroller

AUTOSAR Runtime Environment (RTE)

C o m p l e x

D r i v e r

B a s i c S o f t w a r e (B S W )

Communication

Communication Hardware

Communication Drivers I/O Drivers

I/O Hardware Abstraction

通信硬件抽象层

?对于内部和ECU 硬件架构上外部通信控制器的抽象

?对于所有的通信系统(LIN, CAN, FlexRay),都需要特定的通信硬件抽象:

?LIN 接口?CAN 接口?FlexRay 接口

?Freescale MCUs 具有on-chip CAN 控制器,因此外部的CAN ASIC 一般不需要

Communication

Drivers

I/O Drivers Driver for External

CAN ASIC

μC

C A N

S P I

C A N

D r i v e r S P I D r i v e r

D I O D r i v e r

D I O

CAN Trans-ceiver Driver

CAN Interface

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

14

内存硬件抽象层

Microcontroller

AUTOSAR Runtime Environment (RTE)

C o m p l e x

D r i v e r

B a s i c S o f t w a r e (B S W )

Application Layer

Communication

Services

Memory Hardware

Communication Hardware

Abstraction

Memory Drivers Communication Drivers I/O Drivers

I/O Hardware Abstraction

Application Software Component

Application Software Component 内存硬件抽象

?对于内存外设和板级的内存设备的抽象

?Freescale MCUs 具有on-chip (embedded) flash ,可以仿真EEPROM. 因此,这一层只需要两个模块:

?Flash EEPROM 仿真?内存抽象接口

Memory Drivers

Com Drivers

Memory Abstraction Interface

μC

F l a s h

E E P R O M

I n t e r n a l F l a s h D r i v e r E E P R O M D r i v e r

S P I D r i v e r

S P I

External EEPROM Driver

EEPROM Abstraction Flash EEPROM Emulation

External Flash Driver

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

15

通信软件包

Microcontroller

AUTOSAR Runtime Environment (RTE)

C o m p l e x

D r i v e r

B a s i c S o f t w a r e (B S W )

Communication Hardware

Communication Drivers I/O Drivers

I/O Hardware Abstraction

Application Software Component

Application Software Component 通信协议栈

?对于三种主要的车载通信协议LIN, CAN 和FlexRay ,提供一致的软件结构。

?Autosar COM, DCM 和Generic NM 模块都是协议无关的,适用于所有的通信,与物理层协议无关。

?Signal GW 和PDU router

提供了基于信号和帧的网关功能

Communication Drivers

C A N

C A N

D r i v e r

S C I

FlexRay Interface

L I N D r i v e r

F l e x R a y D r i v e r

F l e x R a y

CAN Interface

LIN Interface

DCM

COM Sign al GW

Gen eric NM

PDU Router

FlexRay NM

LIN NM

CAN NM CAN TP FlexRay?

TP

TM Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are

the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.16内存服务Microcontroller AUTOSAR Runtime Environment (RTE)C o m p l e x D r i v e r B a s i c S o f t w a r e (B S W )Communication Services Communication Hardware Abstraction

Communication Drivers I/O Drivers

I/O Hardware Abstraction 内存服务

?提供非易失数据的管理功能,例如数据存取,冗余校验保护,和可靠存储?采用不同的内存驱动

?采取RAM 映射作为应用程序快速读取数据的接口

?NVRAM Manager 模块是MCU 无关的

NVRAM Manager

TM

Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.

17

系统服务

Microcontroller

AUTOSAR Runtime Environment (RTE)

C o m p l e x

D r i v e r

B a s i c S o f t w a r e (B S W )

Communication

Services

Memory Services Memory Hardware

Abstraction Communication Hardware

Abstraction

Memory Drivers Communication Drivers I/O Drivers

I/O Hardware Abstraction

系统服务

?提供一些功能以供别的模块调用,如诊断事件管理(DEM), 诊断错误跟踪(DET), 操作系统(OS)

?OS 是与MCU 相关的系统服务,需要针对于每个MCU 优化?其余模块可以是应用或硬件相关的(e.g., ECU state manager)

C o m m u n i c a t i o n M a n a g

e r

E C U S t a t e M a n a g e r

F u n c t i o n I n h i b i t i o n M a n a g e r

W a t c h d o g M a n a g e r

D i a g n o s t i c

E v e n t M a n a g e r

D i a g n o s t i c

E r r o r T r a c e r

O p e r a t i n g S y s t e m

CRC Library

TM Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are

the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.18AUTOSAR Release 2.1

?基础软件模块:

46 modules ?基础软件文档:

3609 pages ?其他文档:

1957 pages

?辅助文档以上虽然不是一个很好的度量方法,但足以看出AUTOSAR 基础软件的复杂性。

Q:

全部的AUTOSAR 基础软件模块是否是每个MCU 必需的?A:不是的。请看下面的例子。

TM Freescale?and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All other product or service names are the property of their respective owners. ?Freescale Semiconductor, Inc. 2007.19例子: S12XEP100 AUTOSAR 内存软件栈

Memory Drivers Com

Drivers

Memory Abstraction Interface μC

F L A S H V i r t u a l N V R A M I n t e r n a l

F l a s h D r i v e r

E E P R O M D r i v e r S P I D r i v e r S P I External

EEPROM

Driver EEPROM

Abstraction

Flash EEPROM Emulation External Flash Driver ?智能的MCU 外设将大大简化BSW 内存软

件栈。

AUTOSAR 操作系统TM

本文来源:https://www.bwwdw.com/article/cf0q.html

Top