I believe it is possible to set up an eCAP channel as a configurable pulse deglitcher, but I wanted to confirm my thinking.
- For the sake of this discussion, the pulse to be deglitched is normally low.
- When a rising edge is detected, the TSCR will be loaded with a value equal to (0xFFFFFFF - the deglitch time), and the counter overflow interrupt will be enabled.
- If the counter overflows, the input pulse time is greater than the deglitch time, and further processing would take place.
- If a falling edge was seen, the counter overflow interrupt will be disabled, and the hardware will again sit waiting for a rising edge.
Is there any reason, when properly programmed, this will not work?
Thanks