Hi Hugo,

On Fri, Nov 7, 2025 5:18 PM, Hugo Villeneuve wrote:

> > > +                         if (params->pl5_intin < PLL5_INTIN_MIN ||
> > > +                             params->pl5_intin > PLL5_INTIN_MAX)
> >
> >
> > And if you want the same behavior as before, shouldn't the comparison be 
> > with "<=" and ">=" ?

> I didn't see an answer to my question/comment about comparison with "<=" and 
> ">=" ?

The hardware manual says:

INTIN           20 to 320

So, both 20 and 320 are valid values.

Meaning I only want to 'continue' (ie, skip)   if ( x <=19 || x >= 321 )

or rather

if ( x < 20 || x > 320 )

So the original code of...

+                               params->pl5_intin = (foutvco_rate * 
params->pl5_refdiv) /
+                                                   (EXTAL_FREQ_IN_MEGA_HZ * 
MEGA);
+                               if (params->pl5_intin < PLL5_INTIN_MIN + 1 ||
+                                   params->pl5_intin > PLL5_INTIN_MAX - 1)
+                                       continue;

....was wrong.

I forgot to mention that in the patch.     :)

Thanks,
Chris

Reply via email to