Browse Source

📝 KHz => kHz (#23512)

Keith Bennett 3 years ago
parent
commit
3e2a38b653

+ 6 - 6
Marlin/Configuration_adv.h

@@ -561,7 +561,7 @@
  * FAST_PWM_FAN_FREQUENCY
  *   Set this to your desired frequency.
  *   For AVR, if left undefined this defaults to F = F_CPU/(2*255*1)
- *            i.e., F = 31.4KHz on 16MHz microcontrollers or F = 39.2KHz on 20MHz microcontrollers.
+ *            i.e., F = 31.4kHz on 16MHz microcontrollers or F = 39.2kHz on 20MHz microcontrollers.
  *   For non AVR, if left undefined this defaults to F = 1Khz.
  *   This F value is only to protect the hardware from an absence of configuration
  *   and not to complete it when users are not aware that the frequency must be specifically set to support the target board.
@@ -571,8 +571,8 @@
  *
  * USE_OCR2A_AS_TOP [undefined by default]
  *   Boards that use TIMER2 for PWM have limitations resulting in only a few possible frequencies on TIMER2:
- *   16MHz MCUs: [62.5KHz, 31.4KHz (default), 7.8KHz, 3.92KHz, 1.95KHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
- *   20MHz MCUs: [78.1KHz, 39.2KHz (default), 9.77KHz, 4.9KHz, 2.44KHz, 1.22KHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
+ *   16MHz MCUs: [62.5kHz, 31.4kHz (default), 7.8kHz, 3.92kHz, 1.95kHz, 977Hz, 488Hz, 244Hz, 60Hz, 122Hz, 30Hz]
+ *   20MHz MCUs: [78.1kHz, 39.2kHz (default), 9.77kHz, 4.9kHz, 2.44kHz, 1.22kHz, 610Hz, 305Hz, 153Hz, 76Hz, 38Hz]
  *   A greater range can be achieved by enabling USE_OCR2A_AS_TOP. But note that this option blocks the use of
  *   PWM on pin OC2A. Only use this option if you don't need PWM on 0C2A. (Check your schematic.)
  *   USE_OCR2A_AS_TOP sacrifices duty cycle control resolution to achieve this broader range of frequencies.
@@ -1179,7 +1179,7 @@
 
 /**
  * Adaptive Step Smoothing increases the resolution of multi-axis moves, particularly at step frequencies
- * below 1KHz (for AVR) or 10KHz (for ARM), where aliasing between axes in multi-axis moves causes audible
+ * below 1kHz (for AVR) or 10kHz (for ARM), where aliasing between axes in multi-axis moves causes audible
  * vibration and surface artifacts. The algorithm adapts to provide the best possible step smoothing at the
  * lowest stepping frequencies.
  */
@@ -3419,14 +3419,14 @@
 
   /**
    * PHOTO_PULSES_US may need adjustment depending on board and camera model.
-   * Pin must be running at 48.4KHz.
+   * Pin must be running at 48.4kHz.
    * Be sure to use a PHOTOGRAPH_PIN which can rise and fall quick enough.
    * (e.g., MKS SBase temp sensor pin was too slow, so used P1.23 on J8.)
    *
    *  Example pulse data for Nikon: https://bit.ly/2FKD0Aq
    *                     IR Wiring: https://git.io/JvJf7
    */
-  //#define PHOTO_PULSES_US { 2000, 27850, 400, 1580, 400, 3580, 400 }  // (µs) Durations for each 48.4KHz oscillation
+  //#define PHOTO_PULSES_US { 2000, 27850, 400, 1580, 400, 3580, 400 }  // (µs) Durations for each 48.4kHz oscillation
   #ifdef PHOTO_PULSES_US
     #define PHOTO_PULSE_DELAY_US 13 // (µs) Approximate duration of each HIGH and LOW pulse in the oscillation
   #endif

+ 2 - 2
Marlin/src/HAL/AVR/fastio.cpp

@@ -245,7 +245,7 @@ uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb
   float count = 0;
   if (hz > 0 && (dca || dcb || dcc)) {
     count = float(F_CPU) / hz;            // 1x prescaler, TOP for 16MHz base freq.
-    uint16_t prescaler;                   // Range of 30.5Hz (65535) 64.5KHz (>31)
+    uint16_t prescaler;                   // Range of 30.5Hz (65535) 64.5kHz (>31)
 
          if (count >= 255. * 256.) { prescaler = 1024; SET_CS(5, PRESCALER_1024); }
     else if (count >= 255. * 64.)  { prescaler = 256;  SET_CS(5,  PRESCALER_256); }
@@ -277,7 +277,7 @@ uint16_t set_pwm_frequency_hz(const_float_t hz, const float dca, const float dcb
     // Restore the default for Timer 5
     SET_WGM(5, PWM_PC_8);                 // PWM 8-bit (Phase Correct)
     SET_COMS(5, NORMAL, NORMAL, NORMAL);  // Do nothing
-    SET_CS(5, PRESCALER_64);              // 16MHz / 64 = 250KHz
+    SET_CS(5, PRESCALER_64);              // 16MHz / 64 = 250kHz
     OCR5A = OCR5B = OCR5C = 0;
   }
   return round(count);

+ 3 - 3
Marlin/src/HAL/DUE/HAL_SPI.cpp

@@ -491,9 +491,9 @@
    *  1 :  4 - 5 MHz
    *  2 :  2 - 2.5 MHz
    *  3 :  1 - 1.25 MHz
-   *  4 :  500 - 625 KHz
-   *  5 :  250 - 312 KHz
-   *  6 :  125 - 156 KHz
+   *  4 :  500 - 625 kHz
+   *  5 :  250 - 312 kHz
+   *  6 :  125 - 156 kHz
    */
   void spiInit(uint8_t spiRate) {
     switch (spiRate) {

+ 1 - 1
Marlin/src/HAL/DUE/fastio/G2_PWM.cpp

@@ -25,7 +25,7 @@
  * is NOT used to directly toggle pins. The ISR writes to the pin assigned to
  * that interrupt.
  *
- * All PWMs use the same repetition rate.  The G2 needs about 10KHz min in order to
+ * All PWMs use the same repetition rate.  The G2 needs about 10kHz min in order to
  * not have obvious ripple on the Vref signals.
  *
  * The data structures are setup to minimize the computation done by the ISR which

+ 1 - 1
Marlin/src/HAL/DUE/pinsDebug.h

@@ -53,7 +53,7 @@
  *     The net result is that both the g_pinStatus[pin] array and the PIO_OSR register
  *     needs to be looked at when determining if a pin is an input or an output.
  *
- * b) Due has only pins 6, 7, 8 & 9 enabled for PWMs.  FYI - they run at 1KHz
+ * b) Due has only pins 6, 7, 8 & 9 enabled for PWMs.  FYI - they run at 1kHz
  *
  * c) NUM_DIGITAL_PINS does not include the analog pins
  *

+ 1 - 1
Marlin/src/HAL/DUE/timers.cpp

@@ -62,7 +62,7 @@ const tTimerConfig timer_config[NUM_HARDWARE_TIMERS] = {
   Timer_clock1: Prescaler 2 -> 42MHz
   Timer_clock2: Prescaler 8 -> 10.5MHz
   Timer_clock3: Prescaler 32 -> 2.625MHz
-  Timer_clock4: Prescaler 128 -> 656.25KHz
+  Timer_clock4: Prescaler 128 -> 656.25kHz
 */
 
 void HAL_timer_start(const uint8_t timer_num, const uint32_t frequency) {

+ 3 - 3
Marlin/src/HAL/DUE/usb/genclk.h

@@ -74,9 +74,9 @@ extern "C" {
 //@{
 
 enum genclk_source {
-	GENCLK_PCK_SRC_SLCK_RC       = 0, //!< Internal 32KHz RC oscillator as PCK source clock
-	GENCLK_PCK_SRC_SLCK_XTAL     = 1, //!< External 32KHz crystal oscillator as PCK source clock
-	GENCLK_PCK_SRC_SLCK_BYPASS   = 2, //!< External 32KHz bypass oscillator as PCK source clock
+	GENCLK_PCK_SRC_SLCK_RC       = 0, //!< Internal 32kHz RC oscillator as PCK source clock
+	GENCLK_PCK_SRC_SLCK_XTAL     = 1, //!< External 32kHz crystal oscillator as PCK source clock
+	GENCLK_PCK_SRC_SLCK_BYPASS   = 2, //!< External 32kHz bypass oscillator as PCK source clock
 	GENCLK_PCK_SRC_MAINCK_4M_RC  = 3, //!< Internal 4MHz RC oscillator as PCK source clock
 	GENCLK_PCK_SRC_MAINCK_8M_RC  = 4, //!< Internal 8MHz RC oscillator as PCK source clock
 	GENCLK_PCK_SRC_MAINCK_12M_RC = 5, //!< Internal 12MHz RC oscillator as PCK source clock

+ 6 - 6
Marlin/src/HAL/DUE/usb/osc.h

@@ -93,9 +93,9 @@ extern "C" {
 
 //! \name Oscillator identifiers
 //@{
-#define OSC_SLCK_32K_RC             0    //!< Internal 32KHz RC oscillator.
-#define OSC_SLCK_32K_XTAL           1    //!< External 32KHz crystal oscillator.
-#define OSC_SLCK_32K_BYPASS         2    //!< External 32KHz bypass oscillator.
+#define OSC_SLCK_32K_RC             0    //!< Internal 32kHz RC oscillator.
+#define OSC_SLCK_32K_XTAL           1    //!< External 32kHz crystal oscillator.
+#define OSC_SLCK_32K_BYPASS         2    //!< External 32kHz bypass oscillator.
 #define OSC_MAINCK_4M_RC            3    //!< Internal 4MHz RC oscillator.
 #define OSC_MAINCK_8M_RC            4    //!< Internal 8MHz RC oscillator.
 #define OSC_MAINCK_12M_RC           5    //!< Internal 12MHz RC oscillator.
@@ -105,9 +105,9 @@ extern "C" {
 
 //! \name Oscillator clock speed in hertz
 //@{
-#define OSC_SLCK_32K_RC_HZ          CHIP_FREQ_SLCK_RC               //!< Internal 32KHz RC oscillator.
-#define OSC_SLCK_32K_XTAL_HZ        BOARD_FREQ_SLCK_XTAL            //!< External 32KHz crystal oscillator.
-#define OSC_SLCK_32K_BYPASS_HZ      BOARD_FREQ_SLCK_BYPASS          //!< External 32KHz bypass oscillator.
+#define OSC_SLCK_32K_RC_HZ          CHIP_FREQ_SLCK_RC               //!< Internal 32kHz RC oscillator.
+#define OSC_SLCK_32K_XTAL_HZ        BOARD_FREQ_SLCK_XTAL            //!< External 32kHz crystal oscillator.
+#define OSC_SLCK_32K_BYPASS_HZ      BOARD_FREQ_SLCK_BYPASS          //!< External 32kHz bypass oscillator.
 #define OSC_MAINCK_4M_RC_HZ         CHIP_FREQ_MAINCK_RC_4MHZ        //!< Internal 4MHz RC oscillator.
 #define OSC_MAINCK_8M_RC_HZ         CHIP_FREQ_MAINCK_RC_8MHZ        //!< Internal 8MHz RC oscillator.
 #define OSC_MAINCK_12M_RC_HZ        CHIP_FREQ_MAINCK_RC_12MHZ       //!< Internal 12MHz RC oscillator.

+ 3 - 3
Marlin/src/HAL/DUE/usb/sysclk.h

@@ -156,9 +156,9 @@ extern "C" {
 
 //! \name Master Clock Sources (MCK)
 //@{
-#define SYSCLK_SRC_SLCK_RC              0       //!< Internal 32KHz RC oscillator as master source clock
-#define SYSCLK_SRC_SLCK_XTAL            1       //!< External 32KHz crystal oscillator as master source clock
-#define SYSCLK_SRC_SLCK_BYPASS          2       //!< External 32KHz bypass oscillator as master source clock
+#define SYSCLK_SRC_SLCK_RC              0       //!< Internal 32kHz RC oscillator as master source clock
+#define SYSCLK_SRC_SLCK_XTAL            1       //!< External 32kHz crystal oscillator as master source clock
+#define SYSCLK_SRC_SLCK_BYPASS          2       //!< External 32kHz bypass oscillator as master source clock
 #define SYSCLK_SRC_MAINCK_4M_RC         3       //!< Internal 4MHz RC oscillator as master source clock
 #define SYSCLK_SRC_MAINCK_8M_RC         4       //!< Internal 8MHz RC oscillator as master source clock
 #define SYSCLK_SRC_MAINCK_12M_RC        5       //!< Internal 12MHz RC oscillator as master source clock

+ 1 - 1
Marlin/src/HAL/DUE/watchdog.cpp

@@ -39,7 +39,7 @@ void watchdogSetup() {
     uint32_t timeout = TERN(WATCHDOG_DURATION_8S, 8000, 4000);
 
     // Calculate timeout value in WDT counter ticks: This assumes
-    // the slow clock is running at 32.768 KHz watchdog
+    // the slow clock is running at 32.768 kHz watchdog
     // frequency is therefore 32768 / 128 = 256 Hz
     timeout = (timeout << 8) / 1000;
     if (timeout == 0)

Some files were not shown because too many files changed in this diff