Hello,
what about connecting the single ADC inputs to different ADC channels internally and validating the output of the both the channels..? - Does the statement is valid..?
That con eliminate fault at internal ADC modules. But such can be also eliminated by doing a ADC test measurement in intervals to ensure that ADC is converting correctly signal from pin.
Some UC has also ADC HW self test for this purpose. But not this one.
If there is EMC disturbance on the pin (induction) then this EMC will be also propagated from the pin to the all routed ADC channels.
In other words, if you measure incorrect voltage on the pin (due to induction) you can only eliminate such by dual sensing trough 2 input pins whose are not close to each other.
I do not see any workaround here.
Maybe if you know the range of expected voltages to be measured, then you can write a comapre+test algo to be at least in the expected range and if not, you will go to safe state (reset/remeasure etc....). But this wont catch corner case scenarios.
Could you please clarify how similar integrity checks or fault detection mechanisms can be implemented for digital inputs and PWM inputs?
Here are some general tips:
1. Digital Inputs – Integrity Monitoring Techniques
Stuck-at Fault Detection
Pull-up/Pull-down Resistor Toggling:
- Configure the input pin with an internal pull-up, then switch to pull-down.
- If the input value doesn’t change accordingly, it may be stuck-at or shorted.
Input Excitation (if possible)
- If the input is connected to a controllable external signal (e.g., via MCU output or test mode), toggle the signal and verify the input response.
Plausibility Checks
- Temporal behavior: Ensure the input toggles within expected time intervals.
- Cross-check with system state: For example, if a switch is expected to be off during a certain operation, flag unexpected ON states.
2. PWM Inputs – Integrity Monitoring Techniques
Capture and Measure Duty Cycle
- Use eMIOS in input capture mode to:
- Measure frequency, duty cycle, and pulse width.
- Compare against expected ranges or patterns.
Plausibility Checks
- Range checks: Ensure duty cycle and frequency are within valid bounds.
- Rate-of-change: Detect sudden jumps or frozen signals.
- Timeout detection: If no edge is detected within a time window, flag a fault.
Cross-check with ADC or System State
- If PWM input controls a physical actuator (e.g., fan), compare measured PWM with ADC feedback (e.g., RPM sensor).
From my understanding, peripheral integrity is already verified by the STCU during each destructive reset, while ADC input integrity can only be fully ensured through redundant input channels. Please confirm if this interpretation is correct.
Yes, in case the STCU BIST for ADC is selected and enabled. I do not see other way how to ensure the measured signal correct other then redundant measurement. As EMC usually do not strike all pins. It is just induction from neighbor pins.
Best regards,
Peter