So /dev/pmw0 = TIM1 /dev/pmw1 = TIM4 All well...... but with CONFIG_PWM_PULSECOUNT only TIM1 is working when you give in counts.... but with counts=0 nothing happens .... TIM4 is quitting immediatly..... with CONFIG_PWM_PULSECOUNT DISABLED I can use both in a generic way.......
I think the: #ifdef CONFIG_PWM_PULSECOUNT ret = lower->ops->pulse_start(lower, &upper->info, upper); #else ret = lower->ops->start(lower, &upper->info); #endif Is too generic.... in drivers/timers/pwm.c???? Ben -----Oorspronkelijk bericht----- Van: disruptivesolution...@gmail.com <disruptivesolution...@gmail.com> Verzonden: zaterdag 3 april 2021 16:34 Aan: dev@nuttx.apache.org Onderwerp: PWM advanced and normal timers (STM32) Hi, I was implementing the following use-case: On TIM1 (advanced) timer I want to use pulse counts (By configuring and enabling: "CONFIG_PWM_PULSECOUNT") And for TIM4 I do NOT want to use this. Just normal time-based. But when I use examples/pwm_main.c this is giving me very strange responses. Also the drivers/timers/pwm.c seems to do something different then what I expect? Did some of you had this situation? And I do not mean "MULTICHANNEL" usage. Thats something different and another use case. Thanks Ben