On Mon, 16 May 2022 at 11:36, Frederic Konrad <fkon...@xilinx.com> wrote:
> > From: Peter Maydell <peter.mayd...@linaro.org>
> >
> > On Tue, 3 May 2022 at 16:27, <frederic.kon...@xilinx.com> wrote:
> > The ptimer documentation (in include/hw/ptimer.h) says
> >  * The default ptimer policy retains backward compatibility with the legacy
> >  * timers. Custom policies are adjusting the default one. Consider providing
> >  * a correct policy for your timer.
> >
> > and goes on to describe various weird behaviours of the default
> > policy. You almost certainly don't want to use PTIMER_POLICY_DEFAULT
> > for a new timer -- instead figure out the behaviour you actually
> > want and specify the appropriate flags.
>
> Hi Peter,
>
> Thanks for your feedback.
>
> Yes, I think, I can just use CONTINUOUS_TRIGGER and NO_IMMEDIATE_TRIGGER
> instead of forcing the decrementer / reload value to 1.  Would that be 
> cleaner?

I don't know exactly what behaviour you want, but you should probably
also consider PTIMER_POLICY_WRAP_AFTER_ONE_PERIOD.

-- PMM

Reply via email to