1、Ea功能
- 为了读取和存储数据,Ea提供访问EEPROM的接口。
- Ea除了可以操作由NVRAM manager提供的blocks,也可以处理/配置user blocks,比如:bootloader application
Ea模块依赖于其它的模块,如下图,Ea与相邻模块的接口:
1.1、Supported AUTOSAR Standard Conform Features
- Ea提供了一个接口,用于从EEPROM中读取数据,将数据填充到NVM提供的blocks中.
- Ea提供了一个接口,用于将NVM提供的blocks写入EEPROM中.
- Ea提供了一个接口,用于擦除blocks中的数据.
- Ea提供了一个接口,用于将NVM提供的blocks无效化.
- 如果underlying EEPROM设备没有提供至少配置的每个物理存储单元的擦除/写入周期数,则Ea模块需提供分散写入访问的机制,以使物理设备不会承受过大压力.
- Ea提供一种header/trailer mechanism 来管理每个block信息.
- Ea提供DET(Development error detection)来检查API参数.
- EEPROM驱动可以被EA轮询其当前状态,或者EEPROM驱动可以通过callback mechanism向EA模块提供notifications。这种配置只在预编译时可用.
- EA可以被NVM轮询,或者EA通过callback mechanism向上层提供结果。这种配置只在预编译时可用。
1.2、Not Supported AUTOSAR Standard Conform Features
- 不支持通过VIRTUAL_PAGE_SIZE对logical blocks进行对齐。相反,logical blocks的对齐是通过分区特定的address alignment提供的.
- Debugging support
- EA模块的API routines被内部操作阻断的最长时间.
- 不支持底层EEPROM的设置模式,因为对设置模式的处理没有明确规定,对内部EEPROM驱动没有任何影响.
1.3、Features Provided beyond the AUTOSAR Standard
- Ea支持多个EEPROM devices的使用.
- EA提供了partitions(分区)的配置,以便将独立的内容/设备彼此分开.
- EA提供了特定的分区address alignments,一个分区的所有logical blocks都与之对齐。address alignments可以为每个分区单独配置。address alignment不得小于分区的write alignment。
address alignments: Virtual page
参考AUTOSAR_SRS_MemoryHWAbstractionLayer.pdf/SRS_MemHwAb_14001
- Ea提供了对写入EEPROM的数据的Verification
- Ea提供检测和纠正区块管理信息中的single bit flips。
- Ea支持两种主函数的triggering modes。EA模块的MainFunction可以在一个固定的周期时间内循环调用,也可以在一个background task中调用.
2、Ea模块相关的文件
关于Ea模块的文件有两类:Core File(核心文件) 和 Config File(配置文件)
2.1、Core File
File Name | Description |
---|---|
Ea.c | 包含了EA接口的实现 |
Ea.h | EA接口的声明(Declares) |
Ea_Cbk.h | Ea的callback functions的声明(Declares) |
Ea_PartitionHandler.c | 负责partition相关的数据 |
Ea_PartitionHandler.h | PartitionHandler接口的声明 |
Ea_BlockHandler.c | 负责block相关的数据 |
Ea_BlockHandler.h | block接口的声明 |
Ea_DatasetHandler.c | 负责dataset相关的数据 |
Ea_DatasetHandler.h | dataset接口的声明 |
Ea_InstanceHandler.c | 负责Instance相关的数据 |
Ea_InstanceHandler.h | Instance接口的声明 |
Ea_TaskManager.c | 负责协调internal sub-components |
Ea_TaskManager.h | TaskManager接口的声明 |
Ea_EepCoordinator.c | 提供访问EEPROM driver的服务 |
Ea_EepCoordinator.h | EepCoordinator接口的声明 |
Ea_Layer1_Erase.c | 用于擦除工作的Internal layer 1 sub-component |
Ea_Layer1_Erase.h | Layer 1 erase sub-component接口的声明 |
Ea_Layer1_Invalidate.c | 用于invalidation工作的Internal layer 1 sub-component |
Ea_Layer1_Invalidate.h | Layer 1 invalidate sub-component接口的声明 |
Ea_Layer1_Read.c | 用于read工作的Internal layer 1 sub-component |
Ea_Layer1_Read.h | Layer 1 read sub-component接口的声明 |
Ea_Layer1_Write.c | 用于write工作的Internal layer 1 sub-component |
Ea_Layer1_Write.h | Layer 1 write sub-component接口的声明 |
Ea_Layer2_WriteInstance.c | 用于write instances的Internal layer 2 sub-component |
Ea_Layer2_WriteInstance.h | Layer 2 write instance sub-component接口的声明 |
Ea_Layer2_InvalidateInstance.c | 用于invalidate instances的Internal layer 2 sub-component |
Ea_Layer2_InvalidateInstance.h | Layer 2 invalidate instance sub-component接口的声明 |
Ea_Layer2_InstanceFinder.c | 用于finde instances的Internal layer 2 sub-component |
Ea_Layer2_InstanceFinder.h | Layer 2 finder instance sub-component接口的声明 |
Ea_Layer3_ReadManagementBytes.c | 用于read management information of instaces 的Internal layer 3 sub-component |
Ea_Layer3_ReadManagementBytes.h | Layer 3 read management information of instaces sub-component接口的声明 |
Ea_bswmd.arxml | 包含所有属于Ea信息的正式符号 |
2.2、Config File
File Name | Description |
---|---|
Ea_Cfg.h | 配置工具生成的头文件 |
Ea_Cfg.c | 配置工具生成的源文件 |
2.3、文件的包含结构
文件的包含结构如下图所示:
3、Ea模块的API
参考Ea与相邻模块的接口的图
4、参考文档
【1】TechnicalReference_Ea.pdf
【2】AUTOSAR_SRS_MemoryHWAbstractionLayer.pdf