Filter Status Register (Filterstatus); Clamp Registers - Texas Instruments UCD3138 Technical Reference Manual

Digital power supply controller
Hide thumbs Also See for UCD3138:
Table of Contents

Advertisement

Clamp Registers

4.9
Clamp Registers
There are 3 clamps in the filter structure, for the integrator, the output of the PID filter, and the output after
the feed forward multiplier. The integrator and filter clamps are signed 24 bit numbers, like the output of
the integrator and filter are. The overall output clamp is an unsigned 18 bit number, like the overall output.
Here is an example of clamping everything to a range from 10% to 50% of full scale.
Filter2Regs.FILTERYNCLPHI.bit.YN_CLAMP_HIGH = 0x400000; //50% of full scale
Filter2Regs.FILTERYNCLPLO.bit.YN_CLAMP_LOW = (int)(((float)0x800000) *.1);
//10% of full scale
Filter2Regs.FILTERKICLPHI.bit.KI_CLAMP_HIGH = 0x400000; //50% of full scale
Filter2Regs.FILTERKICLPLO.bit.KI_CLAMP_LOW = (int)(((float)0x800000) *.1);
//10% of full scale
Filter2Regs.FILTEROCLPHI.bit.OUTPUT_CLAMP_HIGH = 0x20000; //50% of full scale
Filter2Regs.FILTEROCLPLO.bit.OUTPUT_CLAMP_LOW = (int)(((float)0x40000) *.1);
//10% of full scale
4.10 Filter Preset Register
The FILTERPRESET register is used to preset the values in several calculated registers within the filter.
The preset register works between filter calculations. If the Filter is calculating when the Filter Preset is
enabled, the target register in the Filter is not written to immediately. The hardware waits for the filter to
stop calculating and then writes to the target register.
If the filter is not running, the Filter Preset takes effect immediately.
There are three bit fields in the Filter Preset Register.
The PRESET_EN bit is set to enable the preset, and can be polled to tell when it is complete.
The 3 PRESET_REG_SEL bits select which register will be preset, see the
the exact values.
Finally, the value to be preset is loaded into the PRESET_VALUE bits.
Here is an example code for using the preset register:
while(Filter0Regs.FILTERPRESET.bit.PRESET_EN == 1)
{
; //wait for previous preset to take effect
}
Filter0Regs.FILTERPRESET.bit.PRESET_VALUE = 15; //put a 15
Filter0Regs.FILTERPRESET.bit.PRESET_REG_SEL = 1; //into I holding register
Filter0Regs.FILTERPRESET.bit.PRESET_EN = 1; //set bit to make it happen
4.11 Filter Registers Reference
Registers for Filter Modules 0-2 are identical in their bit definitions.

4.11.1 Filter Status Register (FILTERSTATUS)

Address 00060000 – Filter 2 Status Register
Address 00090000 – Filter 1 Status Register
Address 000C0000 – Filter 0 Status Register
4
FILTER_BUSY
R-0
LEGEND: R/W = Read/Write; R = Read only; -n = value after reset
156
Filter
Figure 4-6. Filter Status Register (FILTERSTATUS)
3
YN_LOW_CLAMP
YN_HIGH_CLAMP
R-0
Copyright © 2016, Texas Instruments Incorporated
2
1
KI_YN_LOW_CLAMP
R-0
R-0
SNIU028A – February 2016 – Revised April 2016
www.ti.com
Filter Reference Section
0
KI_YN_HIGH_CLAMP
R-0
Submit Documentation Feedback
for

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents