Adding some digital filtering to the external event triggering the HRTIM outputs
Context of this issue
While trying to find work-arounds for the noisy current measurements leading to unstable current mode control, we encountered a promising unexploited feature of the HRTIM peripheral. It is possible to implement a digital filter on the external event so that the HRTIM output reset only after a given amount of comparators events.
Description of the digital filter feature
The external event generation comes from the comparison from the controller reference and the inductor current. If the inductor current reach the threashold it generates an external event resetting the HRTIM output, thus reducing inductor current.
Digital filter permits to wait few events before changing the state of the output, thus rejecting some really brief, noise related comparison events that could lead to control instabilities. A high rate of filtering could lead to delaying too much the control, so the right amount as to be determined.
Actions
To implement this feature it is necessary to:
-
change EEV4 (External Event) and EEV5 to be change to EEV6 and EEV8 (that have this feature). -
make a series of tests before and after this change to compare the improvement in stability of the current mode