Robert ,
I agree with you.
The point is the data input to the state machine.
In particular sun condition it plays back and forth between the two status because of the data input.
I have to change / find out some different duty / panel power / panel voltage to be used to control the staus and avoid oscillations.
It does not happen frequently: just in some particular case and in a cloudy day.
The delay applied to the program as stated reduce the oscillation frequency.
Anyway it is not a real problem since it happens when the charging current is already low because of the low sun condition.
Thanks for all.
regards,
Ambrogio