Class MPWMSM_PWM

    • Constructor Detail

      • MPWMSM_PWM

        public MPWMSM_PWM​(int channel,
                          int period,
                          int highTime)
        Create a PWM channel on a pin of the MPWM submodule. The period and high time have to be a multiple of the TIME_BASE (400ns)!
        Parameters:
        channel - Module channel to initialize. Allowed values are 0..3, 6..9 or 0..3, 16-19.
        period - Period of the PWM signal. Have to be a multiple of the MPWMSM time base.
        highTime - High time of the PWM signal. Have to be a multiple of the MPWMSM time base.
    • Method Detail

      • update

        public void update​(int period,
                           int highTime)
        Update the PWM signal at the given channel. The period and high time have to be a multiple of the TIME_BASE (400ns)!
        Parameters:
        period - Period of the PWM signal. Have to be a multiple of the MPWMSM time base!
        highTime - High time of the PWM signal. Have to be a multiple of the MPWMSM time base!