10.1. Analog Sensor Driver - AnSnsrDrvr
Id |
AnSnsrDrvr |
Title |
Analog Sensor Driver |
System |
Passive Safety |
Document Type |
Application Software Component Specification Preview |
10.1.1. Overview
The Analog Sensor Driver software component provides functionality to read the state of an analog sensor connected to an I/O pin. It determines if the sensor is active or not based on the analog voltage level on the pin compared to a configurable threshold. The component also detects error conditions with the sensor.
10.1.2. Functions
Title |
Description |
|
|---|---|---|
1 |
Read Sensor State |
Reads the analog voltage on the sensor input pin and determines the sensor state (Active, Not Active, Error) based on the voltage level and diagnostic checks. The debounced sensor state is provided as an output. |
10.1.3. Ports
Id |
Direction |
Data Type |
Dimensions |
Unit |
|
|---|---|---|---|---|---|
1 |
AnalogSensorVCCU |
Incoming |
single |
[1] |
inherit |
2 |
AnalogSensorVCCSt |
Incoming |
Enum: InpoutPinSt |
[1] |
inherit |
3 |
SensorState |
Outgoing |
Enum: VtSig_SensorState_t |
[1] |
inherit |
4 |
SensorState_send |
Outgoing |
boolean |
[1] |
inherit |
5 |
AnalogSensorVCCWakeUpMod |
Outgoing |
Enum: InpoutPinWakeUpMod |
[1] |
inherit |
6 |
AnalogSensorVCCMod |
Outgoing |
Enum: InpoutPinMod |
[1] |
inherit |
7 |
AnalogSensorVCCPuMod |
Outgoing |
Enum: InpoutPinPuMod |
[1] |
inherit |
10.1.4. Parameters
Id |
Data Type |
Dimensions |
Range |
Unit |
Description |
|
|---|---|---|---|---|---|---|
1 |
AnsensdPinMod |
uint8 |
[1,1] |
Min: 0, Max: 2 |
0 - input, 1 - pullUp, 2 - pullDown |
|
2 |
AnsensdSnsrDebTiout |
single |
[1,1] |
Min: 0, Max: 1 |
sec |
sensor debounce time interval |
3 |
AnsensdSnsrUThd |
single |
[1,1] |
Min: 0, Max: 32 |
V |
sensor voltage threshold |
4 |
AnsensdWakeUpEna |
boolean |
[1,1] |
Min: 0, Max: 1 |
Enabler of WakeUp functionality |
|
5 |
AnsensdWakeUpPinMod |
uint8 |
[1,1] |
Min: 0, Max: 1 |
0 - Wakeup when connected to GND, 1 - Wakeup when connected to VBAT |
|
6 |
AnsensdAcvAtLoU |
boolean |
[1,1] |
Min: 0, Max: 1 |
true - Low voltage means Active, false - High voltage means Active |