Instrumenting InterruptsHandling interrupts is an important part of a microcontroller application's design. Interrupts may arrive from external pins, may be generated in response to reception of data over a serial port, or may be generated by on-chip devices such as timers or the EEPROM. The program can enable and disable individual interrupts as well. Avrora allows all of these events to be extended with instrumentation code to provide simulation output or compute statistics.The simulator exposes an interface called a Simulator.InterruptProbe that can be implemented by user code to add instrumentation to particular interrupts. When the probe is inserted on a particular interrupt number, the probe will be notified when the program enables or disables the interrupt, when the interrupt posted or unposted, and before and after the interrupt is invoked (executed).
Avrora allows interrupt probes to be added to any of the interrupts that can be delivered to the program, including reset, external interrupts, and device interrupts. A single probe can also be added to all interrupts so that it gets notified about events relating to any interrupt. Such a probe is usually referred to as a "global" probe. Global probes will also be notified when the program alters the master bit that enables or disables all interrupts. More information:
|