当前位置:网站首页>[AUTOSAR + IO Architecture]
[AUTOSAR + IO Architecture]
2022-07-03 00:49:00 【Ke Yuqian】
AutoSAR Ten IO framework
1 layered
1.1 Application level
We usually Sensor/Actuator SWC Separate them , Form the following form .
So if there is any change in the hardware in the future , It is very convenient to modify our code .
The sensors and actuators on the hardware have been SWC The abstraction of , Just list and package the application algorithm separately , Even if the hardware changes later , You only need to modify the corresponding Sensor/ActuatorSWC that will do
1.2 Sensor signal flow

1.3 Actuator signal flow

1.4 Abstraction layer

2 PORT
Configuration item :
• IO Port mode selection :GPIO / Function reuse
• IO The direction of the mouth : Input / Output
• IO Whether the port is allowed to change direction during operation : yes / no
• IO Initialization level of port : high / low
• IO The conversion rate of the port
• IO Whether the mouth is pulled up : yes / no
• IO Input threshold of port
• IO Drive mode of the port : push-pull / Open a leak
• IO Read back support type of port : level , Output register value
3 DIO( Digital input and output )
Configuration item :
• use DIO to IO I changed my name , It's convenient for us to use later .
• to Channels grouping , Divide some channels with similar functions into a group for unified management .

4 PWM
Configuration item :
• Hardware channel accessed
• PWM cycle
• PWM Duty cycle
• PWM Polarity : high / low
• PWM Idle state : high / low
• Phase shift (Phase Shift)

Edge count (Edge Count)
• Icu_Init: ICU Initialization function for , Here, it is initialized to edge counting mode and double edge detection
• Icu_EnableEdgeCount: Can make ICU Edge count , After that, it starts counting
• Icu_DisableEdgeCount: prohibit ICU Edge count , The data will not be cleared and will remain
• Icu_GetEdgeNumbers: Get current ICU Edge count value of
• Icu_ResetEdgeCount: Reset ICU Count value

edge detection (Signal Edge Detection)
• Icu_EnableNotification: Enable notification function ( There is no notification function configured here, so it is invalid )
• Icu_GetInputState: Get input status , The status is reset to IDLE
• Icu_SetActivationCondition: Change activation conditions , In the figure, the lower edge changes to the upper edge
• Icu_DisableNotification: No notice


Signal measurement (Signal Measurement)
• Icu_StartSignalMeasurement: Start signal measurement function
• Icu_GetTimeElapsed: Get the length of time
• Icu_GetDutyCycleValues: In the past pwm The cycle and duty cycle of
- Measure the signal duration ,
- Here is the duration of low level measurement , It can also measure high level , Note that only a complete measurable low level is valid ( That is to meet the two conditions of falling edge and rising edge )

- Duration of measurement cycle

- measurement pwm Duty cycle

Time stamp (Timestamping)
• NotifyInterval( Notification interval ) Trigger notification according to the set interval size ,
• Icu_SetActivationCondition: Set trigger conditions
• Icu_GetTimestampIndex: Past current timestamp directory , That is, every time the cycle is cycled ( Here is a cycle from 0x0000->0xFFFF), there Index Add one
• Icu_StartTimestamp: Activate timestamp function , In linear Buffer In mode , once Buffer Full of , The recording of timestamp will be stopped , Need to activate again manually
linear buffer

loop buffer
If we set the loop Buffer, Then you don't have to Icu_TimestampNotification_Ch1 Call in Icu_StartTimestamp This function , Then the timestamp function will continue . contrary , If it's linear Buffer, If not called , Will stop the function
5 ICU( Input capture unit )
ICU:Input Capture Unit, Input capture unit . It mainly has the following functions :
• Edge count
• Edge detection and notification
• Time stamp
• Signal measurement
• Used as a wake-up source
API
• Icu_Init: ICU Initialization function for , Here, it is initialized to edge counting mode and double edge detection
• Icu_EnableEdgeCount: Can make ICU Edge count , After that, it starts counting
• Icu_DisableEdgeCount: prohibit ICU Edge count , The data will not be cleared and will remain
• Icu_GetEdgeNumbers: Get current ICU Edge count value of
• Icu_ResetEdgeCount: Reset ICU Count value
6 OCU( Output comparison unit )
Output Compare Unit, Output comparison unit . Less used .
• Start or stop a comparison process
• Set the comparison threshold
• Enable or disable the notification mechanism
• Get the count
• Change the state of the output pin
• Trigger hardware resources ( such as ADC,PWM etc. )

