Преглед изворни кода

Allows user to set (almost) any PWM frequency (#12638)

Reece Kibble пре 5 година
родитељ
комит
dbead66988
80 измењених фајлова са 2314 додато и 28 уклоњено
  1. 27
    0
      Marlin/Configuration_adv.h
  2. 7
    0
      Marlin/src/HAL/HAL_AVR/SanityCheck.h
  3. 37
    0
      Marlin/src/HAL/HAL_AVR/fastio_AVR.h
  4. 7
    0
      Marlin/src/inc/Conditionals_post.h
  5. 12
    0
      Marlin/src/module/planner.cpp
  6. 217
    27
      Marlin/src/module/temperature.cpp
  7. 36
    1
      Marlin/src/module/temperature.h
  8. 27
    0
      config/default/Configuration_adv.h
  9. 27
    0
      config/examples/3DFabXYZ/Migbot/Configuration_adv.h
  10. 27
    0
      config/examples/AlephObjects/TAZ4/Configuration_adv.h
  11. 27
    0
      config/examples/AliExpress/UM2pExt/Configuration_adv.h
  12. 27
    0
      config/examples/Anet/A2/Configuration_adv.h
  13. 27
    0
      config/examples/Anet/A2plus/Configuration_adv.h
  14. 27
    0
      config/examples/Anet/A6/Configuration_adv.h
  15. 27
    0
      config/examples/Anet/A8/Configuration_adv.h
  16. 27
    0
      config/examples/AnyCubic/i3/Configuration_adv.h
  17. 27
    0
      config/examples/ArmEd/Configuration_adv.h
  18. 27
    0
      config/examples/BIBO/TouchX/cyclops/Configuration_adv.h
  19. 27
    0
      config/examples/BIBO/TouchX/default/Configuration_adv.h
  20. 27
    0
      config/examples/BQ/Hephestos/Configuration_adv.h
  21. 27
    0
      config/examples/BQ/Hephestos_2/Configuration_adv.h
  22. 27
    0
      config/examples/BQ/WITBOX/Configuration_adv.h
  23. 27
    0
      config/examples/Cartesio/Configuration_adv.h
  24. 27
    0
      config/examples/Creality/CR-10/Configuration_adv.h
  25. 27
    0
      config/examples/Creality/CR-10S/Configuration_adv.h
  26. 27
    0
      config/examples/Creality/CR-10_5S/Configuration_adv.h
  27. 27
    0
      config/examples/Creality/CR-10mini/Configuration_adv.h
  28. 27
    0
      config/examples/Creality/CR-8/Configuration_adv.h
  29. 27
    0
      config/examples/Creality/Ender-2/Configuration_adv.h
  30. 27
    0
      config/examples/Creality/Ender-3/Configuration_adv.h
  31. 27
    0
      config/examples/Creality/Ender-4/Configuration_adv.h
  32. 27
    0
      config/examples/Einstart-S/Configuration_adv.h
  33. 27
    0
      config/examples/Felix/Configuration_adv.h
  34. 27
    0
      config/examples/FlashForge/CreatorPro/Configuration_adv.h
  35. 27
    0
      config/examples/FolgerTech/i3-2020/Configuration_adv.h
  36. 27
    0
      config/examples/Formbot/Raptor/Configuration_adv.h
  37. 27
    0
      config/examples/Formbot/T_Rex_2+/Configuration_adv.h
  38. 27
    0
      config/examples/Formbot/T_Rex_3/Configuration_adv.h
  39. 27
    0
      config/examples/Geeetech/A10M/Configuration_adv.h
  40. 27
    0
      config/examples/Geeetech/A20M/Configuration_adv.h
  41. 27
    0
      config/examples/Geeetech/MeCreator2/Configuration_adv.h
  42. 27
    0
      config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h
  43. 27
    0
      config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h
  44. 27
    0
      config/examples/Infitary/i3-M508/Configuration_adv.h
  45. 27
    0
      config/examples/JGAurora/A5/Configuration_adv.h
  46. 27
    0
      config/examples/MakerParts/Configuration_adv.h
  47. 27
    0
      config/examples/Malyan/M150/Configuration_adv.h
  48. 27
    0
      config/examples/Malyan/M200/Configuration_adv.h
  49. 27
    0
      config/examples/Micromake/C1/enhanced/Configuration_adv.h
  50. 27
    0
      config/examples/Mks/Robin/Configuration_adv.h
  51. 27
    0
      config/examples/Mks/Sbase/Configuration_adv.h
  52. 27
    0
      config/examples/RapideLite/RL200/Configuration_adv.h
  53. 27
    0
      config/examples/RigidBot/Configuration_adv.h
  54. 27
    0
      config/examples/SCARA/Configuration_adv.h
  55. 27
    0
      config/examples/Sanguinololu/Configuration_adv.h
  56. 27
    0
      config/examples/TheBorg/Configuration_adv.h
  57. 27
    0
      config/examples/TinyBoy2/Configuration_adv.h
  58. 27
    0
      config/examples/Tronxy/X3A/Configuration_adv.h
  59. 27
    0
      config/examples/Tronxy/X5S-2E/Configuration_adv.h
  60. 27
    0
      config/examples/UltiMachine/Archim1/Configuration_adv.h
  61. 27
    0
      config/examples/UltiMachine/Archim2/Configuration_adv.h
  62. 27
    0
      config/examples/VORONDesign/Configuration_adv.h
  63. 27
    0
      config/examples/Velleman/K8200/Configuration_adv.h
  64. 27
    0
      config/examples/Velleman/K8400/Configuration_adv.h
  65. 27
    0
      config/examples/WASP/PowerWASP/Configuration_adv.h
  66. 27
    0
      config/examples/Wanhao/Duplicator 6/Configuration_adv.h
  67. 27
    0
      config/examples/delta/Anycubic/Kossel/Configuration_adv.h
  68. 27
    0
      config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h
  69. 27
    0
      config/examples/delta/FLSUN/kossel/Configuration_adv.h
  70. 27
    0
      config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h
  71. 27
    0
      config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h
  72. 27
    0
      config/examples/delta/MKS/SBASE/Configuration_adv.h
  73. 27
    0
      config/examples/delta/Tevo Little Monster/Configuration_adv.h
  74. 27
    0
      config/examples/delta/generic/Configuration_adv.h
  75. 27
    0
      config/examples/delta/kossel_mini/Configuration_adv.h
  76. 27
    0
      config/examples/delta/kossel_xl/Configuration_adv.h
  77. 27
    0
      config/examples/gCreate/gMax1.5+/Configuration_adv.h
  78. 27
    0
      config/examples/makibox/Configuration_adv.h
  79. 27
    0
      config/examples/tvrrug/Round2/Configuration_adv.h
  80. 27
    0
      config/examples/wt150/Configuration_adv.h

+ 27
- 0
Marlin/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 7
- 0
Marlin/src/HAL/HAL_AVR/SanityCheck.h Прегледај датотеку

@@ -36,6 +36,13 @@
36 36
 #endif
37 37
 
38 38
 /**
39
+ * Checks for FAST PWM
40
+ */
41
+#if ENABLED(FAST_PWM_FAN) && (ENABLED(USE_OCR2A_AS_TOP) && defined(TCCR2))
42
+    #error "USE_OCR2A_AS_TOP does not apply to devices with a single output TIMER2"
43
+#endif
44
+
45
+/**
39 46
  * Sanity checks for Spindle / Laser
40 47
  */
41 48
 #if ENABLED(SPINDLE_LASER_ENABLE)

+ 37
- 0
Marlin/src/HAL/HAL_AVR/fastio_AVR.h Прегледај датотеку

@@ -132,6 +132,18 @@ enum WaveGenMode : char {
132 132
   WGM_FAST_PWM_OCRnA   // 15  COM OCnA
133 133
 };
134 134
 
135
+// Wavefore Generation Modes (Timer 2 only)
136
+enum WaveGenMode2 : char {
137
+  WGM2_NORMAL,          // 0
138
+  WGM2_PWM_PC,          // 1
139
+  WGM2_CTC_OCR2A,       // 2
140
+  WGM2_FAST_PWM,        // 3
141
+  WGM2_reserved_1,      // 4
142
+  WGM2_PWM_PC_OCR2A,    // 5
143
+  WGM2_reserved_2,      // 6
144
+  WGM2_FAST_PWM_OCR2A,  // 7
145
+};
146
+
135 147
 // Compare Modes
136 148
 enum CompareMode : char {
137 149
   COM_NORMAL,          //  0
@@ -186,6 +198,11 @@ enum ClockSource2 : char {
186 198
     TCCR##T##B = (TCCR##T##B & ~(0x3 << WGM##T##2)) | (((int(V) >> 2) & 0x3) << WGM##T##2); \
187 199
   }while(0)
188 200
 #define SET_WGM(T,V) _SET_WGM(T,WGM_##V)
201
+// Runtime (see Temperature::set_pwm_frequency):
202
+#define _SET_WGMnQ(TCCRnQ, V) do{ \
203
+    *(TCCRnQ)[0] = (*(TCCRnQ)[0] & ~(0x3 << 0)) | (( int(V)       & 0x3) << 0); \
204
+    *(TCCRnQ)[1] = (*(TCCRnQ)[1] & ~(0x3 << 3)) | (((int(V) >> 2) & 0x3) << 3); \
205
+  }while(0)
189 206
 
190 207
 // Set Clock Select bits
191 208
 // Ex: SET_CS3(PRESCALER_64);
@@ -211,6 +228,10 @@ enum ClockSource2 : char {
211 228
 #define SET_CS4(V) _SET_CS4(CS_##V)
212 229
 #define SET_CS5(V) _SET_CS5(CS_##V)
213 230
 #define SET_CS(T,V) SET_CS##T(V)
231
+// Runtime (see Temperature::set_pwm_frequency)
232
+#define _SET_CSn(TCCRnQ, V) do{ \
233
+    (*(TCCRnQ)[1] = (*(TCCRnQ[1]) & ~(0x7 << 0)) | ((int(V) & 0x7) << 0)); \
234
+  }while(0)
214 235
 
215 236
 // Set Compare Mode bits
216 237
 // Ex: SET_COMS(4,CLEAR_SET,CLEAR_SET,CLEAR_SET);
@@ -220,6 +241,22 @@ enum ClockSource2 : char {
220 241
 #define SET_COMB(T,V) SET_COM(T,B,V)
221 242
 #define SET_COMC(T,V) SET_COM(T,C,V)
222 243
 #define SET_COMS(T,V1,V2,V3) do{ SET_COMA(T,V1); SET_COMB(T,V2); SET_COMC(T,V3); }while(0)
244
+// Runtime (see Temperature::set_pwm_duty)
245
+#define _SET_COMnQ(TCCRnQ, Q, V) do{ \
246
+    (*(TCCRnQ)[0] = (*(TCCRnQ)[0] & ~(0x3 << (6-2*(Q)))) | (int(V) << (6-2*(Q)))); \
247
+  }while(0)
248
+
249
+// Set OCRnQ register
250
+// Runtime (see Temperature::set_pwm_duty):
251
+#define _SET_OCRnQ(OCRnQ, Q, V) do{ \
252
+    (*(OCRnQ)[(Q)] = (0x0000) | (int(V) & 0xFFFF)); \
253
+  }while(0)
254
+
255
+// Set ICRn register (one per timer)
256
+// Runtime (see Temperature::set_pwm_frequency)
257
+#define _SET_ICRn(ICRn, V) do{ \
258
+    (*(ICRn) = (0x0000) | (int(V) & 0xFFFF)); \
259
+  }while(0)
223 260
 
