2022-01-31 04:36 AM
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?
2022-01-31 06:52 AM
Can you show the code? Surely there's a bug in there somewhere.
2022-02-01 01:38 AM
Hi,
Two HAL files(PWM and ADC) and both are very big to share here. Is there any other way to discuss this with you?
2022-02-01 02:02 AM
Hello,
you can zip your files and post them here.
2022-02-01 02:08 AM
2022-02-01 05:40 AM
Where within those files do you get the incorrect value? I don't see a main logic loop in any file you've provided.