7 ADC
Function as follows :
• Convert analog signal to digital signal
• Encapsulate the access interface of the converted signal
• Configure different modes
• A notification mechanism for transformation
ADC convert group :
- and IO The group is the same ,ADC You can also group (ADC Groups),
- The main thing is to make some functions similar ADC channnels Divide into a group ( Each group contains at least one channel ).
- It should be noted that a group must be in a ADC In the hardware unit , Cannot be composed across hardware units ADC Group
Conversion mode :
- Cyclic conversion : That is, the channels in a group are carried out in sequence ADC transformation , After one conversion, proceed to the next , Unless the user stops the conversion , Otherwise it will continue to cycle
- Single conversion : The channels in the same group proceed in sequence ADC transformation , But stop directly after converting all channels of the Group , Unless the user enables the conversion again
Trigger mode :
- Hardware trigger : It is configured by the user , It can be triggered by other peripherals ADC Start conversion . For example, you can set a cycle timer , Triggered by the interrupt of the timer ADC, Or by IO The rising edge of the mouth triggers ADC.
- Software triggers : Generally, we use , Are triggered by software API function , Writing this sentence directly triggers .
Buffer initialization :
Flow mode :
our ADC It can store sampling values at multiple times , And can coexist .
It is equivalent to applying for an array for each channel , This array can hold multiple ADC Sample value of

- Circulation patterns : ** When FIFO Full of , Just start from scratch .** For example, the depth here is 2,ADC0_0_Ch0 It was recorded in our... For the first time ADC_SW_GRP_RES[0] in ,ADC0_0_Ch0 Enter the second time ADC_SW_GRP_RES[1] Inside , And then... Again ADC_SW_GRP_RES[0], In turn, cycle
- Linear mode : ** When FIFO Full of , No more records .** That is to say ADC0_0_Ch0 The records are full of ADC_SW_GRP_RES[0] and ADC_SW_GRP_RES[1] Then it's no longer recorded
边栏推荐
- logback配置文件
- 【luogu P4320】道路相遇(圆方树)
- Kubernetes resource object introduction and common commands (V) - (NFS & PV & PVC)
- 线程的启动与优先级
- Nacos+openfeign error reporting solution
- 【AutoSAR 五 方法论】
- Detailed explanation of pod life cycle
- leetcode-2280:表示一个折线图的最少线段数
- Rust string slicing, structs, and enumeration classes
- 1.12 - Instructions
猜你喜欢

【AutoSAR 十一 通信相关机制】

Introduction and use of ftrace tool

How SQLSEVER removes data with duplicate IDS

Win10 多种方式解决无法安装.Net3.5的问题

An excellent orm in dotnet circle -- FreeSQL

如何系统学习机器学习

Two common methods and steps of character device registration

Rust字符串切片、结构体和枚举类

Linux Software: how to install redis service

【AutoSAR 七 工具链简介】
随机推荐
1.12 - Instructions
字符设备注册常用的两种方法和步骤
【雅思阅读】王希伟阅读P1(阅读判断题)
[IELTS reading] Wang Xiwei reading P1 (reading judgment question)
[applet project development -- JD mall] user defined search component of uni app (middle) -- search suggestions
2022上半年值得被看见的10条文案,每一句都能带给你力量!
瑞萨RZ/G2L 处理器简介|框架图|功耗|原理图及硬件设计指南
About the practice topic of screen related to unity screen, unity moves around a certain point inside
Tensorflow 2.x(keras)源码详解之第十五章:迁移学习与微调
cordova-plugin-device获取设备信息插件导致华为审核不通过
【AutoSAR 七 工具链简介】
Illustrated network: what is virtual router redundancy protocol VRRP?
Meaning of Tencent cloud free SSL certificate extension file
Lex & yacc & bison & flex configuration problems
[shutter] image component (load network pictures | load static pictures | load local pictures | path | provider plug-in)
【AutoSAR 二 AppL概述】
Gan model architecture in mm
【AutoSAR 十 IO架构】
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议
lex && yacc && bison && flex 配置的问题