当前位置:网站首页>[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 五 方法论】
- Why is the website slow to open?
- Leetcode-849: maximum distance to the nearest person
- 【JetCache】JetCache的配置说明和注解属性说明
- 【日常训练】871. 最低加油次数
- Rust ownership (very important)
- The most painful programming problem in 2021, adventure of code 2021 Day24
- 【AutoSAR 十三 NVM】
- Basic use of shell script
- Detailed explanation of pod life cycle
猜你喜欢

Advanced pointer (I)

1.11 - 总线

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

Shell implements basic file operations (SED edit, awk match)

飞凌搭载TI AM62x的ARM核心板/开发板首发上市,亮相Embedded World 2022

kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)

Vulkan-性能及精细化

Liad: the consumer end of micro LED products is first targeted at TVs above 100 inches. At this stage, it is still difficult to enter a smaller size

Sentry developer contribution Guide - configure pycharm
![[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
随机推荐
Leetcode-934: the shortest Bridge
Rust所有权(非常重要)
Shell 实现文件基本操作(sed-编辑、awk-匹配)
使用jenkins之二Job
Preview word documents online
Why is the website slow to open?
【雅思阅读】王希伟阅读P1(阅读判断题)
飞凌搭载TI AM62x的ARM核心板/开发板首发上市,亮相Embedded World 2022
数组与集合性能比较
Centos7 one click compilation to build MySQL script
Leetcode-1964: find the longest effective obstacle race route to each position
指针初阶(基础)
【AutoSAR 六 描述文件】
Some introduction and precautions about XML
百数不断创新,打造自由的低代码办公工具
测试右移:线上质量监控 ELK 实战
瑞萨RZ/G2L 处理器简介|框架图|功耗|原理图及硬件设计指南
Rust ownership (very important)
Nc17059 queue Q
简单聊聊运维监控的其他用途