4.2 Interrupts in Metrology Stage
The following figure illustrates the metrology interrupts flowchart.
The application code can disable any IPC interrupts it does not need.
When an IPC IRQ interrupt arrives, the application code first determines which kind of interrupt occurred and then it checks related Metrology Status Registers and executes its specific handler.
The IPC interrupt is defined as the following:
| 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 |
| — | — | — | — | — | PULSE2_IRQ | PULSE1_IRQ | PULSE0_IRQ |
| 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 |
| — | — | — | INIT_IRQ | — | — | — | STATUS_IRQ |
| 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
| — | — | — | RZC_IRQ | — | — | — | — |
| 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
| CREEP_IRQ | — | HALF_CYCLE_IRQ | FULL_CYCLE_IRQ | — | — | — | INTEGRATION_IRQ |
- PULSE0_IRQ, PULSE1_IRQ, PULSE2_IRQ: Pulse Interrupts
These interrupts are generated immediately after the pulse has occurred. The typical delay is less than 1 μs. However, if the metrology code is attending a high-priority interrupt, such as the one triggered when the AFE has a new sample ready to be read, the delay could be higher.
- INIT_IRQ: Initialization Requirement Interrupt
- STATUS_IRQ: STATUS Update Interrupt
This interrupt is used to inform the application code of change(s) in priority status bit(s). This feature is not implemented.
- RZC_IRQ: Raw Zero Crossing Interrupt
- CREEP_IRQ: CREEP Detection Interrupt
This interrupt is used to inform the application code of detection of a creep condition. This feature is not implemented.
- HALF_CYCLE_IRQ: Half Line Cycle Interrupt
- FULL_CYCLE_IRQ: Line Cycle Interrupt
- INTEGRATION_IRQ: Integration Period Interrupt
This interrupt is used to inform the application code that the whole integration period finishes. It means that all accumulated quantities and status N were updated.
