当前位置:网站首页>[AUTOSAR DEM iv.event memory]
[AUTOSAR DEM iv.event memory]
2022-07-23 12:35:00 【Rest of life】
-------- This chapter is DEM The last chapter of , What Xiaobian introduces here is DTC occurs , How is it stored in nonvolatile memory . Nonsense , Let's continue to learn .
Event Memory
event memory yes DEM The essence of .
event memory It is used to store faults EventID、 Extended data 、 Fault status 、 Freeze the storage block of fault related data such as frames , This memory block should be written into the nonvolatile memory space . If there is a complete power on and power off process , Can be in NvM_ReadAll Read the data and store it in RAM The variables in the , Power on time ,NvM_WriteAll write in NvM.Event memory Management is responsible for the entry of fault related data event memory(Entry)、 to update (update)、 And removal (remove).
1. event memory classification
event memory There are four kinds of :

2. primary memory
2.1 primary memory entry
primary memory It's a size of DemMaxNumberEventEntryPrimary Nonvolatile storage space for storing fault related data . If each fault enters primary memory Conditions (DemEventMemoryEntryStorageTrigger) yes DEM_TRIGGER_ON_TEST_FAILED , Then the fault is test failed You can go to Dem_MainFunction “ apply ” Get into primary memory, stay Dem_MainFunction Will poll different SWC perhaps BSW Reported fault , Such as report Failure and primary memory There is enough space for storage , Enter these faults orderly primary memory. Used to manage primary memory The array or management unit of will put the fault EventID And being primary memory Is related to the position in , Then update the index of the next storage location . The flow chart is as follows 
One problem is how to make SWC call Dem_SetEventStatus(EventId, EventState) In trouble failed Then go to event memory in , And in event memory Process the fault status (pending、confirmed、warningIndicator、 Ageing ) Data related to recording faults ( freeze frame 、 Extended data, etc ). because SWC Of monitor Procedure and Dem_MainFunction() In two different tasks , A queue can be used to manage application entry primary memory Request (request),SWC perhaps BSW stay report When it breaks down , Join the team , Put the fault and fault status into the team , stay Dem_MainFunction() Make a team operation . This is how event memory entry
2.2 event memory Storage
stay Dem_MainFunction Tasks , After checking the fault event memory entry Request , How to save the fault to event memory What about China? ?
The basic idea is as follows :
First step , Check whether the fault already exists event memory in , If it already exists , entering event memory processing, increase error cycle counter、 Judge whether the fault state reaches confirmed Conditions 、 Determine whether to update the frozen frame ;
If it doesn't exist , It's in event memory Find space in to store faults and their states , If event memory The space in is full , have access to replacement Mechanism

2.3 event memory processing
Get into primary memory After that, it should be sorted out event memory Order in , bring event memory The order of fault storage in is to enter according to the fault memory In order of priority , Also available at entry When sorting , Then carry out fault status bit for all faults (pending、confirmed、warningindicator) To deal with 、 Extended data computing 、 Ageing treatment 、 Execute freeze frame storage logic for newly added or updated faults .
2.3.1 UDS Fault status (PENDING 、confirmed 、warningIndicator)
1)pending
fault (testFailed) Get into event memory Then I will give event memory The state or on PENDING Status bit of .
pending from 1 Turn into 0 The conditions of are shown in the following two figures :


2)confirmed
Fault status confirmed There are two kinds of strategies :
① stay non-emission related ECU in
When the fault state fails testFailed after , Set up PENDING Behind you confirmed Bits will be set at the same time , Here's the picture :

(2)emission-related ECU
In the fault state PENDING After setting , At this time tested and failed cyclescounter Add one , If at this time tested and failed cycles counter achieve DemEventFailureCycleCounterThreshold, And now OBD driving cycle It's on ,confirmedDTC Bit will be set .

2.4 Freeze frame storage
Frozen frames are also divided according to different types emission related freeze frame and non-emission related freeze frame, Here only non-emission related Freeze frame as an example .
Freezing frame is mainly used to record the working condition at the moment of failure , Such as the speed at which the fault occurs 、 Engine or motor speed 、KL30 Electric voltage 、 Mileage, etc , These freeze frames can be recorded by all faults , That is, when any fault occurs , These data should be recorded , As a frozen frame , It can be called public frozen frame . But each fault has its unique functions and characteristics , It is necessary to record the frozen frame related to its characteristics , If the rotor is overheated , When the fault occurs , The rotor temperature can be recorded 、 Coolant temperature 、 Three phase current and other temperature related data are taken as the unique freezing frame of the fault , These frozen frames can be called unique frozen frames .
event-specific The freeze frame of can be configured in advance , You can also assign different freeze frames related to it through calibration .
Each frozen frame should have a unique DID With the corresponding , Used to distinguish the meaning of different frozen frames , It can identify the meaning and length of different frozen frames when reading frozen frames for the detector .
Freeze frame related parameters :

边栏推荐
- Importance of data analysis
- 【Autosar 存储Stack NVM】
- Using pycaret: low code, automated machine learning framework to solve regression problems
- 把LVGL所有控件整合到一个工程中展示(LVGL6.0版本)
- [CAN总线的物理层 ]1.CAN/CANFD采样的点的内容分享
- [AUTOSAR candrive 1. learn the function and structure of candrive]
- 钢结构基本原理题库
- 高分子物理名词解释
- 高分子物理名词解释归纳
- 谈谈转动惯量
猜你喜欢

Use pyod to detect outliers

Deep convolution generation countermeasure network

NLP natural language processing - Introduction to machine learning and natural language processing (I)

高分子合成工艺学

时间序列的数据分析(一):主要成分

Examen des principes fondamentaux de la structure en acier

In depth interpretation of Google or tools' complex scheduling program

【AUTOSAR CanDrive 1.学习CanDrive的功能和结构】

高分子物理考研概念及要点、考点总结
![[AUTOSAR candrive 2. understand the mapping relationship between communication HOH, canid and pduid]](/img/6d/ae145053b5fc46b583e5892ca4a945.png)
[AUTOSAR candrive 2. understand the mapping relationship between communication HOH, canid and pduid]
随机推荐
Data analysis (I)
Tencent cloud client command line tool tccli main process analysis
【Autosar DEM 四.Event Memory】
【AUTOSAR之FEE(非易失存储器Flash与Eeprom区别)】
Data analysis (II)
Data analysis of time series (III): decomposition of classical time series
高电压技术考题附答案
Baidu Shen Shuo: focus on the scene, deeply cultivate the industry, and bring practical results to enterprise Digitalization
Interpretation of the paper: recognition of enhancer promoter interactions with neural networks based on pre trained DNA vectors and attention mechanisms
Knowledge structure of advanced algebra
Read and write file data
Embedded from entry to mastery (buried) - sharing of ultra detailed knowledge points 2
switch实现表达式计算
Deep convolution generation countermeasure network
Data analysis of time series (II): Calculation of data trend
obs插件基础
[CAN总线的物理层 ]1.CAN/CANFD采样的点的内容分享
Enter the triangle side length and calculate the area
ARM架构与编程4--串口(基于百问网ARM架构与编程教程视频)
NLP natural language processing - Introduction to machine learning and natural language processing (I)