当前位置:网站首页>[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
边栏推荐
- 【AutoSAR 二 AppL概述】
- mm中的GAN模型架构
- leetcode-224:基本计算器
- Andorid gets the system title bar height
- 线程的启动与优先级
- 【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议
- Callback event after the antv X6 node is dragged onto the canvas (stepping on a big hole record)
- 瑞萨RZ/G2L 处理器简介|框架图|功耗|原理图及硬件设计指南
- Cordova plugin device obtains the device information plug-in, which causes Huawei to fail the audit
- leetcode-849:到最近的人的最大距离
猜你喜欢
![[applet project development -- JD mall] user defined search component of uni app (middle) -- search suggestions](/img/ea/ee1ad50a497478b9d080bb5e4bdfb5.png)
[applet project development -- JD mall] user defined search component of uni app (middle) -- search suggestions

1.11 - 总线

An excellent orm in dotnet circle -- FreeSQL

How SQLSEVER removes data with duplicate IDS

Use Jenkins II job

【AutoSAR 十二 模式管理】

【雅思阅读】王希伟阅读P1(阅读判断题)

Vulkan-性能及精细化

深度剖析数据在内存中的存储

Introduction and use of ftrace tool
随机推荐
Vulkan performance and refinement
Deep analysis of data storage in memory
Leetcode-934: the shortest Bridge
Gan model architecture in mm
Andorid gets the system title bar height
Helm basic learning
Shell 实现文件基本操作(切割、排序、去重)
【AutoSAR 三 RTE概述】
mysql 多表联合删除
Rust字符串切片、结构体和枚举类
[shutter] image component (load network pictures | load static pictures | load local pictures | path | provider plug-in)
2022上半年值得被看见的10条文案,每一句都能带给你力量!
Leetcode 294. Flip game II (game theory)
【JetCache】JetCache的配置说明和注解属性说明
线程的启动与优先级
leetcode-934:最短的桥
Leetcode-1964: find the longest effective obstacle race route to each position
Arduino开发之按键检测与正弦信号输出
【AutoSAR 二 AppL概述】
瑞萨RZ/G2L 处理器简介|框架图|功耗|原理图及硬件设计指南