123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636 |
- //*****************************************************************************
- //
- // hw_fan.h - Macros used when accessing the fan control hardware.
- //
- // Copyright (c) 2010-2011 Texas Instruments Incorporated. All rights reserved.
- // Software License Agreement
- //
- // Texas Instruments (TI) is supplying this software for use solely and
- // exclusively on TI's microcontroller products. The software is owned by
- // TI and/or its suppliers, and is protected under applicable copyright
- // laws. You may not combine this software with "viral" open-source
- // software in order to form a larger program.
- //
- // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
- // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
- // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
- // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
- // DAMAGES, FOR ANY REASON WHATSOEVER.
- //
- // This is part of revision 8264 of the Stellaris Firmware Development Package.
- //
- //*****************************************************************************
- #ifndef __HW_FAN_H__
- #define __HW_FAN_H__
- //*****************************************************************************
- //
- // The following are defines for the Fan Control register offsets.
- //
- //*****************************************************************************
- #define FAN_O_STS 0x00000000 // FAN Status
- #define FAN_O_CTL 0x00000004 // FAN Control
- #define FAN_O_CH0 0x00000010 // FAN Channel Command
- #define FAN_O_CMD0 0x00000014 // FAN Channel Command
- #define FAN_O_CST0 0x00000018 // FAN Channel Status
- #define FAN_O_CH1 0x00000020 // FAN Channel Setup
- #define FAN_O_CMD1 0x00000024 // FAN Channel Command
- #define FAN_O_CST1 0x00000028 // FAN Channel Status
- #define FAN_O_CH2 0x00000030 // FAN Channel Setup
- #define FAN_O_CMD2 0x00000034 // FAN Channel Command
- #define FAN_O_CST2 0x00000038 // FAN Channel Status
- #define FAN_O_CH3 0x00000040 // FAN Channel Setup
- #define FAN_O_CMD3 0x00000044 // FAN Channel Command
- #define FAN_O_CST3 0x00000048 // FAN Channel Status
- #define FAN_O_CH4 0x00000050 // FAN Channel Setup
- #define FAN_O_CMD4 0x00000054 // FAN Channel Command
- #define FAN_O_CST4 0x00000058 // FAN Channel Status
- #define FAN_O_CH5 0x00000060 // FAN Channel Setup
- #define FAN_O_CMD5 0x00000064 // FAN Channel Command
- #define FAN_O_CST5 0x00000068 // FAN Channel Status
- #define FAN_O_CH6 0x00000070 // FAN Channel Setup
- #define FAN_O_CMD6 0x00000074 // FAN Channel Command
- #define FAN_O_CST6 0x00000078 // FAN Channel Status
- #define FAN_O_CH7 0x00000080 // FAN Channel Setup
- #define FAN_O_CMD7 0x00000084 // FAN Channel Command
- #define FAN_O_CST7 0x00000088 // FAN Channel Status
- #define FAN_O_IM 0x00000090 // FAN Interrupt Mask
- #define FAN_O_RIS 0x00000094 // FAN Raw Interrupt Status
- #define FAN_O_MIS 0x00000098 // FAN Masked Interrupt Status
- #define FAN_O_IC 0x0000009C // FAN Interrupt Clear
- #define FAN_O_PP 0x00000FC0 // FAN Peripheral Properties
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_STS register.
- //
- //*****************************************************************************
- #define FAN_STS_FANCNT_M 0x000F0000 // Fan Count
- #define FAN_STS_ST5_M 0x00000C00 // Fan 5 Status
- #define FAN_STS_ST5_STALLED 0x00000000 // Stalled
- #define FAN_STS_ST5_CHANGING 0x00000400 // Changing
- #define FAN_STS_ST5_LOCKED 0x00000800 // Locked
- #define FAN_STS_ST5_UNBALANCED 0x00000C00 // Unbalanced Spin
- #define FAN_STS_ST4_M 0x00000300 // Fan 4 Status
- #define FAN_STS_ST3_M 0x000000C0 // Fan 3 Status
- #define FAN_STS_ST2_M 0x00000030 // Fan 2 Status
- #define FAN_STS_ST1_M 0x0000000C // Fan 1 Status
- #define FAN_STS_ST0_M 0x00000003 // Fan 0 Status
- #define FAN_STS_FANCNT_S 16
- #define FAN_STS_ST4_S 8
- #define FAN_STS_ST3_S 6
- #define FAN_STS_ST2_S 4
- #define FAN_STS_ST1_S 2
- #define FAN_STS_ST0_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CTL register.
- //
- //*****************************************************************************
- #define FAN_CTL_E5 0x00000020 // Fan 5 Enable
- #define FAN_CTL_E4 0x00000010 // Fan 4 Enable
- #define FAN_CTL_E3 0x00000008 // Fan 3 Enable
- #define FAN_CTL_E2 0x00000004 // Fan 2 Enable
- #define FAN_CTL_E1 0x00000002 // Fan 1 Enable
- #define FAN_CTL_E0 0x00000001 // Fan 0 Enable
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CH0 register.
- //
- //*****************************************************************************
- #define FAN_CH0_ASTART 0x00008000 // Auto Restart
- #define FAN_CH0_ACCEL 0x00004000 // Acceleration and Deceleration
- // Rule
- #define FAN_CH0_HYST_M 0x00003800 // Hysteresis Adjustment on PID
- // Adjust
- #define FAN_CH0_STPER_M 0x00000700 // Start Period
- #define FAN_CH0_START_M 0x000000C0 // Fast Start Rule
- #define FAN_CH0_START_NOFAST 0x00000000 // No fast start
- #define FAN_CH0_START_50DC 0x00000040 // 50% duty cycle
- #define FAN_CH0_START_75DC 0x00000080 // 75% duty cycle
- #define FAN_CH0_START_100DC 0x000000C0 // 100% duty cycle
- #define FAN_CH0_AVG_M 0x00000030 // Averaging of Tachometer
- #define FAN_CH0_AVG_0 0x00000000 // No averaging
- #define FAN_CH0_AVG_2 0x00000010 // Average 2 edges
- #define FAN_CH0_AVG_4 0x00000020 // Average 4 edges
- #define FAN_CH0_AVG_8 0x00000030 // Average 8 edges
- #define FAN_CH0_PPR_M 0x0000000C // Pulse per Revolution on
- // Tachometer
- #define FAN_CH0_PPR_1 0x00000000 // 1 pulse per revolution
- #define FAN_CH0_PPR_2 0x00000004 // 2 pulses per revolution
- #define FAN_CH0_PPR_4 0x00000008 // 4 pulses per revolution
- #define FAN_CH0_PPR_8 0x0000000C // 8 pulses per revolution
- #define FAN_CH0_MAN 0x00000001 // Control Type
- #define FAN_CH0_HYST_S 11
- #define FAN_CH0_STPER_S 8
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CMD0 register.
- //
- //*****************************************************************************
- #define FAN_CMD0_DC_M 0x01FF0000 // PWM Duty Cycle
- #define FAN_CMD0_RPM_M 0x00001FFF // Fan Speed (in RPM)
- #define FAN_CMD0_DC_S 16
- #define FAN_CMD0_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CST0 register.
- //
- //*****************************************************************************
- #define FAN_CST0_COUNT_M 0x07FF0000 // Last Read Tachometer Count
- #define FAN_CST0_RPM_M 0x00001FFF // Last Read RPM Speed Computed
- #define FAN_CST0_COUNT_S 16
- #define FAN_CST0_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CH1 register.
- //
- //*****************************************************************************
- #define FAN_CH1_ASTART 0x00008000 // Auto Restart
- #define FAN_CH1_ACCEL 0x00004000 // Acceleration and Deceleration
- // Rule
- #define FAN_CH1_HYST_M 0x00003800 // Hysteresis Adjustment on PID
- // Adjust
- #define FAN_CH1_STPER_M 0x00000700 // Start Period
- #define FAN_CH1_START_M 0x000000C0 // Fast Start Rule
- #define FAN_CH1_START_NOFAST 0x00000000 // No fast start
- #define FAN_CH1_START_50DC 0x00000040 // 50% duty cycle
- #define FAN_CH1_START_75DC 0x00000080 // 75% duty cycle
- #define FAN_CH1_START_100DC 0x000000C0 // 100% duty cycle
- #define FAN_CH1_AVG_M 0x00000030 // Averaging of Tachometer
- #define FAN_CH1_AVG_0 0x00000000 // No averaging
- #define FAN_CH1_AVG_2 0x00000010 // Average 2 edges
- #define FAN_CH1_AVG_4 0x00000020 // Average 4 edges
- #define FAN_CH1_AVG_8 0x00000030 // Average 8 edges
- #define FAN_CH1_PPR_M 0x0000000C // Pulse per Revolution on
- // Tachometer
- #define FAN_CH1_PPR_1 0x00000000 // 1 pulse per revolution
- #define FAN_CH1_PPR_2 0x00000004 // 2 pulses per revolution
- #define FAN_CH1_PPR_4 0x00000008 // 4 pulses per revolution
- #define FAN_CH1_PPR_8 0x0000000C // 8 pulses per revolution
- #define FAN_CH1_MAN 0x00000001 // Control Type
- #define FAN_CH1_HYST_S 11
- #define FAN_CH1_STPER_S 8
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CMD1 register.
- //
- //*****************************************************************************
- #define FAN_CMD1_DC_M 0x01FF0000 // PWM Duty Cycle
- #define FAN_CMD1_RPM_M 0x00001FFF // Fan Speed (in RPM)
- #define FAN_CMD1_DC_S 16
- #define FAN_CMD1_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CST1 register.
- //
- //*****************************************************************************
- #define FAN_CST1_COUNT_M 0x07FF0000 // Last Read Tachometer Count
- #define FAN_CST1_RPM_M 0x00001FFF // Last Read RPM Speed Computed
- #define FAN_CST1_COUNT_S 16
- #define FAN_CST1_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CH2 register.
- //
- //*****************************************************************************
- #define FAN_CH2_ASTART 0x00008000 // Auto Restart
- #define FAN_CH2_ACCEL 0x00004000 // Acceleration and Deceleration
- // Rule
- #define FAN_CH2_HYST_M 0x00003800 // Hysteresis Adjustment on PID
- // Adjust
- #define FAN_CH2_STPER_M 0x00000700 // Start Period
- #define FAN_CH2_START_M 0x000000C0 // Fast Start Rule
- #define FAN_CH2_START_NOFAST 0x00000000 // No fast start
- #define FAN_CH2_START_50DC 0x00000040 // 50% duty cycle
- #define FAN_CH2_START_75DC 0x00000080 // 75% duty cycle
- #define FAN_CH2_START_100DC 0x000000C0 // 100% duty cycle
- #define FAN_CH2_AVG_M 0x00000030 // Averaging of Tachometer
- #define FAN_CH2_AVG_0 0x00000000 // No averaging
- #define FAN_CH2_AVG_2 0x00000010 // Average 2 edges
- #define FAN_CH2_AVG_4 0x00000020 // Average 4 edges
- #define FAN_CH2_AVG_8 0x00000030 // Average 8 edges
- #define FAN_CH2_PPR_M 0x0000000C // Pulse per Revolution on
- // Tachometer
- #define FAN_CH2_PPR_1 0x00000000 // 1 pulse per revolution
- #define FAN_CH2_PPR_2 0x00000004 // 2 pulses per revolution
- #define FAN_CH2_PPR_4 0x00000008 // 4 pulses per revolution
- #define FAN_CH2_PPR_8 0x0000000C // 8 pulses per revolution
- #define FAN_CH2_MAN 0x00000001 // Control Type
- #define FAN_CH2_HYST_S 11
- #define FAN_CH2_STPER_S 8
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CMD2 register.
- //
- //*****************************************************************************
- #define FAN_CMD2_DC_M 0x01FF0000 // PWM Duty Cycle
- #define FAN_CMD2_RPM_M 0x00001FFF // Fan Speed (in RPM)
- #define FAN_CMD2_DC_S 16
- #define FAN_CMD2_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CST2 register.
- //
- //*****************************************************************************
- #define FAN_CST2_COUNT_M 0x07FF0000 // Last Read Tachometer Count
- #define FAN_CST2_RPM_M 0x00001FFF // Last Read RPM Speed Computed
- #define FAN_CST2_COUNT_S 16
- #define FAN_CST2_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CH3 register.
- //
- //*****************************************************************************
- #define FAN_CH3_ASTART 0x00008000 // Auto Restart
- #define FAN_CH3_ACCEL 0x00004000 // Acceleration and Deceleration
- // Rule
- #define FAN_CH3_HYST_M 0x00003800 // Hysteresis Adjustment on PID
- // Adjust
- #define FAN_CH3_STPER_M 0x00000700 // Start Period
- #define FAN_CH3_START_M 0x000000C0 // Fast Start Rule
- #define FAN_CH3_START_NOFAST 0x00000000 // No fast start
- #define FAN_CH3_START_50DC 0x00000040 // 50% duty cycle
- #define FAN_CH3_START_75DC 0x00000080 // 75% duty cycle
- #define FAN_CH3_START_100DC 0x000000C0 // 100% duty cycle
- #define FAN_CH3_AVG_M 0x00000030 // Averaging of Tachometer
- #define FAN_CH3_AVG_0 0x00000000 // No averaging
- #define FAN_CH3_AVG_2 0x00000010 // Average 2 edges
- #define FAN_CH3_AVG_4 0x00000020 // Average 4 edges
- #define FAN_CH3_AVG_8 0x00000030 // Average 8 edges
- #define FAN_CH3_PPR_M 0x0000000C // Pulse per Revolution on
- // Tachometer
- #define FAN_CH3_PPR_1 0x00000000 // 1 pulse per revolution
- #define FAN_CH3_PPR_2 0x00000004 // 2 pulses per revolution
- #define FAN_CH3_PPR_4 0x00000008 // 4 pulses per revolution
- #define FAN_CH3_PPR_8 0x0000000C // 8 pulses per revolution
- #define FAN_CH3_MAN 0x00000001 // Control Type
- #define FAN_CH3_HYST_S 11
- #define FAN_CH3_STPER_S 8
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CMD3 register.
- //
- //*****************************************************************************
- #define FAN_CMD3_DC_M 0x01FF0000 // PWM Duty Cycle
- #define FAN_CMD3_RPM_M 0x00001FFF // Fan Speed (in RPM)
- #define FAN_CMD3_DC_S 16
- #define FAN_CMD3_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CST3 register.
- //
- //*****************************************************************************
- #define FAN_CST3_COUNT_M 0x07FF0000 // Last Read Tachometer Count
- #define FAN_CST3_RPM_M 0x00001FFF // Last Read RPM Speed Computed
- #define FAN_CST3_COUNT_S 16
- #define FAN_CST3_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CH4 register.
- //
- //*****************************************************************************
- #define FAN_CH4_ASTART 0x00008000 // Auto Restart
- #define FAN_CH4_ACCEL 0x00004000 // Acceleration and Deceleration
- // Rule
- #define FAN_CH4_HYST_M 0x00003800 // Hysteresis Adjustment on PID
- // Adjust
- #define FAN_CH4_STPER_M 0x00000700 // Start Period
- #define FAN_CH4_START_M 0x000000C0 // Fast Start Rule
- #define FAN_CH4_START_NOFAST 0x00000000 // No fast start
- #define FAN_CH4_START_50DC 0x00000040 // 50% duty cycle
- #define FAN_CH4_START_75DC 0x00000080 // 75% duty cycle
- #define FAN_CH4_START_100DC 0x000000C0 // 100% duty cycle
- #define FAN_CH4_AVG_M 0x00000030 // Averaging of Tachometer
- #define FAN_CH4_AVG_0 0x00000000 // No averaging
- #define FAN_CH4_AVG_2 0x00000010 // Average 2 edges
- #define FAN_CH4_AVG_4 0x00000020 // Average 4 edges
- #define FAN_CH4_AVG_8 0x00000030 // Average 8 edges
- #define FAN_CH4_PPR_M 0x0000000C // Pulse per Revolution on
- // Tachometer
- #define FAN_CH4_PPR_1 0x00000000 // 1 pulse per revolution
- #define FAN_CH4_PPR_2 0x00000004 // 2 pulses per revolution
- #define FAN_CH4_PPR_4 0x00000008 // 4 pulses per revolution
- #define FAN_CH4_PPR_8 0x0000000C // 8 pulses per revolution
- #define FAN_CH4_MAN 0x00000001 // Control Type
- #define FAN_CH4_HYST_S 11
- #define FAN_CH4_STPER_S 8
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CMD4 register.
- //
- //*****************************************************************************
- #define FAN_CMD4_DC_M 0x01FF0000 // PWM Duty Cycle
- #define FAN_CMD4_RPM_M 0x00001FFF // Fan Speed (in RPM)
- #define FAN_CMD4_DC_S 16
- #define FAN_CMD4_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CST4 register.
- //
- //*****************************************************************************
- #define FAN_CST4_COUNT_M 0x07FF0000 // Last Read Tachometer Count
- #define FAN_CST4_RPM_M 0x00001FFF // Last Read RPM Speed Computed
- #define FAN_CST4_COUNT_S 16
- #define FAN_CST4_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CH5 register.
- //
- //*****************************************************************************
- #define FAN_CH5_ASTART 0x00008000 // Auto Restart
- #define FAN_CH5_ACCEL 0x00004000 // Acceleration and Deceleration
- // Rule
- #define FAN_CH5_HYST_M 0x00003800 // Hysteresis Adjustment on PID
- // Adjust
- #define FAN_CH5_STPER_M 0x00000700 // Start Period
- #define FAN_CH5_START_M 0x000000C0 // Fast Start Rule
- #define FAN_CH5_START_NOFAST 0x00000000 // No fast start
- #define FAN_CH5_START_50DC 0x00000040 // 50% duty cycle
- #define FAN_CH5_START_75DC 0x00000080 // 75% duty cycle
- #define FAN_CH5_START_100DC 0x000000C0 // 100% duty cycle
- #define FAN_CH5_AVG_M 0x00000030 // Averaging of Tachometer
- #define FAN_CH5_AVG_0 0x00000000 // No averaging
- #define FAN_CH5_AVG_2 0x00000010 // Average 2 edges
- #define FAN_CH5_AVG_4 0x00000020 // Average 4 edges
- #define FAN_CH5_AVG_8 0x00000030 // Average 8 edges
- #define FAN_CH5_PPR_M 0x0000000C // Pulse per Revolution on
- // Tachometer
- #define FAN_CH5_PPR_1 0x00000000 // 1 pulse per revolution
- #define FAN_CH5_PPR_2 0x00000004 // 2 pulses per revolution
- #define FAN_CH5_PPR_4 0x00000008 // 4 pulses per revolution
- #define FAN_CH5_PPR_8 0x0000000C // 8 pulses per revolution
- #define FAN_CH5_MAN 0x00000001 // Control Type
- #define FAN_CH5_HYST_S 11
- #define FAN_CH5_STPER_S 8
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CMD5 register.
- //
- //*****************************************************************************
- #define FAN_CMD5_DC_M 0x01FF0000 // PWM Duty Cycle
- #define FAN_CMD5_RPM_M 0x00001FFF // Fan Speed (in RPM)
- #define FAN_CMD5_DC_S 16
- #define FAN_CMD5_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CST5 register.
- //
- //*****************************************************************************
- #define FAN_CST5_COUNT_M 0x07FF0000 // Last Read Tachometer Count
- #define FAN_CST5_RPM_M 0x00001FFF // Last Read RPM Speed Computed
- #define FAN_CST5_COUNT_S 16
- #define FAN_CST5_RPM_S 0
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CH6 register.
- //
- //*****************************************************************************
- #define FAN_CH6_MAN 0x00000001 // Control Type
- #define FAN_CH6_PPR_M 0x0000000C // Pulse per Revolution on
- // Tachometer
- #define FAN_CH6_PPR_1 0x00000000 // 1 pulse per revolution
- #define FAN_CH6_PPR_2 0x00000004 // 2 pulses per revolution
- #define FAN_CH6_PPR_4 0x00000008 // 4 pulses per revolution
- #define FAN_CH6_PPR_8 0x0000000C // 8 pulses per revolution
- #define FAN_CH6_AVG_M 0x00000030 // Averaging of Tachometer
- #define FAN_CH6_AVG_0 0x00000000 // No averaging
- #define FAN_CH6_AVG_2 0x00000010 // Average 2 edges
- #define FAN_CH6_AVG_4 0x00000020 // Average 4 edges
- #define FAN_CH6_AVG_8 0x00000030 // Average 8 edges
- #define FAN_CH6_START_M 0x000000C0 // Fast Start Rule
- #define FAN_CH6_START_NOFAST 0x00000000 // No fast start
- #define FAN_CH6_START_50DC 0x00000040 // 50% duty cycle
- #define FAN_CH6_START_75DC 0x00000080 // 75% duty cycle
- #define FAN_CH6_START_100DC 0x000000C0 // 100% duty cycle
- #define FAN_CH6_STPER_M 0x00000700 // Start Period
- #define FAN_CH6_HYST_M 0x00003800 // Hysteresis Adjustment on PID
- // Adjust
- #define FAN_CH6_ACCEL 0x00004000 // Acceleration and Deceleration
- // Rule
- #define FAN_CH6_ASTART 0x00008000 // Auto Restart
- #define FAN_CH6_STPER_S 8
- #define FAN_CH6_HYST_S 11
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CMD6 register.
- //
- //*****************************************************************************
- #define FAN_CMD6_RPM_M 0x00001FFF // Fan Speed (in RPM)
- #define FAN_CMD6_DC_M 0x01FF0000 // PWM Duty Cycle
- #define FAN_CMD6_RPM_S 0
- #define FAN_CMD6_DC_S 16
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CST6 register.
- //
- //*****************************************************************************
- #define FAN_CST6_RPM_M 0x00001FFF // Last Read RPM Speed Computed
- #define FAN_CST6_COUNT_M 0x07FF0000 // Last Read Tachometer Count
- #define FAN_CST6_RPM_S 0
- #define FAN_CST6_COUNT_S 16
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CH7 register.
- //
- //*****************************************************************************
- #define FAN_CH7_MAN 0x00000001 // Control Type
- #define FAN_CH7_PPR_M 0x0000000C // Pulse per Revolution on
- // Tachometer
- #define FAN_CH7_PPR_1 0x00000000 // 1 pulse per revolution
- #define FAN_CH7_PPR_2 0x00000004 // 2 pulses per revolution
- #define FAN_CH7_PPR_4 0x00000008 // 4 pulses per revolution
- #define FAN_CH7_PPR_8 0x0000000C // 8 pulses per revolution
- #define FAN_CH7_AVG_M 0x00000030 // Averaging of Tachometer
- #define FAN_CH7_AVG_0 0x00000000 // No averaging
- #define FAN_CH7_AVG_2 0x00000010 // Average 2 edges
- #define FAN_CH7_AVG_4 0x00000020 // Average 4 edges
- #define FAN_CH7_AVG_8 0x00000030 // Average 8 edges
- #define FAN_CH7_START_M 0x000000C0 // Fast Start Rule
- #define FAN_CH7_START_NOFAST 0x00000000 // No fast start
- #define FAN_CH7_START_50DC 0x00000040 // 50% duty cycle
- #define FAN_CH7_START_75DC 0x00000080 // 75% duty cycle
- #define FAN_CH7_START_100DC 0x000000C0 // 100% duty cycle
- #define FAN_CH7_STPER_M 0x00000700 // Start Period
- #define FAN_CH7_HYST_M 0x00003800 // Hysteresis Adjustment on PID
- // Adjust
- #define FAN_CH7_ACCEL 0x00004000 // Acceleration and Deceleration
- // Rule
- #define FAN_CH7_ASTART 0x00008000 // Auto Restart
- #define FAN_CH7_STPER_S 8
- #define FAN_CH7_HYST_S 11
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CMD7 register.
- //
- //*****************************************************************************
- #define FAN_CMD7_RPM_M 0x00001FFF // Fan Speed (in RPM)
- #define FAN_CMD7_DC_M 0x01FF0000 // PWM Duty Cycle
- #define FAN_CMD7_RPM_S 0
- #define FAN_CMD7_DC_S 16
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_CST7 register.
- //
- //*****************************************************************************
- #define FAN_CST7_RPM_M 0x00001FFF // Last Read RPM Speed Computed
- #define FAN_CST7_COUNT_M 0x07FF0000 // Last Read Tachometer Count
- #define FAN_CST7_RPM_S 0
- #define FAN_CST7_COUNT_S 16
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_IM register.
- //
- //*****************************************************************************
- #define FAN_IM_C5INT1IM 0x00400000 // Channel 5 Interrupt 1 Mask
- #define FAN_IM_C5INT0IM 0x00200000 // Channel 5 Interrupt 0 Mask
- #define FAN_IM_C5STALLIM 0x00100000 // Channel 5 Stall Interrupt Mask
- #define FAN_IM_C4INT1IM 0x00040000 // Channel 4 Interrupt 1 Mask
- #define FAN_IM_C4INT0IM 0x00020000 // Channel 4 Interrupt 0 Mask
- #define FAN_IM_C4STALLIM 0x00010000 // Channel 4 Stall Interrupt Mask
- #define FAN_IM_C3INT1IM 0x00004000 // Channel 3 Interrupt 1 Mask
- #define FAN_IM_C3INT0IM 0x00002000 // Channel 3 Interrupt 0 Mask
- #define FAN_IM_C3STALLIM 0x00001000 // Channel 3 Stall Interrupt Mask
- #define FAN_IM_C2INT1IM 0x00000400 // Channel 2 Interrupt 1 Mask
- #define FAN_IM_C2INT0IM 0x00000200 // Channel 2 Interrupt 0 Mask
- #define FAN_IM_C2STALLIM 0x00000100 // Channel 2 Stall Interrupt Mask
- #define FAN_IM_C1INT1IM 0x00000040 // Channel 1 Interrupt 1 Mask
- #define FAN_IM_C1INT0IM 0x00000020 // Channel 1 Interrupt 0 Mask
- #define FAN_IM_C1STALLIM 0x00000010 // Channel 1 Stall Interrupt Mask
- #define FAN_IM_C0INT1IM 0x00000004 // Channel 0 Interrupt 1 Mask
- #define FAN_IM_C0INT0IM 0x00000002 // Channel 0 Interrupt 0 Mask
- #define FAN_IM_C0STALLIM 0x00000001 // Channel 0 Stall Interrupt Mask
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_RIS register.
- //
- //*****************************************************************************
- #define FAN_RIS_C5INT1RIS 0x00400000 // Channel 5 Raw Interrupt 1 Status
- #define FAN_RIS_C5INT0RIS 0x00200000 // Channel 5 Raw Interrupt 0 Status
- #define FAN_RIS_C5STALLRIS 0x00100000 // Channel 5 Raw Stall Interrupt
- // Status
- #define FAN_RIS_C4INT1RIS 0x00040000 // Channel 4 Raw Interrupt 1 Status
- #define FAN_RIS_C4INT0RIS 0x00020000 // Channel 4 Raw Interrupt 0 Status
- #define FAN_RIS_C4STALLRIS 0x00010000 // Channel 4 Raw Stall Interrupt
- // Status
- #define FAN_RIS_C3INT1RIS 0x00004000 // Channel 3 Raw Interrupt 1 Status
- #define FAN_RIS_C3INT0RIS 0x00002000 // Channel 3 Raw Interrupt 0 Status
- #define FAN_RIS_C3STALLRIS 0x00001000 // Channel 3 Raw Stall Interrupt
- // Status
- #define FAN_RIS_C2INT1RIS 0x00000400 // Channel 2 Raw Interrupt 1 Status
- #define FAN_RIS_C2INT0RIS 0x00000200 // Channel 2 Raw Interrupt 0 Status
- #define FAN_RIS_C2STALLRIS 0x00000100 // Channel 2 Raw Stall Interrupt
- // Status
- #define FAN_RIS_C1INT1RIS 0x00000040 // Channel 1 Raw Interrupt 1 Status
- #define FAN_RIS_C1INT0RIS 0x00000020 // Channel 1 Raw Interrupt 0 Status
- #define FAN_RIS_C1STALLRIS 0x00000010 // Channel 1 Raw Stall Interrupt
- // Status
- #define FAN_RIS_C0INT1RIS 0x00000004 // Channel 0 Raw Interrupt 1 Status
- #define FAN_RIS_C0INT0RIS 0x00000002 // Channel 0 Raw Interrupt 0 Status
- #define FAN_RIS_C0STALLRIS 0x00000001 // Channel 0 Raw Stall Interrupt
- // Status
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_MIS register.
- //
- //*****************************************************************************
- #define FAN_MIS_C5INT1MIS 0x00400000 // Channel 5 Masked Interrupt 1
- // Status
- #define FAN_MIS_C5INT0MIS 0x00200000 // Channel 5 Masked Interrupt 0
- // Status
- #define FAN_MIS_C5STALLMIS 0x00100000 // Channel 5 Masked Stall Interrupt
- // Status
- #define FAN_MIS_C54NT1MIS 0x00040000 // Channel 4 Masked Interrupt 1
- // Status
- #define FAN_MIS_C4INT0MIS 0x00020000 // Channel 4 Masked Interrupt 0
- // Status
- #define FAN_MIS_C4STALLMIS 0x00010000 // Channel 4 Masked Stall Interrupt
- // Status
- #define FAN_MIS_C3INT1MIS 0x00004000 // Channel 3 Masked Interrupt 1
- // Status
- #define FAN_MIS_C3INT0MIS 0x00002000 // Channel 3 Masked Interrupt 0
- // Status
- #define FAN_MIS_C3STALLMIS 0x00001000 // Channel 3 Masked Stall Interrupt
- // Status
- #define FAN_MIS_C2INT1MIS 0x00000400 // Channel 2 Masked Interrupt 1
- // Status
- #define FAN_MIS_C2INT0MIS 0x00000200 // Channel 2 Masked Interrupt 0
- // Status
- #define FAN_MIS_C2STALLMIS 0x00000100 // Channel 2 Masked Stall Interrupt
- // Status
- #define FAN_MIS_C1INT1MIS 0x00000040 // Channel 1 Masked Interrupt 1
- // Status
- #define FAN_MIS_C1INT0MIS 0x00000020 // Channel 1 Masked Interrupt 0
- // Status
- #define FAN_MIS_C1STALLMIS 0x00000010 // Channel 1 Masked Stall Interrupt
- // Status
- #define FAN_MIS_C0INT1MIS 0x00000004 // Channel 0 Masked Interrupt 1
- // Status
- #define FAN_MIS_C0INT0MIS 0x00000002 // Channel 0 Masked Interrupt 0
- // Status
- #define FAN_MIS_C0STALLMIS 0x00000001 // Channel 0 Masked Stall Interrupt
- // Status
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_IC register.
- //
- //*****************************************************************************
- #define FAN_IC_C5INT1IC 0x00400000 // Channel 5 Interrupt 1 Clear
- #define FAN_IC_C5INT0IC 0x00200000 // Channel 5 Interrupt 0 Clear
- #define FAN_IC_C5STALLIC 0x00100000 // Channel 5 Stall Interrupt Clear
- #define FAN_IC_C4INT1IC 0x00040000 // Channel 4 Interrupt 1 Clear
- #define FAN_IC_C4INT0IC 0x00020000 // Channel 4 Interrupt 0 Clear
- #define FAN_IC_C4STALLIC 0x00010000 // Channel 4 Stall Interrupt Clear
- #define FAN_IC_C3INT1IC 0x00004000 // Channel 3 Interrupt 1 Clear
- #define FAN_IC_C53INT0IC 0x00002000 // Channel 3 Interrupt 0 Clear
- #define FAN_IC_C3STALLIC 0x00001000 // Channel 3 Stall Interrupt Clear
- #define FAN_IC_C2INT1IC 0x00000400 // Channel 2 Interrupt 1 Clear
- #define FAN_IC_C2INT0IC 0x00000200 // Channel 2 Interrupt 0 Clear
- #define FAN_IC_C2STALLIC 0x00000100 // Channel 2 Stall Interrupt Clear
- #define FAN_IC_C1INT1IC 0x00000040 // Channel 1 Interrupt 1 Clear
- #define FAN_IC_C1INT0IC 0x00000020 // Channel 1 Interrupt 0 Clear
- #define FAN_IC_C1STALLIC 0x00000010 // Channel 1 Stall Interrupt Clear
- #define FAN_IC_C0INT1IC 0x00000004 // Channel 0 Interrupt 1 Clear
- #define FAN_IC_C0INT0IC 0x00000002 // Channel 0 Interrupt 0 Clear
- #define FAN_IC_C0STALLIC 0x00000001 // Channel 0 Stall Interrupt Clear
- //*****************************************************************************
- //
- // The following are defines for the bit fields in the FAN_O_PP register.
- //
- //*****************************************************************************
- #define FAN_PP_CHAN_M 0x0000000F // Channel Count
- #define FAN_PP_CHAN_S 0
- #endif // __HW_FAN_H__
|