Selectable Events, pin high vs. rising, how to timeout [solved]
ManAtWork
Posts: 2,176
What exactly is the difference beween the following configuration values for SETSEn?
%001_PPPPPP = INA/INB bit of pin %PPPPPP rises
and
%11x_PPPPPP = INA/INB bit of pin %PPPPPP is high
My interpretation is this: If the input pin is initially low and then becomes high for the first time the behaviour is basically the same. An event would be triggered for both modes. In both cases only a single event would be generated because only a "fresh" condition (rising edge) triggers one.
But what happens when the event is acknowledged (cleared) by a POLLSE or WAITSE command? I think in this case the "is high" mode would immediately re-trigger while the "rises" mode would not until the pin becomes low and then high again. Is this correct?
Comments
Yep. AFAIK, an event latch will still be remembered until consumed. So, the level mode (%11x_...) will immediately re-latch as a new event unless the high pin has gone low already. I think most cases it's the rise desired to be known rather than high level.
Ok, I can confirm that it works as expected.
If I abort reception of a packet in the middle and jump to the WaitIpg procedure the event is constantly re-triggered. When CRS (green trace) becomes low the next WAITSE1 command times out after the minimum inter-packet gap. If I change the event mode for SETSE1 from %110 to %001 the red brick wall is gone and the event really triggers only at rising edges.
You're green trace is decidedly yellow, looking at the photo.
"Red wire? Blue wire? Huh? I only see a dark grey and a light grey one!" (Hangover 2)