Thank you. Then my observation was a good one. This is not like the datasheet was telling how the driver "should" work. I was trying to solve this, but its deep in the core system where this CONFIG_PWM_PULSECOUNT has effect. If I only had more time....
Ben -----Oorspronkelijk bericht----- Van: raiden00pl <raiden0...@gmail.com> Verzonden: dinsdag 6 april 2021 08:10 Aan: dev@nuttx.apache.org Onderwerp: Re: PWM advanced and normal timers (STM32) As far as I can remember, it never worked that way. If you enable PULSECOUNT, you can only use timers that support this feature. Other PWM instances will not work properly. sob., 3 kwi 2021 o 17:19 <disruptivesolution...@gmail.com> napisaĆ(a): > 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 > > >