zephyr/drivers/pwm
Andrzej Głąbek 63d6cfd654 drivers: pwm_nrfx: Refactor pwm_set_cycles to fix on/off issues
This commits refactors implementation of the pwm_set_cycles function
to fix the following issues:
- when a channel was already set with a non-zero pulse width, setting
  cycles for another one required specifying a matching period value,
  even if that value was to be ignored anyway when the channel was to
  be set to constant inactive or active level; due to this limitation,
  it was not possible to e.g. use the LED driver API and turn off a LED
  while another one (within the same PWM instance) was blinking
- the above limitation also applied when a channel was set with a pulse
  width equal to period (duty 100%); even though such channel was not
  in fact using the PWM peripheral, other channels within the same PWM
  instance were forced to use the same period
- after a PWM generation was started for a channel, it was not possible
  to change its pulse width before two PWM periods passed (while it
  should be possible to change it after every period); this was caused
  by a looping mechanism that was unnecessarily activated in the PWM
  peripheral

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-07-26 11:11:13 +00:00
..
CMakeLists.txt drivers: pwm: esp32: mcpwm driver 2022-07-14 10:29:26 +02:00
Kconfig drivers: pwm: add pwm driver for rpi_pico 2022-07-07 15:17:26 +02:00
Kconfig.b91 drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.esp32 drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.gd32 drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.gecko drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.imx drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.it8xxx2 drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.litex drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.mcux drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.mcux_ftm drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.mcux_pwt drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.mcux_sctimer drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.mcux_tpm drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.npcx drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.nrf5_sw drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.nrfx drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.rpi_pico drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.rv32m1_tpm drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.sam drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.sam0 drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.sifive drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.stm32 drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.test drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.xec drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
Kconfig.xlnx drivers: pwm: Update drivers to use devicetree Kconfig symbol 2022-07-22 07:50:44 -05:00
pwm_b91.c drivers: pwm: b91: fix non-local headers include 2022-06-28 16:17:46 +02:00
pwm_capture.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
pwm_gd32.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_gecko.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_handlers.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
pwm_imx.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_ite_it8xxx2.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_led_esp32.c drivers: add mising braces to single line if statements 2022-07-06 11:00:45 -04:00
pwm_litex.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
pwm_mc_esp32.c drivers: pwm: esp32: mcpwm driver 2022-07-14 10:29:26 +02:00
pwm_mchp_xec.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_mcux.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_mcux_ftm.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_mcux_pwt.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_mcux_sctimer.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_mcux_tpm.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_npcx.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_nrf5_sw.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_nrfx.c drivers: pwm_nrfx: Refactor pwm_set_cycles to fix on/off issues 2022-07-26 11:11:13 +00:00
pwm_rpi_pico.c drivers: pwm: add pwm driver for rpi_pico 2022-07-07 15:17:26 +02:00
pwm_rv32m1_tpm.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_sam.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_sam0_tcc.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
pwm_shell.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
pwm_sifive.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_stm32.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00
pwm_test.c drivers: migrate includes to <zephyr/...> 2022-05-06 19:58:21 +02:00
pwm_xlnx_axi_timer.c drivers: pwm: minor formatting enhancements 2022-07-12 17:51:23 +02:00