当前位置:网站首页>[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
边栏推荐
- Illustrated network: what is virtual router redundancy protocol VRRP?
- Kubernetes simple introduction to writing YML
- 【AutoSAR 七 工具链简介】
- Thread start and priority
- 瑞萨RZ/G2L 处理器简介|框架图|功耗|原理图及硬件设计指南
- 字符设备注册常用的两种方法和步骤
- About the practice topic of screen related to unity screen, unity moves around a certain point inside
- 关于XML一些介绍和注意事项
- Rust ownership (very important)
- AEM: Nanlin fan Ben et al. - plant rhizosphere growth promoting bacteria control soybean blight
猜你喜欢
Callback event after the antv X6 node is dragged onto the canvas (stepping on a big hole record)
Deep analysis of data storage in memory
kubernetes资源对象介绍及常用命令(五)-(NFS&PV&PVC)
ftrace工具的介绍及使用
How to systematically learn machine learning
文件操作IO-Part2
Test shift right: Elk practice of online quality monitoring
Automated defect analysis in electronic microscopic images
The difference between tail -f, tail -f and tail
【AutoSAR 十 IO架构】
随机推荐
Win10 多种方式解决无法安装.Net3.5的问题
【日常训练】871. 最低加油次数
Vulkan practice first bullet
指针进阶(一)
RK3568开发板评测篇(二):开发环境搭建
Machine learning: numpy version linear regression predicts Boston house prices
利亚德:Micro LED 产品消费端首先针对 100 英寸以上电视,现阶段进入更小尺寸还有难度
Arduino开发之按键检测与正弦信号输出
Vulkan performance and refinement
Extension of flutter
Vulkan is not a "panacea"“
Leetcode-224: basic calculator
Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3
Key detection and sinusoidal signal output developed by Arduino
Leetcode-1964: find the longest effective obstacle race route to each position
Basic use of shell script
Hundreds of continuous innovation to create free low code office tools
Teach you JDBC hand in hand -- structure separation
File operation io-part2
【AutoSAR 八 OS】