AMD HD 3850/3870 fan controller database -
| posts: 12,359 | Location: Taganrog, Russia
AMD HD3850/3870 display adapters use proprietary internal VPU fan controller and unfortunately there is no public datasheet available for it, so in this thread I’ll collect all info about this controller, which I could find out.
Fan controller parameters
Lookup entry 0 .. 7 – lookup for thermal table based automatic fan control mode. Each pair define ASIC temperature threshold and target fan duty cycle for it. The controller must be switched to thermal table mode (PWM mode = 3) to use this lookup table.
PWM mode (0 - 7) - defines fan control mode (fixed, automatic etc). The controller supports 2 different automatic control modes defined by values 2 and 3, it is strongly not recommended to use other PWM modes because they serve for fixed fan speed adjustment and for PWM controller testing modes. PWM mode 2 enables automatic temperature transfer function mode, PWM mode 3 enables automatic thermal table mode.
PWM hysteresis (0 – 63 PWM ticks) - defines hysteresis for resulting duty cycle generated by the fan controller. PWM hysteresis is a part of fan controller’s acoustic management system. Hysteresis effect is used by the controller to get rid of unwanted duty cycle fluctuations and all duty cycle changes within [Duty cycle – PWM hysteresis; Duty cycle + PWM hysteresis] range are filtered by the controller as unwanted noise. In other words, if PWM hysteresis is equal to 10% and duty cycle is currently set to 50%, fan speed will be restricted to change to anything within [50-10=40%; 50+10=60%] range.
PWM ramp on (0 – off, 1 - on) – controls PWM ramp mode. PWM ramp mode is also a part of the fan controller’s acoustic management system. It serves for implementing soft changes of output fan duty cycle for improving acoustic characteristics of cooling syste.
PWM ramp (0 – 255 PWM ticks) defines ramp for duty cycle changes. When PWM ramp mode is enabled and duty cycle needs to be changed (either by temperature table or by transfer function), the controller softly increases/decreases current duty cycle by ramp value instead of directly setting new value. In other words, if duty cycle is currently set to 50%, ramp is enabled and set to 2% and duty cycle must be set to 60% (for example, according to transfer function) then the controller will increase duty cycle by ramp value (i.e. set 52%, then 54% etc until desired duty cycle is reached) per each sampling period.
Duty cycle 100% (0 – 255 PWM ticks) – defines amount of PWM controller’s ticks per each PWM frequency period. All duty cycle related parameters (e.g. Duty cycle min) are internally defined in the controller in PWM ticks, so this value directly affects amount of possible duty cycle gradations (i.e. Duty cycle 100% = 3 means that fan controller is able to set duty cycle to 0 ticks (0/3 = 0%), 1 tick (1/3 = 33,3%), 2 ticks (2/3 = 66.6%) and 3 ticks (3/3 = 100%).
Duty cycle min (0 – 100 %) – defines minimum fan duty cycle for temperature transfer function automatic fan control mode.
Spinup cycle (0 – 100 %) – defines fan duty cycle for fan engine spinup period. Spinup period is required because due to fan engine nature it is impossible to start it on any desired duty cycle. Minimum fan duty cycle allowing the engine to start is called spinup duty cycle. Fan controller always performs fan spinup cycle when it is being started (e.g. when leaving passive mode in automatic fan speed control mode).
Spinup time– defines spinup period length (in internal time units).
T min (0-255 °C) - defines minimum ASIC temperature. When temperature is below this value, the controller stops the fan and system is cooled passively. Please take a note that each ASIC sample has different thermal characteristics and during manufacturing minimum allowed fan PWM output seem to be is fused into each ASIC. In other words, it means that fan controller will ignore all attempts to set duty cycle to value below ASIC's fused minimum. So fans on such display adapters may spin even when automatic fan control circuit is stopping the fan (i.e. when duty cycle is set to 0%) or when duty cycle is manually set to 0%.
T max (0-255 °C) - defines maximum temperature for both automatic modes and fixed mode. When ASIC temperature exceeds this value, fan control circuit is forcibly set to fixed 100% duty cycle.
T slope (0-100 % per °C) – defines temperature slope ratio for temperature transfer function automatic control mode. This value represents desired increase/decrease of duty in percents per 16 °C.
T hysteresis (0-7 °C) – defines temperature hysteresis for T min value. The controller starts the fan when ASIC temperature exceeds T min and stops it when ASIC temperature drops below T min – T hysteresis.
Automatic fan control principles
The controller periodically samples ASIC temperature and calculates target duty cycle per each sampling period depending on the selected PWM mode:
If PWM mode = 2 (i.e. temperature transfer function mode is selected) then target duty cycle is generated using the following equation:
Duty cycle = Duty cycle min + (T – T min) * T slope / 16
If PWM mode = 3 (i.e. thermal table mode is selected) then target duty cycle is the closest duty cycle from the lookup table (defined by Lookup entry 0 .. 7).
Target duty cycle generated per each sampling period is processed by fan controller’s acoustic management system:
If absolute difference between currently selected and target duty cycle is less than PWM hysteresis, then the controller doesn’t apply any changes to current duty cycle. Otherwise, if PWM ramp on = 1 the controller increases / decreases current duty cycle by PWM ramp value, else the controller explicitly sets target duty cycle.
Fan controller tuning recommendations for beginners
If you’re going to use temperature transfer function based automatic fan control mode, it is recommended to start from programming 1-to-1 transfer function (Duty cycle = T) by specifying the following parameters:
PWM mode = 2
PWM hysteresis = 0
PWM ramp on = 1
PWM ramp = 1
Duty cycle min = 0
T min = 0
T slope = 16
T hysteresis = 0
After doing that, you may experiment with tuning these parameters for your needs.
If you’re going to use thermal table based automatic fan control mode, it is recommended to use the following parameters:
PWM mode = 3
PWM hysteresis = 0
PWM ramp on = 1
PWM ramp = 1
T min = 0
T hysteresis = 0
After doing that you may fill your own desired lookup table then experiment with the rest parameters.
Known bugs in fan control in AMD 3850/3870 BIOS images and bugfixing recommendations
1) Some BIOS images combine T min = 0 and T hysteresis = 4 settings. The controller doesn’t support negative difference between T min and T hysteresis, which results in generating constant Duty cycle = Spinup cycle fan speed. To fix it ensure that T min is greater or equal to T hysteresis or just set T hysteresis to 0.
2) Some BIOS images combine abnormally high PWM hysteresis value (>10%) with abnormally low PWM ramp value (<1%). This makes fan duty cycle adjustment granular and really slowly responsive to the temperature. To fix it decrease PWM hysteresis or just set it to 0.
P.S. All these parameters and formulas apply to RivaTuner v2.08 and higher. RivaTuner v2.07 edits T slope in PWM ticks, so temeprature transfer function looks a bit different with it.
Alexey Nicolaychuk aka Unwinder, RivaTuner creator
Last edited by Unwinder; 03-10-2008 at 18:24.