AMD HD 3850/3870 fan controller database

Discussion in 'RivaTuner Advanced Discussion forum' started by Unwinder, Mar 10, 2008.

  1. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,190
    Likes Received:
    6,817
    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.
     
    Last edited: Mar 10, 2008
  2. ribbell

    ribbell Active Member

    Messages:
    55
    Likes Received:
    0
    GPU:
    4870X2
    A question on the look-up tables entries:
    in the look-up table control mode, when the temperature in the range definied by two look-up table entries , the applied duty cycle is computed based on the interpolation of the couples temperature-duti_cycle definied by these look-up entries?
    Moreover, if i understand correctly Duty cycle 100% parameter, a Duty cycle 100%=135 means that a duty cycle = 40 % would be represented internally by the controller as 0.4*135=54 pwm ticks and at the same time the minimum duty cycle step variation in percents is 1/135 *100=0.74%, right?
     
  3. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,190
    Likes Received:
    6,817
    There is no actual interpolation, for lookup table mode target generated duty cycle is always defined by the closest lookup table entry. However, with ramp mode enabled there is something close to interpolation due to soft incremental current duty cycle tuning.


    Yep, correct. So for preceise 1% DC adjustment you may just set it to 100.
     
  4. Nitrius

    Nitrius Member Guru

    Messages:
    148
    Likes Received:
    0
    GPU:
    Nvidia GTX 580
    Is this still valid?
    Take 58 temp for an example.
    0 + (58 - 0) * 7 / 16 = should be 25,375 Duty Cycle %. But the hardware monitor show my duty cycle as 28% instead, so am i just thinking wrong or what? Rivatuner 2.10 matched the calculation. But something seem to have changed in 2.11.

    Using the latest rivatuner with ati 4870 512mb.
     

  5. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,190
    Likes Received:
    6,817
    Unreal. Nothing have changed, but even if there were changes they couldn't affect these things because this formula is generated and applied at hardware fan controller level, not from RT side.
    Reread descriptions of duty cycle 100%, ramp and hysteresis parameters, you don't seem to understand them completely. They affect target duty cycle generation accuracy and explain possible differences between _current_ and _target_ duty cycle values.
     
  6. Nitrius

    Nitrius Member Guru

    Messages:
    148
    Likes Received:
    0
    GPU:
    Nvidia GTX 580
    It's true, i don't quite understand all this :p All i know is that i've used T slope to adjust most of the fan speed.

    I've used these:
    And after that i just changed T Slope to what i was comfortable with. And since RT 2.11 the fan speed has changed, even though the settings are all the same.

    Edit: T slope at 7 is what I've used.
     
    Last edited: Sep 19, 2008
  7. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,190
    Likes Received:
    6,817
    I repeat once again, pay attention to Duty cycle 100% defining duty cycle generation accuracy. Or better just don't touch these things if it doesn't tell you anything.
     
  8. Nitrius

    Nitrius Member Guru

    Messages:
    148
    Likes Received:
    0
    GPU:
    Nvidia GTX 580
    I haven't touched Duty cycle 100%, i've only touched the once mentioned here:
    Duty cycle 100% is at 128, which is the default number.

    Edit: T Slope is at 7. So at 57 temp duty cycle should be at around 25 according to the calculation, but it is at 28 instead, it's just that i don't understand, but it's not a big deal really.
     
  9. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,190
    Likes Received:
    6,817
    I recommend you to read what is Duty cycle 100% one more time. This parameter defines amount of possible DC gradations and with DC 100% set to 128 PWM ticks you physically cannot adjust DC in preceise 1% steps.
    And PLEASE let's avoid turning database thread into regular multi-phase understanding troubleshooting thread, ok? It is not dedicated for that. Questions posted by ribbell are valid here, endless repeats of the same things are definitively not.
     
  10. tralalalala

    tralalalala Banned

    Messages:
    102
    Likes Received:
    0
    GPU:
    6600 GT
    Hi,
    I just got myself a 4670 Sapphire and can't stand the fan noise even at 2%. So I tried to do a custom fan speed setup according to above descriptions.

    Now if I understand the system correctly then there is no way to make the fan stay at 1% until, say 65°C and then softly increase speed with rising temperature?

    Everything I've tried always ended up with the fan hopelessly bouncing between two states at high frequency, making very annoying noises.

    I even tried to build in some hysteresis by making the Duty Cycle % steps between each lookup table range smaller than the PWM hysteresis value.

    If the information in this thread is correct (the way I understood it) then setting PWM hysteresis to 2 and using the following lookup table

    Code:
    Temp         Duty Cycle %
    65              1
    68              2
    71              3
    
    should mean that the speed doesn't increase until temp 3 is reached and doesn't slow down again until temp 1 reached. Instead the fan speed just ended up bouncing between 1 and 2%.

    Am I doing it wrong? Thx for any replies.
     

  11. Unwinder

    Unwinder Ancient Guru Staff Member

    Messages:
    17,190
    Likes Received:
    6,817
    No, there is no way to program such scheme in transfer function mode but lookup table mode allows emulating it. However, adjustment _will_not_ be soft in this case.

    You have not provided full set of parameters, but it sounds like a result of PWM ramp mode activity.
     
    Last edited: Nov 26, 2008
  12. tralalalala

    tralalalala Banned

    Messages:
    102
    Likes Received:
    0
    GPU:
    6600 GT
    Changing PWM ramp settings didn't change anything. Right now I'm using a scheme that only uses 1% up to 65°C, 2% up to 67°C and 3% for above that (gaming).

    Like that the noise is just about bearable, even though it is louder than any other GPU I bought during the last 4 years.
     

Share This Page