Class Decrementer

  • All Implemented Interfaces:
    Iarm32, Izynq7000
    Direct Known Subclasses:
    DecrementerDemo

    public class Decrementer
    extends IrqInterrupt
    The class for the ARM private timer. This timer is used to count backwards. As soon as zero is reached the counter is reloaded with its initial value and an interrupt is generated. The private timer is clocked with half of the CPU frequency (CPU_3x2x). You can extend this class to define your own timer class, e.g. to run a control loop. Keep in mind, that the action method is called from the interrupt handler. If you use the floating point unit, you have to make sure that the floating point registers get saved upon entering the action method, see \ref US.ENABLE_FLOATS.
    • Constructor Detail

      • Decrementer

        public Decrementer​(int period)
        Used to install user defined handler for decrementer exceptions.
        Parameters:
        period - Period in us, time between subsequent interrupts
    • Method Detail

      • action

        public void action()
        This is the interrupt handler. Please make sure to overwrite this method for your own interrupt handlers.
        Overrides:
        action in class IrqInterrupt