mlaz commented on issue #955: pwm enabled? URL: https://github.com/apache/mynewt-core/issues/955#issuecomment-381155913 > What happen when: > > cycles are finished: is the pwm just stopped, is it disabled, unconfigured ? Should be configured but disabled. > a call to pwm_enable is made, what are the consequences on the cycle counter? (in normal thread, in seq_end_handler, in cycle_handler) If seq_end_handler is set it should be fired whenever the PWM stops (regardless it is playing for a given number of cycles or in loop (i.e. n_cycles = 0)). If cycle_handler is set it is fired every cycle (so, yes be careful when using it on high freq). > Is it possible to call pwm_set_frequency, after pwm_chan_config, pwm_enable? > (what will be the consquences?) It should be, the PWM should restart automatically on the new freq. > Is it possible to know the cycle couter value in pwm_cycle_handler? No (not right now), you would have to use am external variable. This sounds like an interesting improvement although would compromise the generality of the handler [prototype](https://github.com/apache/mynewt-core/blob/8ac604d63ac004ad18734c19dc34dbcb36a6772d/hw/drivers/pwm/include/pwm/pwm.h#L112).
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services