224 261
 // Set Noise Canceler bit
225 262
 // Ex: SET_ICNC(2,1)

+ 7
- 0
Marlin/src/inc/Conditionals_post.h Прегледај датотеку

@@ -1214,6 +1214,13 @@
1214 1214
 #endif
1215 1215
 
1216 1216
 /**
1217
+ * FAST PWM FAN Settings
1218
+ */
1219
+#if ENABLED(FAST_PWM_FAN) && !defined(FAST_PWM_FAN_FREQUENCY)
1220
+  #define FAST_PWM_FAN_FREQUENCY ((F_CPU) / (2 * 255 * 1)) // Fan frequency default
1221
+#endif
1222
+
1223
+/**
1217 1224
  * Bed Probe dependencies
1218 1225
  */
1219 1226
 #if HAS_BED_PROBE

+ 12
- 0
Marlin/src/module/planner.cpp Прегледај датотеку

@@ -1273,6 +1273,18 @@ void Planner::check_axes_activity() {
1273 1273
       #if HAS_FAN2
1274 1274
         thermalManager.soft_pwm_amount_fan[2] = CALC_FAN_SPEED(2);
1275 1275
       #endif
1276
+
1277
+    #elif ENABLED(FAST_PWM_FAN)
1278
+      #if HAS_FAN0
1279
+        thermalManager.set_pwm_duty(FAN_PIN, CALC_FAN_SPEED(0));
1280
+      #endif
1281
+      #if HAS_FAN1
1282
+        thermalManager.set_pwm_duty(FAN1_PIN, CALC_FAN_SPEED(1));
1283
+      #endif
1284
+      #if HAS_FAN2
1285
+        thermalManager.set_pwm_duty(FAN2_PIN, CALC_FAN_SPEED(2));
1286
+      #endif
1287
+
1276 1288
     #else
1277 1289
       #if HAS_FAN0
1278 1290
         analogWrite(FAN_PIN, CALC_FAN_SPEED(0));

+ 217
- 27
Marlin/src/module/temperature.cpp Прегледај датотеку

@@ -1332,28 +1332,28 @@ void Temperature::init() {
1332 1332
   #if HAS_FAN0
1333 1333
     SET_OUTPUT(FAN_PIN);
1334 1334
     #if ENABLED(FAST_PWM_FAN)
1335
-      setPwmFrequency(FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1335
+      set_pwm_frequency(FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1336 1336
     #endif
1337 1337
   #endif
1338 1338
 
1339 1339
   #if HAS_FAN1
1340 1340
     SET_OUTPUT(FAN1_PIN);
1341 1341
     #if ENABLED(FAST_PWM_FAN)
1342
-      setPwmFrequency(FAN1_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1342
+      set_pwm_frequency(FAN1_PIN, FAST_PWM_FAN_FREQUENCY);
1343 1343
     #endif
1344 1344
   #endif
1345 1345
 
1346 1346
   #if HAS_FAN2
1347 1347
     SET_OUTPUT(FAN2_PIN);
1348 1348
     #if ENABLED(FAST_PWM_FAN)
1349
-      setPwmFrequency(FAN2_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1349
+      set_pwm_frequency(FAN2_PIN, FAST_PWM_FAN_FREQUENCY);
1350 1350
     #endif
1351 1351
   #endif
1352 1352
 
1353 1353
   #if ENABLED(USE_CONTROLLER_FAN)
1354 1354
     SET_OUTPUT(CONTROLLER_FAN_PIN);
1355 1355
     #if ENABLED(FAST_PWM_FAN)
1356
-      setPwmFrequency(CONTROLLER_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1356
+      set_pwm_frequency(CONTROLLER_FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1357 1357
     #endif
1358 1358
   #endif
1359 1359
 
@@ -1411,7 +1411,7 @@ void Temperature::init() {
1411 1411
     #if E0_AUTO_FAN_PIN == FAN1_PIN
1412 1412
       SET_OUTPUT(E0_AUTO_FAN_PIN);
1413 1413
       #if ENABLED(FAST_PWM_FAN)
1414
-        setPwmFrequency(E0_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1414
+        set_pwm_frequency(E0_AUTO_FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1415 1415
       #endif
1416 1416
     #else
1417 1417
       SET_OUTPUT(E0_AUTO_FAN_PIN);
@@ -1421,7 +1421,7 @@ void Temperature::init() {
1421 1421
     #if E1_AUTO_FAN_PIN == FAN1_PIN
1422 1422
       SET_OUTPUT(E1_AUTO_FAN_PIN);
1423 1423
       #if ENABLED(FAST_PWM_FAN)
1424
-        setPwmFrequency(E1_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1424
+        set_pwm_frequency(E1_AUTO_FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1425 1425
       #endif
1426 1426
     #else
1427 1427
       SET_OUTPUT(E1_AUTO_FAN_PIN);
@@ -1431,7 +1431,7 @@ void Temperature::init() {
1431 1431
     #if E2_AUTO_FAN_PIN == FAN1_PIN
1432 1432
       SET_OUTPUT(E2_AUTO_FAN_PIN);
1433 1433
       #if ENABLED(FAST_PWM_FAN)
1434
-        setPwmFrequency(E2_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1434
+        set_pwm_frequency(E2_AUTO_FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1435 1435
       #endif
1436 1436
     #else
1437 1437
       SET_OUTPUT(E2_AUTO_FAN_PIN);
@@ -1441,7 +1441,7 @@ void Temperature::init() {
1441 1441
     #if E3_AUTO_FAN_PIN == FAN1_PIN
1442 1442
       SET_OUTPUT(E3_AUTO_FAN_PIN);
1443 1443
       #if ENABLED(FAST_PWM_FAN)
1444
-        setPwmFrequency(E3_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1444
+        set_pwm_frequency(E3_AUTO_FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1445 1445
       #endif
1446 1446
     #else
1447 1447
       SET_OUTPUT(E3_AUTO_FAN_PIN);
@@ -1451,7 +1451,7 @@ void Temperature::init() {
1451 1451
     #if E4_AUTO_FAN_PIN == FAN1_PIN
1452 1452
       SET_OUTPUT(E4_AUTO_FAN_PIN);
1453 1453
       #if ENABLED(FAST_PWM_FAN)
1454
-        setPwmFrequency(E4_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1454
+        set_pwm_frequency(E4_AUTO_FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1455 1455
       #endif
1456 1456
     #else
1457 1457
       SET_OUTPUT(E4_AUTO_FAN_PIN);
@@ -1461,7 +1461,7 @@ void Temperature::init() {
1461 1461
     #if E5_AUTO_FAN_PIN == FAN1_PIN
1462 1462
       SET_OUTPUT(E5_AUTO_FAN_PIN);
1463 1463
       #if ENABLED(FAST_PWM_FAN)
1464
-        setPwmFrequency(E5_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1464
+        set_pwm_frequency(E5_AUTO_FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1465 1465
       #endif
1466 1466
     #else
1467 1467
       SET_OUTPUT(E5_AUTO_FAN_PIN);
@@ -1471,7 +1471,7 @@ void Temperature::init() {
1471 1471
     #if CHAMBER_AUTO_FAN_PIN == FAN1_PIN
1472 1472
       SET_OUTPUT(CHAMBER_AUTO_FAN_PIN);
1473 1473
       #if ENABLED(FAST_PWM_FAN)
1474
-        setPwmFrequency(CHAMBER_AUTO_FAN_PIN, 1); // No prescaling. Pwm frequency = F_CPU/256/8
1474
+        set_pwm_frequency(CHAMBER_AUTO_FAN_PIN, FAST_PWM_FAN_FREQUENCY);
1475 1475
       #endif
1476 1476
     #else
1477 1477
       SET_OUTPUT(CHAMBER_AUTO_FAN_PIN);
@@ -1566,43 +1566,233 @@ void Temperature::init() {
1566 1566
   #endif
1567 1567
 }
1568 1568
 
1569
-#if ENABLED(FAST_PWM_FAN)
1570 1569
 
1571
-  void Temperature::setPwmFrequency(const pin_t pin, int val) {
1570
+#if ENABLED(FAST_PWM_FAN)
1571
+  Temperature::Timer Temperature::get_pwm_timer(pin_t pin) {
1572 1572
     #if defined(ARDUINO) && !defined(ARDUINO_ARCH_SAM)
1573
-      val &= 0x07;
1573
+      uint8_t q = 0;
1574 1574
       switch (digitalPinToTimer(pin)) {
1575
+        // Protect reserved timers (TIMER0 & TIMER1)
1575 1576
         #ifdef TCCR0A
1576 1577
           #if !AVR_AT90USB1286_FAMILY
1577 1578
             case TIMER0A:
1578 1579
           #endif
1579
-          case TIMER0B:                           //_SET_CS(0, val);
1580
-                                                    break;
1580
+          case TIMER0B:
1581 1581
         #endif
1582 1582
         #ifdef TCCR1A
1583
-          case TIMER1A: case TIMER1B:             //_SET_CS(1, val);
1584
-                                                    break;
1583
+          case TIMER1A: case TIMER1B:
1585 1584
         #endif
1585
+                                            break;
1586 1586
         #if defined(TCCR2) || defined(TCCR2A)
1587 1587
           #ifdef TCCR2
1588
-            case TIMER2:
1589
-          #endif
1590
-          #ifdef TCCR2A
1591
-            case TIMER2A: case TIMER2B:
1588
+            case TIMER2: {
1589
+              Temperature::Timer timer = {
1590
+                /*TCCRnQ*/  { &TCCR2, NULL, NULL},
1591
+                /*OCRnQ*/   { (uint16_t*)&OCR2, NULL, NULL},
1592
+                /*ICRn*/      NULL,
1593
+                /*n, q*/      2, 0
1594
+              };
1595
+            }
1596
+          #elif defined TCCR2A
1597
+            #if ENABLED(USE_OCR2A_AS_TOP)
1598
+              case TIMER2A:   break; // protect TIMER2A
1599
+              case TIMER2B: {
1600
+                Temperature::Timer timer = {
1601
+                  /*TCCRnQ*/  { &TCCR2A,  &TCCR2B,  NULL},
1602
+                  /*OCRnQ*/   { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, NULL},
1603
+                  /*ICRn*/      NULL,
1604
+                  /*n, q*/      2, 1
1605
+                };
1606
+                return timer;
1607
+              }
1608
+            #else
1609
+              case TIMER2B:   q += 1;
1610
+              case TIMER2A: {
1611
+                Temperature::Timer timer = {
1612
+                  /*TCCRnQ*/  { &TCCR2A,  &TCCR2B,  NULL},
1613
+                  /*OCRnQ*/   { (uint16_t*)&OCR2A, (uint16_t*)&OCR2B, NULL},
1614
+                  /*ICRn*/      NULL,
1615
+                                2, q
1616
+                };
1617
+                return timer;
1618
+              }
1619
+            #endif
1592 1620
           #endif
1593
-                                                    _SET_CS(2, val); break;
1594 1621
         #endif
1595 1622
         #ifdef TCCR3A
1596
-          case TIMER3A: case TIMER3B: case TIMER3C: _SET_CS(3, val); break;
1623
+          case TIMER3C:   q += 1;
1624
+          case TIMER3B:   q += 1;
1625
+          case TIMER3A: {
1626
+            Temperature::Timer timer = {
1627
+              /*TCCRnQ*/  { &TCCR3A,  &TCCR3B,  &TCCR3C},
1628
+              /*OCRnQ*/   { &OCR3A,   &OCR3B,   &OCR3C},
1629
+              /*ICRn*/      &ICR3,
1630
+              /*n, q*/      3, q
1631
+            };
1632
+            return timer;
1633
+          }
1597 1634
         #endif
1598 1635
         #ifdef TCCR4A
1599
-          case TIMER4A: case TIMER4B: case TIMER4C: _SET_CS(4, val); break;
1636
+          case TIMER4C:   q += 1;
1637
+          case TIMER4B:   q += 1;
1638
+          case TIMER4A: {
1639
+            Temperature::Timer timer = {
1640
+              /*TCCRnQ*/  { &TCCR4A,  &TCCR4B,  &TCCR4C},
1641
+              /*OCRnQ*/   { &OCR4A,   &OCR4B,   &OCR4C},
1642
+              /*ICRn*/      &ICR4,
1643
+              /*n, q*/      4, q
1644
+            };
1645
+            return timer;
1646
+          }
1600 1647
         #endif
1601 1648
         #ifdef TCCR5A
1602
-          case TIMER5A: case TIMER5B: case TIMER5C: _SET_CS(5, val); break;
1649
+          case TIMER5C:   q += 1;
1650
+          case TIMER5B:   q += 1;
1651
+          case TIMER5A: {
1652
+            Temperature::Timer timer = {
1653
+              /*TCCRnQ*/  { &TCCR5A,  &TCCR5B,  &TCCR5C},
1654
+              /*OCRnQ*/   { &OCR5A,   &OCR5B,   &OCR5C },
1655
+              /*ICRn*/      &ICR5,
1656
+              /*n, q*/      5, q
1657
+            };
1658
+            return timer;
1659
+          }
1603 1660
         #endif
1604 1661
       }
1605
-    #endif
1662
+      Temperature::Timer timer = {
1663
+          /*TCCRnQ*/  { NULL, NULL, NULL},
1664
+          /*OCRnQ*/   { NULL, NULL, NULL},
1665
+          /*ICRn*/      NULL,
1666
+                        0, 0
1667
+      };
1668
+      return timer;
1669
+    #endif // ARDUINO && !ARDUINO_ARCH_SAM
1670
+  }
1671
+
1672
+  void Temperature::set_pwm_frequency(const pin_t pin, int f_desired) {
1673
+    #if defined(ARDUINO) && !defined(ARDUINO_ARCH_SAM)
1674
+      Temperature::Timer timer = get_pwm_timer(pin);
1675
+      if (timer.n == 0) return; // Don't proceed if protected timer or not recognised
1676
+      uint16_t size;
1677
+      if (timer.n == 2) size = 255; else size = 65535;
1678
+
1679
+      uint16_t res = 255;   // resolution (TOP value)
1680
+      uint8_t j = 0;        // prescaler index
1681
+      uint8_t wgm = 1;      // waveform generation mode
1682
+
1683
+      // Calculating the prescaler and resolution to use to achieve closest frequency
1684
+      if (f_desired != 0) {
1685
+        int f = F_CPU/(2*1024*size) + 1; // Initialize frequency as lowest (non-zero) achievable
1686
+        uint16_t prescaler[] = {0, 1, 8, /*TIMER2 ONLY*/32, 64, /*TIMER2 ONLY*/128, 256, 1024};
1687
+
1688
+        // loop over prescaler values
1689
+        for (uint8_t i = 1; i < 8; i++) {
1690
+          uint16_t res_temp_fast = 255, res_temp_phase_correct = 255;
1691
+          if (timer.n == 2) {
1692
+            // No resolution calculation for TIMER2 unless enabled USE_OCR2A_AS_TOP
1693
+            #if ENABLED(USE_OCR2A_AS_TOP)
1694
+              res_temp_fast = (F_CPU / (prescaler[i] * f_desired)) - 1;
1695
+              res_temp_phase_correct = F_CPU / (2 * prescaler[i] * f_desired);
1696
+            #endif
1697
+          }
1698
+          else {
1699
+            // Skip TIMER2 specific prescalers when not TIMER2
1700
+            if (i == 3 || i == 5) continue;
1701
+            res_temp_fast = (F_CPU / (prescaler[i] * f_desired)) - 1;
1702
+            res_temp_phase_correct = F_CPU / (2 * prescaler[i] * f_desired);
1703
+          }
1704
+
1705
+          LIMIT(res_temp_fast, 1u, size);
1706
+          LIMIT(res_temp_phase_correct, 1u, size);
1707
+          // Calculate frequncies of test prescaler and resolution values
1708
+          int f_temp_fast = F_CPU / (prescaler[i] * (1 + res_temp_fast));
1709
+          int f_temp_phase_correct = F_CPU / (2 * prescaler[i] * res_temp_phase_correct);
1710
+
1711
+          // If FAST values are closest to desired f
1712
+          if (ABS(f_temp_fast - f_desired) < ABS(f - f_desired)
1713
+              && ABS(f_temp_fast - f_desired) <= ABS(f_temp_phase_correct - f_desired)) {
1714
+            // Remember this combination
1715
+            f = f_temp_fast;
1716
+            res = res_temp_fast;
1717
+            j = i;
1718
+            // Set the Wave Generation Mode to FAST PWM
1719
+            if(timer.n == 2){
1720
+              wgm =
1721
+                #if ENABLED(USE_OCR2A_AS_TOP)
1722
+                  WGM2_FAST_PWM_OCR2A;
1723
+                #else
1724
+                  WGM2_FAST_PWM;
1725
+                #endif
1726
+            }
1727
+            else wgm = WGM_FAST_PWM_ICRn;
1728
+          }
1729
+          // If PHASE CORRECT values are closes to desired f
1730
+          else if (ABS(f_temp_phase_correct - f_desired) < ABS(f - f_desired)) {
1731
+            f = f_temp_phase_correct;
1732
+            res = res_temp_phase_correct;
1733
+            j = i;
1734
+            // Set the Wave Generation Mode to PWM PHASE CORRECT
1735
+            if (timer.n == 2) {
1736
+              wgm =
1737
+                #if ENABLED(USE_OCR2A_AS_TOP)
1738
+                  WGM2_PWM_PC_OCR2A;
1739
+                #else
1740
+                  WGM2_PWM_PC;
1741
+                #endif
1742
+            }
1743
+            else wgm = WGM_PWM_PC_ICRn;
1744
+          }
1745
+        }
1746
+      }
1747
+      _SET_WGMnQ(timer.TCCRnQ, wgm);
1748
+      _SET_CSn(timer.TCCRnQ, j);
1749
+
1750
+      if (timer.n == 2) {
1751
+        #if ENABLED(USE_OCR2A_AS_TOP)
1752
+          _SET_OCRnQ(timer.OCRnQ, 0, res);  // Set OCR2A value (TOP) = res
1753
+        #endif
1754
+      }
1755
+      else {
1756
+        _SET_ICRn(timer.ICRn, res);         // Set ICRn value (TOP) = res
1757
+      }
1758
+    #endif // ARDUINO && !ARDUINO_ARCH_SAM
1759
+  }
1760
+
1761
+  void Temperature::set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size/*=255*/, const bool invert/*=false*/) {
1762
+    #if defined(ARDUINO) && !defined(ARDUINO_ARCH_SAM)
1763
+      // If v is 0 or v_size (max), digitalWrite to LOW or HIGH.
1764
+      // Note that digitalWrite also disables pwm output for us (sets COM bit to 0)
1765
+      if (v == 0)
1766
+        digitalWrite(pin, invert);
1767
+      else if (v == v_size)
1768
+        digitalWrite(pin, !invert);
1769
+      else {
1770
+        Temperature::Timer timer = get_pwm_timer(pin);
1771
+        if (timer.n == 0) return; // Don't proceed if protected timer or not recognised
1772
+        // Set compare output mode to CLEAR -> SET or SET -> CLEAR (if inverted)
1773
+        _SET_COMnQ(timer.TCCRnQ, timer.q
1774
+            #ifdef TCCR2
1775
+              + (timer.q == 2) // COM20 is on bit 4 of TCCR2, thus requires q + 1 in the macro
1776
+            #endif
1777
+          , COM_CLEAR_SET + invert
1778
+        );
1779
+
1780
+        uint16_t top;
1781
+        if (timer.n == 2) { // if TIMER2
1782
+          top =
1783
+            #if ENABLED(USE_OCR2A_AS_TOP)
1784
+              *timer.OCRnQ[0] // top = OCR2A
1785
+            #else
1786
+              255 // top = 0xFF (max)
1787
+            #endif
1788
+          ;
1789
+        }
1790
+        else
1791
+          top = *timer.ICRn; // top = ICRn
1792
+
1793
+        _SET_OCRnQ(timer.OCRnQ, timer.q, v * float(top / v_size)); // Scale 8/16-bit v to top value
1794
+      }
1795
+    #endif // ARDUINO && !ARDUINO_ARCH_SAM
1606 1796
   }
1607 1797
 
1608 1798
 #endif // FAST_PWM_FAN

+ 36
- 1
Marlin/src/module/temperature.h Прегледај датотеку

@@ -266,6 +266,16 @@ class Temperature {
266 266
                      soft_pwm_count_fan[FAN_COUNT];
267 267
     #endif
268 268
 
269
+    /**
270
+     * set_pwm_duty (8-bit AVRs only)
271
+     *  Sets the PWM duty cycle of the provided pin to the provided value
272
+     *  Optionally allows inverting the duty cycle [default = false]
273
+     *  Optionally allows changing the maximum size of the provided value to enable finer PWM duty control [default = 255]
274
+     */
275
+    #if ENABLED(FAST_PWM_FAN)
276
+      static void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t v_size=255, const bool invert=false);
277
+    #endif
278
+
269 279
     #if ENABLED(BABYSTEPPING)
270 280
       static volatile int16_t babystepsTodo[3];
271 281
     #endif
@@ -735,8 +745,33 @@ class Temperature {
735 745
 
736 746
   private:
737 747
 
748
+    /**
749
+     * (8-bit AVRs only)
750
+     *
751
+     * get_pwm_timer
752
+     *  Grabs timer information and registers of the provided pin
753
+     *  returns Timer struct containing this information
754
+     *  Used by set_pwm_frequency, set_pwm_duty
755
+     *
756
+     * set_pwm_frequency
757
+     *  Sets the frequency of the timer corresponding to the provided pin
758
+     *  as close as possible to the provided desired frequency. Internally
759
+     *  calculates the required waveform generation mode, prescaler and
760
+     *  resolution values required and sets the timer registers accordingly.
761
+     *  NOTE that the frequency is applied to all pins on the timer (Ex OC3A, OC3B and OC3B)
762
+     *  NOTE that there are limitations, particularly if using TIMER2. (see Configuration_adv.h -> FAST FAN PWM Settings)
763
+     */
738 764
     #if ENABLED(FAST_PWM_FAN)
739
-      static void setPwmFrequency(const pin_t pin, int val);
765
+      typedef struct Timer {
766
+          volatile uint8_t* TCCRnQ[3];  // max 3 TCCR registers per timer
767
+          volatile uint16_t* OCRnQ[3];  // max 3 OCR registers per timer
768
+          volatile uint16_t* ICRn;      // max 1 ICR register per timer
769
+          uint8_t n;                    // the timer number [0->5]
770
+          uint8_t q;                    // the timer output [0->2] (A->C)
771
+      } Timer;
772
+
773
+      static Timer get_pwm_timer(const pin_t pin);
774
+      static void set_pwm_frequency(const pin_t pin, int f_desired);
740 775
     #endif
741 776
 
742 777
     static void set_current_temp_raw();

+ 27
- 0
config/default/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/3DFabXYZ/Migbot/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/AlephObjects/TAZ4/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/AliExpress/UM2pExt/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Anet/A2/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Anet/A2plus/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Anet/A6/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Anet/A8/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/AnyCubic/i3/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/ArmEd/Configuration_adv.h Прегледај датотеку

@@ -245,6 +245,33 @@
245 245
 //#define FAN_MIN_PWM 50
246 246
 //#define FAN_MAX_PWM 128
247 247
 
248
+/**
249
+ * FAST PWM FAN Settings
250
+ *
251
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
252
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
253
+ * frequency as close as possible to the desired frequency.
254
+ *
255
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
256
+ *   Set this to your desired frequency.
257
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
258
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
259
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
260
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
261
+ *
262
+ * USE_OCR2A_AS_TOP [undefined by default]
263
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
264
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
265
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
266
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
267
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
268
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
269
+ */
270
+#if ENABLED(FAST_PWM_FAN)
271
+  //#define FAST_PWM_FAN_FREQUENCY 31400
272
+  //#define USE_OCR2A_AS_TOP
273
+#endif
274
+
248 275
 // @section extruder
249 276
 
250 277
 /**

+ 27
- 0
config/examples/BIBO/TouchX/cyclops/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/BIBO/TouchX/default/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/BQ/Hephestos/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/BQ/Hephestos_2/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/BQ/WITBOX/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Cartesio/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Creality/CR-10/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Creality/CR-10S/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Creality/CR-10_5S/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Creality/CR-10mini/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Creality/CR-8/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Creality/Ender-2/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Creality/Ender-3/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Creality/Ender-4/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Einstart-S/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Felix/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/FlashForge/CreatorPro/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/FolgerTech/i3-2020/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Formbot/Raptor/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Formbot/T_Rex_2+/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 #define FAN_MIN_PWM 45
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Formbot/T_Rex_3/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 #define FAN_MIN_PWM 64
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Geeetech/A10M/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Geeetech/A20M/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Geeetech/MeCreator2/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Geeetech/Prusa i3 Pro C/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Geeetech/Prusa i3 Pro W/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Infitary/i3-M508/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/JGAurora/A5/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/MakerParts/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Malyan/M150/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Malyan/M200/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Micromake/C1/enhanced/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Mks/Robin/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Mks/Sbase/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/RapideLite/RL200/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/RigidBot/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/SCARA/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Sanguinololu/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/TheBorg/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/TinyBoy2/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Tronxy/X3A/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Tronxy/X5S-2E/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/UltiMachine/Archim1/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/UltiMachine/Archim2/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/VORONDesign/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Velleman/K8200/Configuration_adv.h Прегледај датотеку

@@ -254,6 +254,33 @@
254 254
 //#define FAN_MIN_PWM 50
255 255
 //#define FAN_MAX_PWM 128
256 256
 
257
+/**
258
+ * FAST PWM FAN Settings
259
+ *
260
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
261
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
262
+ * frequency as close as possible to the desired frequency.
263
+ *
264
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
265
+ *   Set this to your desired frequency.
266
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
267
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
268
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
269
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
270
+ *
271
+ * USE_OCR2A_AS_TOP [undefined by default]
272
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
273
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
274
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
275
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
276
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
277
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
278
+ */
279
+#if ENABLED(FAST_PWM_FAN)
280
+  //#define FAST_PWM_FAN_FREQUENCY 31400
281
+  //#define USE_OCR2A_AS_TOP
282
+#endif
283
+
257 284
 // @section extruder
258 285
 
259 286
 /**

+ 27
- 0
config/examples/Velleman/K8400/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/WASP/PowerWASP/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/Wanhao/Duplicator 6/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/Anycubic/Kossel/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/FLSUN/auto_calibrate/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/FLSUN/kossel/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/FLSUN/kossel_mini/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/Geeetech/Rostock 301/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/MKS/SBASE/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/Tevo Little Monster/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/generic/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/kossel_mini/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/delta/kossel_xl/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/gCreate/gMax1.5+/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/makibox/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/tvrrug/Round2/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

+ 27
- 0
config/examples/wt150/Configuration_adv.h Прегледај датотеку

@@ -241,6 +241,33 @@
241 241
 //#define FAN_MIN_PWM 50
242 242
 //#define FAN_MAX_PWM 128
243 243
 
244
+/**
245
+ * FAST PWM FAN Settings
246
+ *
247
+ * Use to change the FAST FAN PWM frequency (if enabled in Configuration.h)
248
+ * Combinations of PWM Modes, prescale values and TOP resolutions are used internally to produce a
249
+ * frequency as close as possible to the desired frequency.
250
+ *
251
+ * FAST_PWM_FAN_FREQUENCY [undefined by default]
252
+ *   Set this to your desired frequency.
253
+ *   If left undefined this defaults to F = F_CPU/(2*255*1)
254
+ *   ie F = 31.4 Khz on 16 MHz microcontrollers or F = 39.2 KHz on 20 MHz microcontrollers
255
+ *   These defaults are the same as with the old FAST_PWM_FAN implementation - no migration is required
256
+ *   NOTE: Setting very low frequencies (< 10 Hz) may result in unexpected timer behaviour.
257
+ *
258
+ * USE_OCR2A_AS_TOP [undefined by default]
259
+ *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
260
+ *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
261
+ *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
262
+ *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
263
+ *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
264
+ *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
265
+ */
266
+#if ENABLED(FAST_PWM_FAN)
267
+  //#define FAST_PWM_FAN_FREQUENCY 31400
268
+  //#define USE_OCR2A_AS_TOP
269
+#endif
270
+
244 271
 // @section extruder
245 272
 
246 273
 /**

Loading…
Откажи
Сачувај