|
|
|
@ -549,18 +549,21 @@
|
|
|
|
|
//#define FAN_MAX_PWM 128
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* FAST PWM FAN Settings
|
|
|
|
|
* Fan Fast PWM
|
|
|
|
|
*
|
|
|
|
|
* Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
|
|
|
|
|
* Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
|
|
|
|
|
* frequency as close as possible to the desired frequency.
|
|
|
|
|
* Combinations of PWM Modes, prescale values and TOP resolutions are used internally
|
|
|
|
|
* to produce a frequency as close as possible to the desired frequency.
|
|
|
|
|
*
|
|
|
|
|
* FAST_PWM_FAN_FREQUENCY [undefined by default]
|
|
|
|
|
* FAST_PWM_FAN_FREQUENCY
|
|
|
|
|
* Set this to your desired frequency.
|
|
|
|
|
* If left undefined this defaults to F = F_CPU/(2*255*1)
|
|
|
|
|
* i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers.
|
|
|
|
|
* These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
|
|
|
|
|
* For AVR, if left undefined this defaults to F = F_CPU/(2*255*1)
|
|
|
|
|
* i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers.
|
|
|
|
|
* For non AVR, if left undefined this defaults to F = 1Khz.
|
|
|
|
|
* This F value is only to protect the hardware from an absence of configuration
|
|
|
|
|
* and not to complete it when users are not aware that the frequency must be specifically set to support the target board.
|
|
|
|
|
*
|
|
|
|
|
* NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behavior.
|
|
|
|
|
* Setting very high frequencies can damage your hardware.
|
|
|
|
|
*
|
|
|
|
|
* USE_OCR2A_AS_TOP [undefined by default]
|
|
|
|
|
* Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
|
|
|
|
@ -570,9 +573,17 @@
|
|
|
|
|
* PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
|
|
|
|
|
* USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
|
|
|
|
|
*/
|
|
|
|
|
//#define FAST_PWM_FAN // Increase the fan PWM frequency. Removes the PWM noise but increases heating in the FET/Arduino
|
|
|
|
|
#if ENABLED(FAST_PWM_FAN)
|
|
|
|
|
//#define FAST_PWM_FAN_FREQUENCY 31400
|
|
|
|
|
//#define FAST_PWM_FAN_FREQUENCY 31400 // Define here to override the defaults below
|
|
|
|
|
//#define USE_OCR2A_AS_TOP
|
|
|
|
|
#ifndef FAST_PWM_FAN_FREQUENCY
|
|
|
|
|
#ifdef __AVR__
|
|
|
|
|
#define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1))
|
|
|
|
|
#else
|
|
|
|
|
#define FAST_PWM_FAN_FREQUENCY 1000U
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|