AUTOSAR bsw general 学习心得:
- BSW 主要分为以下几组:
Communication cluster
Memory cluster
I/O clusterGuide to BSW Distribution
Watchdog cluster
- Master/Satellite
The interfaces of master and satellite to other module entities in general are the
same as specified in AUTOSAR for traditional modules. Master and satellite
should provide the same APIs.
Enable BSW modules to handle interrupts
AUTOSAR 相关约束:
-
BSW Service APIs used by Autosar Application
Software shall return a Std_ReturnType
-
【SRS_BSW_00357】For success/failure of an API call a standard return
type shall be defined
描述:
For success/failure of an API call, a return type is defined in Std_Types.h
which indicates the success or failure of the call.
对于API调用的成功/失败,在Std_Types.h中定义了返回类型
表示呼叫的成功或失败。
-
【SRS_BSW_00377】A Basic Software Module can return a module
specific types****SRS_BSW_00377
描述:
Example for possibility 1:
uint8 Can_Write(…)
return values: E_OK (0), CAN_BUSY (1), E_OK is taken from Std_Types.h,
CAN_BUSY is #defines in can.h.
[SRS_BSW_00304] All AUTOSAR Basic Software Modules shall use
the following data types instead of native C data types
、
5.[SRS_BSW_00378] AUTOSAR shall provide a boolean type
-
Global data
6.1 AUTOSAR Basic Software Modules shall not define
global data in their header files, but in the C file
6.2 [SRS_BSW_00309] All AUTOSAR Basic Software Modules shall
indicate all global data with read-only purposes by explicitly assigning
the const keyword
所有AUTOSAR基本软件模块应
通过显式赋值来指示具有只读目的的所有全局数据
const关键字
Interface and API
AUTOSAR 禁止规范;
-
The passing of function pointers as API parameter
is forbidden for all AUTOSAR Basic Software Modules
禁止将函数指针作为参数传递
一些对于关键词的疑问:
-
SDB Arxml 是个什么东西??
答:
ECU配置参数. -
Ecum 是什么??
答:EcuM(ECU State Manager)模块它所管理的ECU状态特指ECU的上下电状态,因为在汽车电子中对ECU的上下电时序要求非常严格,AUTOSAR则特地为此整了一个EcuM模块来系列化这个过程
EcuM 模块主要功能如下:
1. ECU 状态处理
2. 管理系统启动流程
3. 管理系统关闭流程
4. 管理系统休眠、唤醒流程
5. 处理唤醒源确认
6. 设置 Bootloader 启动目标
- MCAL又是什么??
MCAL是MicroController Abstraction Layer(微控制器抽象层)的缩写。如下图所示,MCAL位于AUTOSAR软件架构中基本软件(Basic Software,BSW)的底层,是可以直接访问MCU寄存器和内部外设的底层驱动。这样划分的目的是使上层软件(如ECU抽象层、系统服务层等)独立于MCU硬件平台,保证上层软件的标准化和通用性。
AUTOSAR规范根据MCU底层驱动功能的相似性,把MCAL抽象为4个驱动组,分别是微控制器驱动组(Microcontroller DriversGroup)、存储器驱动组(Memory Drivers Group)、通信驱动组(Communication Drivers Group)、输入/输出驱动组(I/O DriversGroup)。将结构示意图更进一步划分,如下图所示。
各个驱动详细介绍参考以下网址:
https://blog.csdn.net/qq_30095921/article/details/127814141