You copied the Doc URL to your clipboard.

Using the Interrupt Generation Trickbox

You can generate interrupts either: on demand, by writing to a control register, or automatically at regular intervals, using a programmable timer.

To set up and use the interrupt generation trickbox:


  1. Program the INT_SEQx registers with integers in the range 0-(INTGEN_INTS-1).
    These numbers refer to the interrupt line that fires each time the trickbox generates an interrupt. The value in each INT_SEQx register must be unique.
  2. Program the INT_TYPEx registers to configure whether each interrupt is level-triggered or edge-triggered, as required.
  3. If the trickbox must automatically generate interrupts at regular intervals, set INT_FREQ to the required frequency.
    The values are as follows:
    0 A value of 0 means that an interrupt is generated on every clock cycle.
    1 A value of 1 means that an interrupt is generated every other clock cycle.
    The timer does not start until interrupt generation is globally enabled.
  4. Set INT_CTRL.ENABLE to 1 to enable the generation of interrupts.
    Interrupts start to fire automatically if INT_CTRL.TIMER_EN is 1. Otherwise, manual generation of interrupts is enabled.
  5. Run the code of interest across which the interrupts are to be strobed.
    Option Description
    Interrupts are to be generated manually. Write 1 to INT_GENERATE at the required points in the code to fire the next interrupt.
    Interrupts are to be timer-generated. You can pause generation at any time by clearing INT_CTRL.TIMER_EN.
    Additional interrupts can be generated manually If INT_CTRL.ENABLE is HIGH.
  6. Write 0 to INT_CTRL.ENABLE to stop the generation of subsequent interrupts.
  7. Read INT_NUMBER to determine how many interrupts fired.
    If this value is 0x8hFF, then all possible interrupts fired, as the INTGEN_INTS option configures. If the value is not 0x8hFF, then it provides the actual number of interrupts that fired.
  8. Write 1 to INT_ACK to clear all level-sensitive interrupts and to reset INT_NUMBER back to zero.
    The interrupt generator is now ready to be reconfigured or restarted.


Writing to INT_GENERATE when INT_CTRL.ENABLE is 0 has no effect. Generation is UNPREDICTABLE if an interrupt number appears in more than one INT_SEQx register.
Was this page helpful? Yes No