Hi I'm trying to come up with a name for when a change in input is detected and an interrupt is issued due to that. So I want to "trap" a change in an input, but a trap already means a software interrupt so it could be confusing. The name will be used for a method that accepts an ISR as an argument, so it would look like trap(ISR)
followed by an immediate synchronous execution of another routine which actually accesses any of the input register (not known in advance), so I'm building a dynamic execution map if it makes sense. I'd like to know if there's something similar in electronics. Trap is kind of perfect for me semantically because it actually means "trapping" an access to the register, shame the word is already use. Has anyone seen a similar strategy before in literature?

- 3
- 1
-
edge-triggering? – nanofarad Mar 03 '23 at 04:05
-
1"on_edge", "handle_edge", "on_change", "
_changed", "level_change" – Simon Fitch Mar 03 '23 at 04:07 -
1Interrupt On Change (IOC) is a common name if it occurs on both edges. – Spehro Pefhany Mar 03 '23 at 04:07
-
The words "rise" and "fall" are appropriate, if the change is in one direction only. – Simon Fitch Mar 03 '23 at 04:10
-
thanks chaps but i'd like to _prime_ an interrupt, so my users would call a method like setupIOC then trigger a change to the register, and then the IOC will remember that it needs to execute each time that register falls/rises in future. but I want something that sounds really electronicy :) – Hard Deco Mar 03 '23 at 04:21
1 Answers
Trap has a well-defined meaning - it means a special error condition where the CPU/MMU/OS detects an invalid data/address format and issues a (hardware) exception. It does not mean anything else and so it's not a name you should use as application programmer.
In case of triggering a timer upon the edge of a digital signal, then the widely used term is input capture.
In case of just triggering a general interrupt upon an edge, there are various, not standardized terms for that - often manufacturer dependent. "Edge-triggered interrupt, "keyboard wakeup", "interrupt on change" are some candidates.
"Edge" and "trigger" are recurring terms easily understood by engineers, since most are used at handling an oscilloscope and so the term edge-triggering is easily understood. Some timer peripherals also use the term "external trigger" for a GPIO pin used to synchronize several timer channels.

- 17,577
- 1
- 24
- 67
-
Imagine you had 5 GPIO pins, and wanted an ISR to be executed if one of them changes, ie you need to trigger an interrupt upon edge on either. The problem's I don't even know how many pins there'll be: e.g., I've designed a mechanism in software that allows to first set "ISR capture mode ON", then run a user function that access either one of the pins for the first time, then "capture OFF" - the result is a lookup table of which interrupt to run upon which edge change in future. So on hardware level you'd always hard-code interrupts specific for each manufacturer? CaptureON sounds good though. – Hard Deco Mar 03 '23 at 19:32