Suspecting the ADC measurements or PWM timer output coming wrong for every 65535 iterations.
Here below is the detail of my application.
I am running the PWM timer1 at 5Khz in up-down mode. Two interrupts, one in timer counter equal to zero and ADC fast conversion done.
Interrupt generates at every timer counter equal to zero then I start the ADC fast conversion and all my control runs in interrupt of ADC fast conversion.
All my currents are okay until 65535 timer carriers(13.1s = 65535/5000) and the currents are a little bit shifting after 65535 timer carrier for some time and settling normally.
Here, PWM timer and ADC fast conversions are making the 65535 iterations.
At this overflow condition, the only issue is coming constantly. I have changed from 5Khz to 4Khz and the issue is reproducing similarly(16.3s = 65535/4000).
Did anybody face this kind of overflow issue?