Browse Source

🔥 Drop STM L64** drivers, STEVAL_3DP001V1 (#24427)

Bob Kuhn 1 year ago
parent
commit
3f4e4a4d89
No account linked to committer's email address
38 changed files with 55 additions and 5881 deletions
  1. 0
    1
      .github/workflows/test-builds.yml
  2. 2
    3
      Marlin/Configuration.h
  3. 0
    247
      Marlin/Configuration_adv.h
  4. 0
    139
      Marlin/src/HAL/shared/HAL_spi_L6470.cpp
  5. 1
    12
      Marlin/src/MarlinCore.cpp
  6. 0
    1
      Marlin/src/core/boards.h
  7. 0
    17
      Marlin/src/core/drivers.h
  8. 0
    20
      Marlin/src/gcode/calibrate/G28.cpp
  9. 0
    151
      Marlin/src/gcode/feature/L6470/M122.cpp
  10. 0
    417
      Marlin/src/gcode/feature/L6470/M906.cpp
  11. 0
    650
      Marlin/src/gcode/feature/L6470/M916-M918.cpp
  12. 0
    8
      Marlin/src/gcode/gcode.cpp
  13. 2
    13
      Marlin/src/gcode/gcode.h
  14. 0
    89
      Marlin/src/gcode/host/M114.cpp
  15. 21
    21
      Marlin/src/inc/Conditionals_post.h
  16. 22
    12
      Marlin/src/inc/SanityCheck.h
  17. 0
    998
      Marlin/src/libs/L64XX/L64XX_Marlin.cpp
  18. 0
    141
      Marlin/src/libs/L64XX/L64XX_Marlin.h
  19. 0
    98
      Marlin/src/libs/L64XX/README.md
  20. 1
    30
      Marlin/src/module/stepper.cpp
  21. 0
    264
      Marlin/src/module/stepper/L64xx.cpp
  22. 0
    490
      Marlin/src/module/stepper/L64xx.h
  23. 0
    1
      Marlin/src/module/stepper/indirection.cpp
  24. 0
    4
      Marlin/src/module/stepper/indirection.h
  25. 4
    4
      Marlin/src/pins/pins.h
  26. 0
    15
      Marlin/src/pins/pinsDebug_list.h
  27. 0
    325
      Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h
  28. 0
    64
      buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json
  29. 0
    260
      buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PeripheralPins.c
  30. 0
    33
      buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PinNamesVar.h
  31. 0
    495
      buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h
  32. 0
    187
      buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld
  33. 0
    310
      buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.cpp
  34. 0
    327
      buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.h
  35. 2
    6
      buildroot/tests/FYSETC_F6
  36. 0
    15
      buildroot/tests/STM32F401VE_STEVAL
  37. 0
    2
      ini/features.ini
  38. 0
    11
      ini/stm32f4.ini

+ 0
- 1
.github/workflows/test-builds.yml View File

@@ -81,7 +81,6 @@ jobs:
81 81
         - STM32F401RC_creality
82 82
         - STM32F103VE_longer
83 83
         - STM32F407VE_black
84
-        - STM32F401VE_STEVAL
85 84
         - BIGTREE_BTT002
86 85
         - BIGTREE_SKR_PRO
87 86
         - BIGTREE_GTR_V1_0

+ 2
- 3
Marlin/Configuration.h View File

@@ -148,13 +148,12 @@
148 148
  *
149 149
  * Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
150 150
  *
151
- * Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
152
- *          TB6560, TB6600, TMC2100,
151
+ * Options: A4988, A5984, DRV8825, LV8729, TB6560, TB6600, TMC2100,
153 152
  *          TMC2130, TMC2130_STANDALONE, TMC2160, TMC2160_STANDALONE,
154 153
  *          TMC2208, TMC2208_STANDALONE, TMC2209, TMC2209_STANDALONE,
155 154
  *          TMC26X,  TMC26X_STANDALONE,  TMC2660, TMC2660_STANDALONE,
156 155
  *          TMC5130, TMC5130_STANDALONE, TMC5160, TMC5160_STANDALONE
157
- * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'L6470', 'L6474', 'POWERSTEP01', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
156
+ * :['A4988', 'A5984', 'DRV8825', 'LV8729', 'TB6560', 'TB6600', 'TMC2100', 'TMC2130', 'TMC2130_STANDALONE', 'TMC2160', 'TMC2160_STANDALONE', 'TMC2208', 'TMC2208_STANDALONE', 'TMC2209', 'TMC2209_STANDALONE', 'TMC26X', 'TMC26X_STANDALONE', 'TMC2660', 'TMC2660_STANDALONE', 'TMC5130', 'TMC5130_STANDALONE', 'TMC5160', 'TMC5160_STANDALONE']
158 157
  */
159 158
 #define X_DRIVER_TYPE  A4988
160 159
 #define Y_DRIVER_TYPE  A4988

+ 0
- 247
Marlin/Configuration_adv.h View File

@@ -3239,253 +3239,6 @@
3239 3239
 
3240 3240
 #endif // HAS_TRINAMIC_CONFIG
3241 3241
 
3242
-// @section L64XX
3243
-
3244
-/**
3245
- * L64XX Stepper Driver options
3246
- *
3247
- * Arduino-L6470 library (0.8.0 or higher) is required.
3248
- * https://github.com/ameyer/Arduino-L6470
3249
- *
3250
- * Requires the following to be defined in your pins_YOUR_BOARD file
3251
- *     L6470_CHAIN_SCK_PIN
3252
- *     L6470_CHAIN_MISO_PIN
3253
- *     L6470_CHAIN_MOSI_PIN
3254
- *     L6470_CHAIN_SS_PIN
3255
- *     ENABLE_RESET_L64XX_CHIPS(Q)  where Q is 1 to enable and 0 to reset
3256
- */
3257
-
3258
-#if HAS_L64XX
3259
-
3260
-  //#define L6470_CHITCHAT        // Display additional status info
3261
-
3262
-  #if AXIS_IS_L64XX(X)
3263
-    #define X_MICROSTEPS       128  // Number of microsteps (VALID: 1, 2, 4, 8, 16, 32, 128) - L6474 max is 16
3264
-    #define X_OVERCURRENT     2000  // (mA) Current where the driver detects an over current
3265
-                                    //   L6470 & L6474 - VALID: 375 x (1 - 16) - 6A max - rounds down
3266
-                                    //   POWERSTEP01: VALID: 1000 x (1 - 32) - 32A max - rounds down
3267
-    #define X_STALLCURRENT    1500  // (mA) Current where the driver detects a stall (VALID: 31.25 * (1-128) -  4A max - rounds down)
3268
-                                    //   L6470 & L6474 - VALID: 31.25 * (1-128) -  4A max - rounds down
3269
-                                    //   POWERSTEP01: VALID: 200 x (1 - 32) - 6.4A max - rounds down
3270
-                                    //   L6474 - STALLCURRENT setting is used to set the nominal (TVAL) current
3271
-    #define X_MAX_VOLTAGE      127  // 0-255, Maximum effective voltage seen by stepper - not used by L6474
3272
-    #define X_CHAIN_POS         -1  // Position in SPI chain, 0=Not in chain, 1=Nearest MOSI
3273
-    #define X_SLEW_RATE          1  // 0-3, Slew 0 is slowest, 3 is fastest
3274
-  #endif
3275
-
3276
-  #if AXIS_IS_L64XX(X2)
3277
-    #define X2_MICROSTEPS     X_MICROSTEPS
3278
-    #define X2_OVERCURRENT            2000
3279
-    #define X2_STALLCURRENT           1500
3280
-    #define X2_MAX_VOLTAGE             127
3281
-    #define X2_CHAIN_POS                -1
3282
-    #define X2_SLEW_RATE                 1
3283
-  #endif
3284
-
3285
-  #if AXIS_IS_L64XX(Y)
3286
-    #define Y_MICROSTEPS               128
3287
-    #define Y_OVERCURRENT             2000
3288
-    #define Y_STALLCURRENT            1500
3289
-    #define Y_MAX_VOLTAGE              127
3290
-    #define Y_CHAIN_POS                 -1
3291
-    #define Y_SLEW_RATE                  1
3292
-  #endif
3293
-
3294
-  #if AXIS_IS_L64XX(Y2)
3295
-    #define Y2_MICROSTEPS     Y_MICROSTEPS
3296
-    #define Y2_OVERCURRENT            2000
3297
-    #define Y2_STALLCURRENT           1500
3298
-    #define Y2_MAX_VOLTAGE             127
3299
-    #define Y2_CHAIN_POS                -1
3300
-    #define Y2_SLEW_RATE                 1
3301
-  #endif
3302
-
3303
-  #if AXIS_IS_L64XX(Z)
3304
-    #define Z_MICROSTEPS               128
3305
-    #define Z_OVERCURRENT             2000
3306
-    #define Z_STALLCURRENT            1500
3307
-    #define Z_MAX_VOLTAGE              127
3308
-    #define Z_CHAIN_POS                 -1
3309
-    #define Z_SLEW_RATE                  1
3310
-  #endif
3311
-
3312
-  #if AXIS_IS_L64XX(Z2)
3313
-    #define Z2_MICROSTEPS     Z_MICROSTEPS
3314
-    #define Z2_OVERCURRENT            2000
3315
-    #define Z2_STALLCURRENT           1500
3316
-    #define Z2_MAX_VOLTAGE             127
3317
-    #define Z2_CHAIN_POS                -1
3318
-    #define Z2_SLEW_RATE                 1
3319
-  #endif
3320
-
3321
-  #if AXIS_IS_L64XX(Z3)
3322
-    #define Z3_MICROSTEPS     Z_MICROSTEPS
3323
-    #define Z3_OVERCURRENT            2000
3324
-    #define Z3_STALLCURRENT           1500
3325
-    #define Z3_MAX_VOLTAGE             127
3326
-    #define Z3_CHAIN_POS                -1
3327
-    #define Z3_SLEW_RATE                 1
3328
-  #endif
3329
-
3330
-  #if AXIS_IS_L64XX(Z4)
3331
-    #define Z4_MICROSTEPS     Z_MICROSTEPS
3332
-    #define Z4_OVERCURRENT            2000
3333
-    #define Z4_STALLCURRENT           1500
3334
-    #define Z4_MAX_VOLTAGE             127
3335
-    #define Z4_CHAIN_POS                -1
3336
-    #define Z4_SLEW_RATE                 1
3337
-  #endif
3338
-
3339
-  #if AXIS_IS_L64XX(I)
3340
-    #define I_MICROSTEPS      128
3341
-    #define I_OVERCURRENT    2000
3342
-    #define I_STALLCURRENT   1500
3343
-    #define I_MAX_VOLTAGE     127
3344
-    #define I_CHAIN_POS        -1
3345
-    #define I_SLEW_RATE         1
3346
-  #endif
3347
-
3348
-  #if AXIS_IS_L64XX(J)
3349
-    #define J_MICROSTEPS      128
3350
-    #define J_OVERCURRENT    2000
3351
-    #define J_STALLCURRENT   1500
3352
-    #define J_MAX_VOLTAGE     127
3353
-    #define J_CHAIN_POS        -1
3354
-    #define J_SLEW_RATE         1
3355
-  #endif
3356
-
3357
-  #if AXIS_IS_L64XX(K)
3358
-    #define K_MICROSTEPS      128
3359
-    #define K_OVERCURRENT    2000
3360
-    #define K_STALLCURRENT   1500
3361
-    #define K_MAX_VOLTAGE     127
3362
-    #define K_CHAIN_POS        -1
3363
-    #define K_SLEW_RATE         1
3364
-  #endif
3365
-
3366
-  #if AXIS_IS_L64XX(U)
3367
-    #define U_MICROSTEPS      128
3368
-    #define U_OVERCURRENT    2000
3369
-    #define U_STALLCURRENT   1500
3370
-    #define U_MAX_VOLTAGE     127
3371
-    #define U_CHAIN_POS        -1
3372
-    #define U_SLEW_RATE         1
3373
-  #endif
3374
-
3375
-  #if AXIS_IS_L64XX(V)
3376
-    #define V_MICROSTEPS      128
3377
-    #define V_OVERCURRENT    2000
3378
-    #define V_STALLCURRENT   1500
3379
-    #define V_MAX_VOLTAGE     127
3380
-    #define V_CHAIN_POS        -1
3381
-    #define V_SLEW_RATE         1
3382
-  #endif
3383
-
3384
-  #if AXIS_IS_L64XX(W)
3385
-    #define W_MICROSTEPS      128
3386
-    #define W_OVERCURRENT    2000
3387
-    #define W_STALLCURRENT   1500
3388
-    #define W_MAX_VOLTAGE     127
3389
-    #define W_CHAIN_POS        -1
3390
-    #define W_SLEW_RATE         1
3391
-  #endif
3392
-
3393
-  #if AXIS_IS_L64XX(E0)
3394
-    #define E0_MICROSTEPS              128
3395
-    #define E0_OVERCURRENT            2000
3396
-    #define E0_STALLCURRENT           1500
3397
-    #define E0_MAX_VOLTAGE             127
3398
-    #define E0_CHAIN_POS                -1
3399
-    #define E0_SLEW_RATE                 1
3400
-  #endif
3401
-
3402
-  #if AXIS_IS_L64XX(E1)
3403
-    #define E1_MICROSTEPS    E0_MICROSTEPS
3404
-    #define E1_OVERCURRENT            2000
3405
-    #define E1_STALLCURRENT           1500
3406
-    #define E1_MAX_VOLTAGE             127
3407
-    #define E1_CHAIN_POS                -1
3408
-    #define E1_SLEW_RATE                 1
3409
-  #endif
3410
-
3411
-  #if AXIS_IS_L64XX(E2)
3412
-    #define E2_MICROSTEPS    E0_MICROSTEPS
3413
-    #define E2_OVERCURRENT            2000
3414
-    #define E2_STALLCURRENT           1500
3415
-    #define E2_MAX_VOLTAGE             127
3416
-    #define E2_CHAIN_POS                -1
3417
-    #define E2_SLEW_RATE                 1
3418
-  #endif
3419
-
3420
-  #if AXIS_IS_L64XX(E3)
3421
-    #define E3_MICROSTEPS    E0_MICROSTEPS
3422
-    #define E3_OVERCURRENT            2000
3423
-    #define E3_STALLCURRENT           1500
3424
-    #define E3_MAX_VOLTAGE             127
3425
-    #define E3_CHAIN_POS                -1
3426
-    #define E3_SLEW_RATE                 1
3427
-  #endif
3428
-
3429
-  #if AXIS_IS_L64XX(E4)
3430
-    #define E4_MICROSTEPS    E0_MICROSTEPS
3431
-    #define E4_OVERCURRENT            2000
3432
-    #define E4_STALLCURRENT           1500
3433
-    #define E4_MAX_VOLTAGE             127
3434
-    #define E4_CHAIN_POS                -1
3435
-    #define E4_SLEW_RATE                 1
3436
-  #endif
3437
-
3438
-  #if AXIS_IS_L64XX(E5)
3439
-    #define E5_MICROSTEPS    E0_MICROSTEPS
3440
-    #define E5_OVERCURRENT            2000
3441
-    #define E5_STALLCURRENT           1500
3442
-    #define E5_MAX_VOLTAGE             127
3443
-    #define E5_CHAIN_POS                -1
3444
-    #define E5_SLEW_RATE                 1
3445
-  #endif
3446
-
3447
-  #if AXIS_IS_L64XX(E6)
3448
-    #define E6_MICROSTEPS    E0_MICROSTEPS
3449
-    #define E6_OVERCURRENT            2000
3450
-    #define E6_STALLCURRENT           1500
3451
-    #define E6_MAX_VOLTAGE             127
3452
-    #define E6_CHAIN_POS                -1
3453
-    #define E6_SLEW_RATE                 1
3454
-  #endif
3455
-
3456
-  #if AXIS_IS_L64XX(E7)
3457
-    #define E7_MICROSTEPS    E0_MICROSTEPS
3458
-    #define E7_OVERCURRENT            2000
3459
-    #define E7_STALLCURRENT           1500
3460
-    #define E7_MAX_VOLTAGE             127
3461
-    #define E7_CHAIN_POS                -1
3462
-    #define E7_SLEW_RATE                 1
3463
-  #endif
3464
-
3465
-  /**
3466
-   * Monitor L6470 drivers for error conditions like over temperature and over current.
3467
-   * In the case of over temperature Marlin can decrease the drive until the error condition clears.
3468
-   * Other detected conditions can be used to stop the current print.
3469
-   * Relevant G-codes:
3470
-   * M906 - I1/2/3/4/5  Set or get motor drive level using axis codes X, Y, Z, E. Report values if no axis codes given.
3471
-   *         I not present or I0 or I1 - X, Y, Z or E0
3472
-   *         I2 - X2, Y2, Z2 or E1
3473
-   *         I3 - Z3 or E3
3474
-   *         I4 - Z4 or E4
3475
-   *         I5 - E5
3476
-   * M916 - Increase drive level until get thermal warning
3477
-   * M917 - Find minimum current thresholds
3478
-   * M918 - Increase speed until max or error
3479
-   * M122 S0/1 - Report driver parameters
3480
-   */
3481
-  //#define MONITOR_L6470_DRIVER_STATUS
3482
-
3483
-  #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
3484
-    #define KVAL_HOLD_STEP_DOWN     1
3485
-    //#define L6470_STOP_ON_ERROR
3486
-  #endif
3487
-
3488
-#endif // HAS_L64XX
3489 3242
 
3490 3243
 // @section i2cbus
3491 3244
 

+ 0
- 139
Marlin/src/HAL/shared/HAL_spi_L6470.cpp View File

@@ -1,139 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * Software L6470 SPI functions originally from Arduino Sd2Card Library
25
- * Copyright (c) 2009 by William Greiman
26
- */
27
-
28
-#include "../../inc/MarlinConfig.h"
29
-
30
-#if HAS_L64XX
31
-
32
-#include "Delay.h"
33
-
34
-#include "../../core/serial.h"
35
-#include "../../libs/L64XX/L64XX_Marlin.h"
36
-
37
-// Make sure GCC optimizes this file.
38
-// Note that this line triggers a bug in GCC which is fixed by casting.
39
-// See the note below.
40
-#pragma GCC optimize (3)
41
-
42
-// run at ~4Mhz
43
-inline uint8_t L6470_SpiTransfer_Mode_0(uint8_t b) { // using Mode 0
44
-  for (uint8_t bits = 8; bits--;) {
45
-    WRITE(L6470_CHAIN_MOSI_PIN, b & 0x80);
46
-    b <<= 1;        // little setup time
47
-
48
-    WRITE(L6470_CHAIN_SCK_PIN, HIGH);
49
-    DELAY_NS(125);  // 10 cycles @ 84mhz
50
-
51
-    b |= (READ(L6470_CHAIN_MISO_PIN) != 0);
52
-
53
-    WRITE(L6470_CHAIN_SCK_PIN, LOW);
54
-    DELAY_NS(125);  // 10 cycles @ 84mhz
55
-  }
56
-  return b;
57
-}
58
-
59
-inline uint8_t L6470_SpiTransfer_Mode_3(uint8_t b) { // using Mode 3
60
-  for (uint8_t bits = 8; bits--;) {
61
-    WRITE(L6470_CHAIN_SCK_PIN, LOW);
62
-    WRITE(L6470_CHAIN_MOSI_PIN, b & 0x80);
63
-
64
-    DELAY_NS(125);  // 10 cycles @ 84mhz
65
-    WRITE(L6470_CHAIN_SCK_PIN, HIGH);
66
-    DELAY_NS(125);  // Need more delay for fast CPUs
67
-
68
-    b <<= 1;        // little setup time
69
-    b |= (READ(L6470_CHAIN_MISO_PIN) != 0);
70
-  }
71
-  DELAY_NS(125);    // 10 cycles @ 84mhz
72
-  return b;
73
-}
74
-
75
-/**
76
- * L64XX methods for SPI init and transfer
77
- */
78
-void L64XX_Marlin::spi_init() {
79
-  OUT_WRITE(L6470_CHAIN_SS_PIN, HIGH);
80
-  OUT_WRITE(L6470_CHAIN_SCK_PIN, HIGH);
81
-  OUT_WRITE(L6470_CHAIN_MOSI_PIN, HIGH);
82
-  SET_INPUT(L6470_CHAIN_MISO_PIN);
83
-
84
-  #if PIN_EXISTS(L6470_BUSY)
85
-    SET_INPUT(L6470_BUSY_PIN);
86
-  #endif
87
-
88
-  OUT_WRITE(L6470_CHAIN_MOSI_PIN, HIGH);
89
-}
90
-
91
-uint8_t L64XX_Marlin::transfer_single(uint8_t data, int16_t ss_pin) {
92
-  // First device in chain has data sent last
93
-  extDigitalWrite(ss_pin, LOW);
94
-
95
-  hal.isr_off();  // Disable interrupts during SPI transfer (can't allow partial command to chips)
96
-  const uint8_t data_out = L6470_SpiTransfer_Mode_3(data);
97
-  hal.isr_on();   // Enable interrupts
98
-
99
-  extDigitalWrite(ss_pin, HIGH);
100
-  return data_out;
101
-}
102
-
103
-uint8_t L64XX_Marlin::transfer_chain(uint8_t data, int16_t ss_pin, uint8_t chain_position) {
104
-  uint8_t data_out = 0;
105
-
106
-  // first device in chain has data sent last
107
-  extDigitalWrite(ss_pin, LOW);
108
-
109
-  for (uint8_t i = L64XX::chain[0]; !L64xxManager.spi_abort && i >= 1; i--) {   // Send data unless aborted
110
-    hal.isr_off();    // Disable interrupts during SPI transfer (can't allow partial command to chips)
111
-    const uint8_t temp = L6470_SpiTransfer_Mode_3(uint8_t(i == chain_position ? data : dSPIN_NOP));
112
-    hal.isr_on();     // Enable interrupts
113
-    if (i == chain_position) data_out = temp;
114
-  }
115
-
116
-  extDigitalWrite(ss_pin, HIGH);
117
-  return data_out;
118
-}
119
-
120
-/**
121
- * Platform-supplied L6470 buffer transfer method
122
- */
123
-void L64XX_Marlin::transfer(uint8_t L6470_buf[], const uint8_t length) {
124
-  // First device in chain has its data sent last
125
-
126
-  if (spi_active) {                   // Interrupted SPI transfer so need to
127
-    WRITE(L6470_CHAIN_SS_PIN, HIGH);  //  guarantee min high of 650ns
128
-    DELAY_US(1);
129
-  }
130
-
131
-  WRITE(L6470_CHAIN_SS_PIN, LOW);
132
-  for (uint8_t i = length; i >= 1; i--)
133
-    L6470_SpiTransfer_Mode_3(uint8_t(L6470_buf[i]));
134
-  WRITE(L6470_CHAIN_SS_PIN, HIGH);
135
-}
136
-
137
-#pragma GCC reset_options
138
-
139
-#endif // HAS_L64XX

+ 1
- 12
Marlin/src/MarlinCore.cpp View File

@@ -226,10 +226,6 @@
226 226
   #include "feature/mmu/mmu2.h"
227 227
 #endif
228 228
 
229
-#if HAS_L64XX
230
-  #include "libs/L64XX/L64XX_Marlin.h"
231
-#endif
232
-
233 229
 #if ENABLED(PASSWORD_FEATURE)
234 230
   #include "feature/password/password.h"
235 231
 #endif
@@ -432,7 +428,7 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
432 428
 
433 429
       if (!has_blocks && !do_reset_timeout && gcode.stepper_inactive_timeout()) {
434 430
         if (!already_shutdown_steppers) {
435
-          already_shutdown_steppers = true;  // L6470 SPI will consume 99% of free time without this
431
+          already_shutdown_steppers = true;
436 432
 
437 433
           // Individual axes will be disabled if configured
438 434
           TERN_(DISABLE_INACTIVE_X, stepper.disable_axis(X_AXIS));
@@ -731,8 +727,6 @@ inline void manage_inactivity(const bool no_stepper_sleep=false) {
731 727
 
732 728
   TERN_(MONITOR_DRIVER_STATUS, monitor_tmc_drivers());
733 729
 
734
-  TERN_(MONITOR_L6470_DRIVER_STATUS, L64xxManager.monitor_driver());
735
-
736 730
   // Limit check_axes_activity frequency to 10Hz
737 731
   static millis_t next_check_axes_ms = 0;
738 732
   if (ELAPSED(ms, next_check_axes_ms)) {
@@ -1062,7 +1056,6 @@ inline void tmc_standby_setup() {
1062 1056
  *    • TMC220x Stepper Drivers (Serial)
1063 1057
  *    • PSU control
1064 1058
  *    • Power-loss Recovery
1065
- *    • L64XX Stepper Drivers (SPI)
1066 1059
  *    • Stepper Driver Reset: DISABLE
1067 1060
  *    • TMC Stepper Drivers (SPI)
1068 1061
  *    • Run hal.init_board() for additional pins setup
@@ -1251,10 +1244,6 @@ void setup() {
1251 1244
     SETUP_RUN(tmc_init_cs_pins());
1252 1245
   #endif
1253 1246
 
1254
-  #if HAS_L64XX
1255
-    SETUP_RUN(L64xxManager.init());  // Set up SPI, init drivers
1256
-  #endif
1257
-
1258 1247
   #if ENABLED(PSU_CONTROL)
1259 1248
     SETUP_LOG("PSU_CONTROL");
1260 1249
     powerManager.init();

+ 0
- 1
Marlin/src/core/boards.h View File

@@ -385,7 +385,6 @@
385 385
 #define BOARD_RUMBA32_BTT             4204  // RUMBA32 STM32F446VE based controller from BIGTREETECH
386 386
 #define BOARD_BLACK_STM32F407VE       4205  // BLACK_STM32F407VE
387 387
 #define BOARD_BLACK_STM32F407ZE       4206  // BLACK_STM32F407ZE
388
-#define BOARD_STEVAL_3DP001V1         4207  // STEVAL-3DP001V1 3D PRINTER BOARD
389 388
 #define BOARD_BTT_SKR_PRO_V1_1        4208  // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
390 389
 #define BOARD_BTT_SKR_PRO_V1_2        4209  // BigTreeTech SKR Pro v1.2 (STM32F407ZG)
391 390
 #define BOARD_BTT_BTT002_V1_0         4210  // BigTreeTech BTT002 v1.0 (STM32F407VG)

+ 0
- 17
Marlin/src/core/drivers.h View File

@@ -30,10 +30,6 @@
30 30
 #define _A5984              0x5984
31 31
 #define _DRV8825            0x8825
32 32
 #define _LV8729             0x8729
33
-#define _L6470              0x6470
34
-#define _L6474              0x6474
35
-#define _L6480              0x6480
36
-#define _POWERSTEP01        0xF00D
37 33
 #define _TB6560             0x6560
38 34
 #define _TB6600             0x6600
39 35
 #define _TMC2100            0x2100
@@ -193,16 +189,3 @@
193 189
 #if HAS_DRIVER(TMC26X)
194 190
   #define HAS_TMC26X 1
195 191
 #endif
196
-
197
-//
198
-// L64XX Stepper Drivers
199
-//
200
-
201
-#if HAS_DRIVER(L6470) || HAS_DRIVER(L6474) || HAS_DRIVER(L6480) || HAS_DRIVER(POWERSTEP01)
202
-  #define HAS_L64XX 1
203
-#endif
204
-#if HAS_L64XX && !HAS_DRIVER(L6474)
205
-  #define HAS_L64XX_NOT_L6474 1
206
-#endif
207
-
208
-#define AXIS_IS_L64XX(A) (AXIS_DRIVER_TYPE_##A(L6470) || AXIS_DRIVER_TYPE_##A(L6474) || AXIS_DRIVER_TYPE_##A(L6480) || AXIS_DRIVER_TYPE_##A(POWERSTEP01))

+ 0
- 20
Marlin/src/gcode/calibrate/G28.cpp View File

@@ -55,10 +55,6 @@
55 55
   #include "../../lcd/e3v2/proui/dwin.h"
56 56
 #endif
57 57
 
58
-#if HAS_L64XX                         // set L6470 absolute position registers to counts
59
-  #include "../../libs/L64XX/L64XX_Marlin.h"
60
-#endif
61
-
62 58
 #if ENABLED(LASER_FEATURE)
63 59
   #include "../../feature/spindle_laser.h"
64 60
 #endif
@@ -601,20 +597,4 @@ void GcodeSuite::G28() {
601 597
 
602 598
   TERN_(FULL_REPORT_TO_HOST_FEATURE, set_and_report_grblstate(old_grblstate));
603 599
 
604
-  #if HAS_L64XX
605
-    // Set L6470 absolute position registers to counts
606
-    // constexpr *might* move this to PROGMEM.
607
-    // If not, this will need a PROGMEM directive and an accessor.
608
-    #define _EN_ITEM(N) , E_AXIS
609
-    static constexpr AxisEnum L64XX_axis_xref[MAX_L64XX] = {
610
-      NUM_AXIS_LIST(X_AXIS, Y_AXIS, Z_AXIS, I_AXIS, J_AXIS, K_AXIS, U_AXIS, V_AXIS, W_AXIS),
611
-      X_AXIS, Y_AXIS, Z_AXIS, Z_AXIS, Z_AXIS
612
-      REPEAT(E_STEPPERS, _EN_ITEM)
613
-    };
614
-    #undef _EN_ITEM
615
-    for (uint8_t j = 1; j <= L64XX::chain[0]; j++) {
616
-      const uint8_t cv = L64XX::chain[j];
617
-      L64xxManager.set_param((L64XX_axis_t)cv, L6470_ABS_POS, stepper.position(L64XX_axis_xref[cv]));
618
-    }
619
-  #endif
620 600
 }

+ 0
- 151
Marlin/src/gcode/feature/L6470/M122.cpp View File

@@ -1,151 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#include "../../../inc/MarlinConfig.h"
24
-
25
-#if HAS_L64XX
26
-
27
-#include "../../gcode.h"
28
-#include "../../../libs/L64XX/L64XX_Marlin.h"
29
-#include "../../../module/stepper/indirection.h"
30
-
31
-void echo_yes_no(const bool yes);
32
-
33
-inline void L6470_say_status(const L64XX_axis_t axis) {
34
-  if (L64xxManager.spi_abort) return;
35
-  const L64XX_Marlin::L64XX_shadow_t &sh = L64xxManager.shadow;
36
-  L64xxManager.get_status(axis);
37
-  L64xxManager.say_axis(axis);
38
-  #if ENABLED(L6470_CHITCHAT)
39
-    char temp_buf[20];
40
-    sprintf_P(temp_buf, PSTR("   status: %4x   "), sh.STATUS_AXIS_RAW);
41
-    SERIAL_ECHO(temp_buf);
42
-    print_bin(sh.STATUS_AXIS_RAW);
43
-    switch (sh.STATUS_AXIS_LAYOUT) {
44
-      case L6470_STATUS_LAYOUT: SERIAL_ECHOPGM("   L6470"); break;
45
-      case L6474_STATUS_LAYOUT: SERIAL_ECHOPGM("   L6474"); break;
46
-      case L6480_STATUS_LAYOUT: SERIAL_ECHOPGM("   L6480/powerSTEP01"); break;
47
-    }
48
-  #endif
49
-  SERIAL_ECHOPGM("\n...OUTPUT: ");
50
-  SERIAL_ECHOF(sh.STATUS_AXIS & STATUS_HIZ ? F("OFF") : F("ON "));
51
-  SERIAL_ECHOPGM("   BUSY: "); echo_yes_no((sh.STATUS_AXIS & STATUS_BUSY) == 0);
52
-  SERIAL_ECHOPGM("   DIR: ");
53
-  SERIAL_ECHOF((((sh.STATUS_AXIS & STATUS_DIR) >> 4) ^ L64xxManager.index_to_dir[axis]) ? F("FORWARD") : F("REVERSE"));
54
-  if (sh.STATUS_AXIS_LAYOUT == L6480_STATUS_LAYOUT) {
55
-    SERIAL_ECHOPGM("   Last Command: ");
56
-    if (sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD) SERIAL_ECHOPGM("VALID");
57
-    else                                           SERIAL_ECHOPGM("ERROR");
58
-    SERIAL_ECHOPGM("\n...THERMAL: ");
59
-    switch ((sh.STATUS_AXIS & (sh.STATUS_AXIS_TH_SD | sh.STATUS_AXIS_TH_WRN)) >> 11) {
60
-      case 0: SERIAL_ECHOPGM("DEVICE SHUTDOWN"); break;
61
-      case 1: SERIAL_ECHOPGM("BRIDGE SHUTDOWN"); break;
62
-      case 2: SERIAL_ECHOPGM("WARNING        "); break;
63
-      case 3: SERIAL_ECHOPGM("OK             "); break;
64
-    }
65
-  }
66
-  else {
67
-    SERIAL_ECHOPGM("   Last Command: ");
68
-    if (!(sh.STATUS_AXIS & sh.STATUS_AXIS_WRONG_CMD)) SERIAL_ECHOPGM("IN");
69
-    SERIAL_ECHOPGM("VALID    ");
70
-    SERIAL_ECHOF(sh.STATUS_AXIS & sh.STATUS_AXIS_NOTPERF_CMD ?  F("COMPLETED    ") : F("Not PERFORMED"));
71
-    SERIAL_ECHOPGM("\n...THERMAL: ", !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_SD) ? "SHUTDOWN       " : !(sh.STATUS_AXIS & sh.STATUS_AXIS_TH_WRN) ? "WARNING        " : "OK             ");
72
-  }
73
-  SERIAL_ECHOPGM("   OVERCURRENT:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_OCD) == 0);
74
-  if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) {
75
-    SERIAL_ECHOPGM("   STALL:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_STEP_LOSS_A) == 0 || (sh.STATUS_AXIS & sh.STATUS_AXIS_STEP_LOSS_B) == 0);
76
-    SERIAL_ECHOPGM("   STEP-CLOCK MODE:"); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_SCK_MOD) != 0);
77
-  }
78
-  else {
79
-    SERIAL_ECHOPGM("   STALL: NA "
80
-                   "   STEP-CLOCK MODE: NA"
81
-                   "   UNDER VOLTAGE LOCKOUT: "); echo_yes_no((sh.STATUS_AXIS & sh.STATUS_AXIS_UVLO) == 0);
82
-  }
83
-  SERIAL_EOL();
84
-}
85
-
86
-/**
87
- * M122: Debug L6470 drivers
88
- */
89
-void GcodeSuite::M122() {
90
-  L64xxManager.pause_monitor(true); // Keep monitor_driver() from stealing status
91
-  L64xxManager.spi_active = true;   // Tell set_directions() a series of SPI transfers is underway
92
-
93
-  //if (parser.seen('S'))
94
-  //  tmc_set_report_interval(parser.value_bool());
95
-  //else
96
-
97
-  #if AXIS_IS_L64XX(X)
98
-    L6470_say_status(X);
99
-  #endif
100
-  #if AXIS_IS_L64XX(X2)
101
-    L6470_say_status(X2);
102
-  #endif
103
-  #if AXIS_IS_L64XX(Y)
104
-    L6470_say_status(Y);
105
-  #endif
106
-  #if AXIS_IS_L64XX(Y2)
107
-    L6470_say_status(Y2);
108
-  #endif
109
-  #if AXIS_IS_L64XX(Z)
110
-    L6470_say_status(Z);
111
-  #endif
112
-  #if AXIS_IS_L64XX(Z2)
113
-    L6470_say_status(Z2);
114
-  #endif
115
-  #if AXIS_IS_L64XX(Z3)
116
-    L6470_say_status(Z3);
117
-  #endif
118
-  #if AXIS_IS_L64XX(Z4)
119
-    L6470_say_status(Z4);
120
-  #endif
121
-  #if AXIS_IS_L64XX(E0)
122
-    L6470_say_status(E0);
123
-  #endif
124
-  #if AXIS_IS_L64XX(E1)
125
-    L6470_say_status(E1);
126
-  #endif
127
-  #if AXIS_IS_L64XX(E2)
128
-    L6470_say_status(E2);
129
-  #endif
130
-  #if AXIS_IS_L64XX(E3)
131
-    L6470_say_status(E3);
132
-  #endif
133
-  #if AXIS_IS_L64XX(E4)
134
-    L6470_say_status(E4);
135
-  #endif
136
-  #if AXIS_IS_L64XX(E5)
137
-    L6470_say_status(E5);
138
-  #endif
139
-  #if AXIS_IS_L64XX(E6)
140
-    L6470_say_status(E6);
141
-  #endif
142
-  #if AXIS_IS_L64XX(E7)
143
-    L6470_say_status(E7);
144
-  #endif
145
-
146
-  L64xxManager.spi_active = false;   // done with all SPI transfers - clear handshake flags
147
-  L64xxManager.spi_abort = false;
148
-  L64xxManager.pause_monitor(false);
149
-}
150
-
151
-#endif // HAS_L64XX

+ 0
- 417
Marlin/src/gcode/feature/L6470/M906.cpp View File

@@ -1,417 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-#include "../../../inc/MarlinConfig.h"
24
-
25
-#if HAS_L64XX
26
-
27
-#if AXIS_COLLISION('I')
28
-  #error "M906 parameter 'I' collision with axis name."
29
-#endif
30
-
31
-#include "../../gcode.h"
32
-#include "../../../libs/L64XX/L64XX_Marlin.h"
33
-#include "../../../module/stepper/indirection.h"
34
-#include "../../../module/planner.h"
35
-
36
-#define DEBUG_OUT ENABLED(L6470_CHITCHAT)
37
-#include "../../../core/debug_out.h"
38
-
39
-/**
40
- * MACRO to fetch information on the items associated with current limiting
41
- * and maximum voltage output.
42
- *
43
- * L6470 can be setup to shutdown if either current threshold is exceeded.
44
- *
45
- * L6470 output current can not be set directly.  It is set indirectly by
46
- * setting the maximum effective output voltage.
47
- *
48
- *  Effective output voltage is set by PWM duty cycle.
49
- *
50
- *  Maximum effective output voltage is affected by MANY variables.  The main ones are:
51
- *    KVAL_HOLD
52
- *    KVAL_RUN
53
- *    KVAL_ACC
54
- *    KVAL_DEC
55
- *    Vs compensation (if enabled)
56
- */
57
-void L64XX_report_current(L64XX &motor, const L64XX_axis_t axis) {
58
-
59
-  if (L64xxManager.spi_abort) return;  // don't do anything if set_directions() has occurred
60
-
61
-  const L64XX_Marlin::L64XX_shadow_t &sh = L64xxManager.shadow;
62
-  const uint16_t status = L64xxManager.get_status(axis);    //also populates shadow structure
63
-  const uint8_t OverCurrent_Threshold = uint8_t(motor.GetParam(L6470_OCD_TH));
64
-
65
-  auto say_axis_status = [](const L64XX_axis_t axis, const uint16_t status) {
66
-    L64xxManager.say_axis(axis);
67
-    #if ENABLED(L6470_CHITCHAT)
68
-      char tmp[10];
69
-      sprintf_P(tmp, PSTR("%4x   "), status);
70
-      DEBUG_ECHOPGM("   status: ", tmp);
71
-      print_bin(status);
72
-    #else
73
-      UNUSED(status);
74
-    #endif
75
-    SERIAL_EOL();
76
-  };
77
-
78
-  char temp_buf[10];
79
-
80
-  switch (sh.STATUS_AXIS_LAYOUT) {
81
-    case L6470_STATUS_LAYOUT:       // L6470
82
-    case L6480_STATUS_LAYOUT: {     // L6480 & powerstep01
83
-      const uint16_t Stall_Threshold = (uint8_t)motor.GetParam(L6470_STALL_TH),
84
-                     motor_status = (status & (STATUS_MOT_STATUS)) >> 5,
85
-                     L6470_ADC_out = motor.GetParam(L6470_ADC_OUT),
86
-                     L6470_ADC_out_limited = constrain(L6470_ADC_out, 8, 24);
87
-      const float comp_coef = 1600.0f / L6470_ADC_out_limited;
88
-      const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07);
89
-
90
-      say_axis_status(axis, sh.STATUS_AXIS_RAW);
91
-
92
-      SERIAL_ECHOPGM("...OverCurrent Threshold: ");
93
-      sprintf_P(temp_buf, PSTR("%2d ("), OverCurrent_Threshold);
94
-      SERIAL_ECHO(temp_buf);
95
-      SERIAL_ECHO((OverCurrent_Threshold + 1) * motor.OCD_CURRENT_CONSTANT_INV);
96
-      SERIAL_ECHOPGM(" mA)");
97
-      SERIAL_ECHOPGM("   Stall Threshold: ");
98
-      sprintf_P(temp_buf, PSTR("%2d ("), Stall_Threshold);
99
-      SERIAL_ECHO(temp_buf);
100
-      SERIAL_ECHO((Stall_Threshold + 1) * motor.STALL_CURRENT_CONSTANT_INV);
101
-      SERIAL_ECHOPGM(" mA)");
102
-      SERIAL_ECHOPGM("   Motor Status: ");
103
-      switch (motor_status) {
104
-        case 0: SERIAL_ECHOPGM("stopped"); break;
105
-        case 1: SERIAL_ECHOPGM("accelerating"); break;
106
-        case 2: SERIAL_ECHOPGM("decelerating"); break;
107
-        case 3: SERIAL_ECHOPGM("at constant speed"); break;
108
-      }
109
-      SERIAL_EOL();
110
-
111
-      SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps,
112
-                      "   ADC_OUT: ", L6470_ADC_out);
113
-      SERIAL_ECHOPGM("   Vs_compensation: ");
114
-      SERIAL_ECHOF((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_EN_VSCOMP) ? F("ENABLED ") : F("DISABLED"));
115
-      SERIAL_ECHOLNPGM("   Compensation coefficient: ~", comp_coef * 0.01f);
116
-
117
-      SERIAL_ECHOPGM("...KVAL_HOLD: ", motor.GetParam(L6470_KVAL_HOLD),
118
-                      "   KVAL_RUN : ", motor.GetParam(L6470_KVAL_RUN),
119
-                      "   KVAL_ACC: ", motor.GetParam(L6470_KVAL_ACC),
120
-                      "   KVAL_DEC: ", motor.GetParam(L6470_KVAL_DEC),
121
-                      "   V motor max = ");
122
-      switch (motor_status) {
123
-        case 0: SERIAL_ECHO(motor.GetParam(L6470_KVAL_HOLD) * 100 / 256); SERIAL_ECHOPGM("% (KVAL_HOLD)"); break;
124
-        case 1: SERIAL_ECHO(motor.GetParam(L6470_KVAL_RUN)  * 100 / 256); SERIAL_ECHOPGM("% (KVAL_RUN)"); break;
125
-        case 2: SERIAL_ECHO(motor.GetParam(L6470_KVAL_ACC)  * 100 / 256); SERIAL_ECHOPGM("% (KVAL_ACC)"); break;
126
-        case 3: SERIAL_ECHO(motor.GetParam(L6470_KVAL_DEC)  * 100 / 256); SERIAL_ECHOPGM("% (KVAL_HOLD)"); break;
127
-      }
128
-      SERIAL_EOL();
129
-
130
-      #if ENABLED(L6470_CHITCHAT)
131
-        DEBUG_ECHOPGM("...SLEW RATE: ");
132
-        switch (sh.STATUS_AXIS_LAYOUT) {
133
-          case L6470_STATUS_LAYOUT: {
134
-            switch ((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT) {
135
-              case 0: { DEBUG_ECHOLNPGM("320V/uS") ; break; }
136
-              case 1: { DEBUG_ECHOLNPGM("75V/uS")  ; break; }
137
-              case 2: { DEBUG_ECHOLNPGM("110V/uS") ; break; }
138
-              case 3: { DEBUG_ECHOLNPGM("260V/uS") ; break; }
139
-            }
140
-            break;
141
-          }
142
-        case L6480_STATUS_LAYOUT: {
143
-            switch (motor.GetParam(L6470_GATECFG1) & CONFIG1_SR ) {
144
-              case CONFIG1_SR_220V_us: { DEBUG_ECHOLNPGM("220V/uS") ; break; }
145
-              case CONFIG1_SR_400V_us: { DEBUG_ECHOLNPGM("400V/uS") ; break; }
146
-              case CONFIG1_SR_520V_us: { DEBUG_ECHOLNPGM("520V/uS") ; break; }
147
-              case CONFIG1_SR_980V_us: { DEBUG_ECHOLNPGM("980V/uS") ; break; }
148
-              default: { DEBUG_ECHOLNPGM("unknown") ; break; }
149
-            }
150
-          }
151
-        }
152
-      #endif
153
-      SERIAL_EOL();
154
-      break;
155
-    }
156
-
157
-    case L6474_STATUS_LAYOUT: {  // L6474
158
-      const uint16_t L6470_ADC_out = motor.GetParam(L6470_ADC_OUT) & 0x1F,
159
-                     L6474_TVAL_val = motor.GetParam(L6474_TVAL) & 0x7F;
160
-
161
-      say_axis_status(axis, sh.STATUS_AXIS_RAW);
162
-
163
-      SERIAL_ECHOPGM("...OverCurrent Threshold: ");
164
-      sprintf_P(temp_buf, PSTR("%2d ("), OverCurrent_Threshold);
165
-      SERIAL_ECHO(temp_buf);
166
-      SERIAL_ECHO((OverCurrent_Threshold + 1) * motor.OCD_CURRENT_CONSTANT_INV);
167
-      SERIAL_ECHOPGM(" mA)");
168
-      SERIAL_ECHOPGM("   TVAL: ");
169
-      sprintf_P(temp_buf, PSTR("%2d ("), L6474_TVAL_val);
170
-      SERIAL_ECHO(temp_buf);
171
-      SERIAL_ECHO((L6474_TVAL_val + 1) * motor.STALL_CURRENT_CONSTANT_INV);
172
-      SERIAL_ECHOLNPGM(" mA)   Motor Status: NA");
173
-
174
-      const uint16_t MicroSteps = _BV(motor.GetParam(L6470_STEP_MODE) & 0x07); //NOMORE(MicroSteps, 16);
175
-      SERIAL_ECHOPGM("...MicroSteps: ", MicroSteps,
176
-                      "   ADC_OUT: ", L6470_ADC_out);
177
-
178
-      SERIAL_ECHOLNPGM("   Vs_compensation: NA\n");
179
-      SERIAL_ECHOLNPGM("...KVAL_HOLD: NA"
180
-                       "   KVAL_RUN : NA"
181
-                       "   KVAL_ACC: NA"
182
-                       "   KVAL_DEC: NA"
183
-                       "   V motor max =  NA");
184
-
185
-      #if ENABLED(L6470_CHITCHAT)
186
-        DEBUG_ECHOPGM("...SLEW RATE: ");
187
-        switch ((motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT) {
188
-          case 0:  DEBUG_ECHOLNPGM("320V/uS") ; break;
189
-          case 1:  DEBUG_ECHOLNPGM("75V/uS")  ; break;
190
-          case 2:  DEBUG_ECHOLNPGM("110V/uS") ; break;
191
-          case 3:  DEBUG_ECHOLNPGM("260V/uS") ; break;
192
-          default: DEBUG_ECHOLNPGM("slew rate: ", (motor.GetParam(sh.L6470_AXIS_CONFIG) & CONFIG_POW_SR) >> CONFIG_POW_SR_BIT); break;
193
-        }
194
-      #endif
195
-      SERIAL_EOL();
196
-      SERIAL_EOL();
197
-      break;
198
-    }
199
-  }
200
-}
201
-
202
-/**
203
- * M906: report or set KVAL_HOLD which sets the maximum effective voltage provided by the
204
- *       PWMs to the steppers
205
- *
206
- * On L6474 this sets the TVAL register (same address).
207
- *
208
- * I - select which driver(s) to change on multi-driver axis
209
- *         (default) all drivers on the axis
210
- *     0 - monitor only the first XYZ... driver
211
- *     1 - monitor only X2, Y2, Z2
212
- *     2 - monitor only Z3
213
- *     3 - monitor only Z4
214
- * Xxxx, Yxxx, Zxxx, Axxx, Bxxx, Cxxx, Uxxx, Vxxx, Wxxx, Exxx - axis to change (optional)
215
- *     L6474 - current in mA (4A max)
216
- *     All others - 0-255
217
- *
218
- * Sets KVAL_HOLD which affects the current being driven through the stepper.
219
- *
220
- * L6470 is used in the STEP-CLOCK mode.  KVAL_HOLD is the only KVAL_xxx
221
- * that affects the effective voltage seen by the stepper.
222
- */
223
-void GcodeSuite::M906() {
224
-
225
-  L64xxManager.pause_monitor(true); // Keep monitor_driver() from stealing status
226
-
227
-  #define L6470_SET_KVAL_HOLD(Q) (AXIS_IS_L64XX(Q) ? stepper##Q.setTVALCurrent(value) : stepper##Q.SetParam(L6470_KVAL_HOLD, uint8_t(value)))
228
-
229
-  DEBUG_ECHOLNPGM("M906");
230
-
231
-  uint8_t report_current = true;
232
-
233
-  #if AXIS_IS_L64XX(X2) || AXIS_IS_L64XX(Y2) || AXIS_IS_L64XX(Z2) || AXIS_IS_L64XX(Z3) || AXIS_IS_L64XX(Z4)
234
-    const int8_t index = parser.byteval('I', -1);
235
-  #else
236
-    constexpr int8_t index = -1;
237
-  #endif
238
-
239
-  LOOP_LOGICAL_AXES(i) if (uint16_t value = parser.intval(AXIS_CHAR(i))) {
240
-
241
-    report_current = false;
242
-
243
-    if (planner.has_blocks_queued() || planner.cleaning_buffer_counter) {
244
-      SERIAL_ECHOLNPGM("Test aborted. Can't set KVAL_HOLD while steppers are moving.");
245
-      return;
246
-    }
247
-
248
-    switch (i) {
249
-      #if AXIS_IS_L64XX(X) || AXIS_IS_L64XX(X2)
250
-        case X_AXIS:
251
-          #if AXIS_IS_L64XX(X)
252
-            if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(X);
253
-          #endif
254
-          #if AXIS_IS_L64XX(X2)
255
-            if (index < 0 || index == 1) L6470_SET_KVAL_HOLD(X2);
256
-          #endif
257
-          break;
258
-      #endif
259
-
260
-      #if AXIS_IS_L64XX(Y) || AXIS_IS_L64XX(Y2)
261
-        case Y_AXIS:
262
-          #if AXIS_IS_L64XX(Y)
263
-            if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(Y);
264
-          #endif
265
-          #if AXIS_IS_L64XX(Y2)
266
-            if (index < 0 || index == 1) L6470_SET_KVAL_HOLD(Y2);
267
-          #endif
268
-          break;
269
-      #endif
270
-
271
-      #if AXIS_IS_L64XX(Z) || AXIS_IS_L64XX(Z2) || AXIS_IS_L64XX(Z3) || AXIS_IS_L64XX(Z4)
272
-        case Z_AXIS:
273
-          #if AXIS_IS_L64XX(Z)
274
-            if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(Z);
275
-          #endif
276
-          #if AXIS_IS_L64XX(Z2)
277
-            if (index < 0 || index == 1) L6470_SET_KVAL_HOLD(Z2);
278
-          #endif
279
-          #if AXIS_IS_L64XX(Z3)
280
-            if (index < 0 || index == 2) L6470_SET_KVAL_HOLD(Z3);
281
-          #endif
282
-          #if AXIS_IS_L64XX(Z4)
283
-            if (index < 0 || index == 3) L6470_SET_KVAL_HOLD(Z4);
284
-          #endif
285
-          break;
286
-      #endif
287
-
288
-      #if AXIS_IS_L64XX(I)
289
-        case I_AXIS: L6470_SET_KVAL_HOLD(I); break;
290
-      #endif
291
-      #if AXIS_IS_L64XX(J)
292
-        case J_AXIS: L6470_SET_KVAL_HOLD(J); break;
293
-      #endif
294
-      #if AXIS_IS_L64XX(K)
295
-        case K_AXIS: L6470_SET_KVAL_HOLD(K); break;
296
-      #endif
297
-      #if AXIS_IS_L64XX(U)
298
-        case U_AXIS: L6470_SET_KVAL_HOLD(U); break;
299
-      #endif
300
-      #if AXIS_IS_L64XX(V)
301
-        case V_AXIS: L6470_SET_KVAL_HOLD(V); break;
302
-      #endif
303
-      #if AXIS_IS_L64XX(W)
304
-        case W_AXIS: L6470_SET_KVAL_HOLD(W); break;
305
-      #endif
306
-
307
-      #if AXIS_IS_L64XX(E0) || AXIS_IS_L64XX(E1) || AXIS_IS_L64XX(E2) || AXIS_IS_L64XX(E3) || AXIS_IS_L64XX(E4) || AXIS_IS_L64XX(E5) || AXIS_IS_L64XX(E6) || AXIS_IS_L64XX(E7)
308
-        case E_AXIS: {
309
-          const int8_t eindex = get_target_e_stepper_from_command(-2);
310
-          #if AXIS_IS_L64XX(E0)
311
-            if (eindex < 0 || eindex == 0) L6470_SET_KVAL_HOLD(E0);
312
-          #endif
313
-          #if AXIS_IS_L64XX(E1)
314
-            if (eindex < 0 || eindex == 1) L6470_SET_KVAL_HOLD(E1);
315
-          #endif
316
-          #if AXIS_IS_L64XX(E2)
317
-            if (eindex < 0 || eindex == 2) L6470_SET_KVAL_HOLD(E2);
318
-          #endif
319
-          #if AXIS_IS_L64XX(E3)
320
-            if (eindex < 0 || eindex == 3) L6470_SET_KVAL_HOLD(E3);
321
-          #endif
322
-          #if AXIS_IS_L64XX(E4)
323
-            if (eindex < 0 || eindex == 4) L6470_SET_KVAL_HOLD(E4);
324
-          #endif
325
-          #if AXIS_IS_L64XX(E5)
326
-            if (eindex < 0 || eindex == 5) L6470_SET_KVAL_HOLD(E5);
327
-          #endif
328
-          #if AXIS_IS_L64XX(E6)
329
-            if (eindex < 0 || eindex == 6) L6470_SET_KVAL_HOLD(E6);
330
-          #endif
331
-          #if AXIS_IS_L64XX(E7)
332
-            if (eindex < 0 || eindex == 7) L6470_SET_KVAL_HOLD(E7);
333
-          #endif
334
-        } break;
335
-      #endif
336
-    }
337
-  }
338
-
339
-  if (report_current) {
340
-    #define L64XX_REPORT_CURRENT(Q) L64XX_report_current(stepper##Q, Q)
341
-
342
-    L64xxManager.spi_active = true; // Tell set_directions() a series of SPI transfers is underway
343
-
344
-    #if AXIS_IS_L64XX(X)
345
-      L64XX_REPORT_CURRENT(X);
346
-    #endif
347
-    #if AXIS_IS_L64XX(X2)
348
-      L64XX_REPORT_CURRENT(X2);
349
-    #endif
350
-    #if AXIS_IS_L64XX(Y)
351
-      L64XX_REPORT_CURRENT(Y);
352
-    #endif
353
-    #if AXIS_IS_L64XX(Y2)
354
-      L64XX_REPORT_CURRENT(Y2);
355
-    #endif
356
-    #if AXIS_IS_L64XX(Z)
357
-      L64XX_REPORT_CURRENT(Z);
358
-    #endif
359
-    #if AXIS_IS_L64XX(Z2)
360
-      L64XX_REPORT_CURRENT(Z2);
361
-    #endif
362
-    #if AXIS_IS_L64XX(Z3)
363
-      L64XX_REPORT_CURRENT(Z3);
364
-    #endif
365
-    #if AXIS_IS_L64XX(Z4)
366
-      L64XX_REPORT_CURRENT(Z4);
367
-    #endif
368
-    #if AXIS_IS_L64XX(I)
369
-      L64XX_REPORT_CURRENT(I);
370
-    #endif
371
-    #if AXIS_IS_L64XX(J)
372
-      L64XX_REPORT_CURRENT(J);
373
-    #endif
374
-    #if AXIS_IS_L64XX(K)
375
-      L64XX_REPORT_CURRENT(K);
376
-    #endif
377
-    #if AXIS_IS_L64XX(U)
378
-      L64XX_REPORT_CURRENT(U);
379
-    #endif
380
-    #if AXIS_IS_L64XX(V)
381
-      L64XX_REPORT_CURRENT(V);
382
-    #endif
383
-    #if AXIS_IS_L64XX(W)
384
-      L64XX_REPORT_CURRENT(W);
385
-    #endif
386
-    #if AXIS_IS_L64XX(E0)
387
-      L64XX_REPORT_CURRENT(E0);
388
-    #endif
389
-    #if AXIS_IS_L64XX(E1)
390
-      L64XX_REPORT_CURRENT(E1);
391
-    #endif
392
-    #if AXIS_IS_L64XX(E2)
393
-      L64XX_REPORT_CURRENT(E2);
394
-    #endif
395
-    #if AXIS_IS_L64XX(E3)
396
-      L64XX_REPORT_CURRENT(E3);
397
-    #endif
398
-    #if AXIS_IS_L64XX(E4)
399
-      L64XX_REPORT_CURRENT(E4);
400
-    #endif
401
-    #if AXIS_IS_L64XX(E5)
402
-      L64XX_REPORT_CURRENT(E5);
403
-    #endif
404
-    #if AXIS_IS_L64XX(E6)
405
-      L64XX_REPORT_CURRENT(E6);
406
-    #endif
407
-    #if AXIS_IS_L64XX(E7)
408
-      L64XX_REPORT_CURRENT(E7);
409
-    #endif
410
-
411
-    L64xxManager.spi_active = false;   // done with all SPI transfers - clear handshake flags
412
-    L64xxManager.spi_abort = false;
413
-    L64xxManager.pause_monitor(false);
414
-  }
415
-}
416
-
417
-#endif // HAS_L64XX

+ 0
- 650
Marlin/src/gcode/feature/L6470/M916-M918.cpp View File

@@ -1,650 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-//
24
-// NOTE: All tests assume each axis uses matching driver chips.
25
-//
26
-
27
-#include "../../../inc/MarlinConfig.h"
28
-
29
-#if HAS_L64XX
30
-
31
-#include "../../gcode.h"
32
-#include "../../../module/stepper/indirection.h"
33
-#include "../../../module/planner.h"
34
-#include "../../../libs/L64XX/L64XX_Marlin.h"
35
-
36
-#define DEBUG_OUT ENABLED(L6470_CHITCHAT)
37
-#include "../../../core/debug_out.h"
38
-
39
-/**
40
- * M916: increase KVAL_HOLD until get thermal warning
41
- *       NOTE - on L6474 it is TVAL that is used
42
- *
43
- * J - select which driver(s) to monitor on multi-driver axis
44
- *     0 - (default) monitor all drivers on the axis or E0
45
- *     1 - monitor only X, Y, Z, E1
46
- *     2 - monitor only X2, Y2, Z2, E2
47
- *     3 - monitor only Z3, E3
48
- *     4 - monitor only Z4, E4
49
- *
50
- * Xxxx, Yxxx, Zxxx, Exxx - axis to be monitored with displacement
51
- *     xxx (1-255) is distance moved on either side of current position
52
- *
53
- * F - feedrate
54
- *     optional - will use default max feedrate from configuration.h if not specified
55
- *
56
- * T - current (mA) setting for TVAL (0 - 4A in 31.25mA increments, rounds down) - L6474 only
57
- *     optional - will report current value from driver if not specified
58
- *
59
- * K - value for KVAL_HOLD (0 - 255) (ignored for L6474)
60
- *     optional - will report current value from driver if not specified
61
- *
62
- * D - time (in seconds) to run each setting of KVAL_HOLD/TVAL
63
- *     optional - defaults to zero (runs each setting once)
64
- */
65
-
66
-/**
67
- * This routine is also useful for determining the approximate KVAL_HOLD
68
- * where the stepper stops losing steps. The sound will get noticeably quieter
69
- * as it stops losing steps.
70
- */
71
-
72
-void GcodeSuite::M916() {
73
-
74
-  DEBUG_ECHOLNPGM("M916");
75
-
76
-  L64xxManager.pause_monitor(true); // Keep monitor_driver() from stealing status
77
-
78
-  // Variables used by L64xxManager.get_user_input function - some may not be used
79
-  char axis_mon[3][3] = { {"  "}, {"  "}, {"  "} };   // list of Axes to be monitored
80
-  L64XX_axis_t axis_index[3];
81
-  uint16_t axis_status[3];
82
-  uint8_t driver_count = 1;
83
-  float position_max;
84
-  float position_min;
85
-  float final_feedrate;
86
-  uint8_t kval_hold;
87
-  uint8_t OCD_TH_val = 0;
88
-  uint8_t STALL_TH_val = 0;
89
-  uint16_t over_current_threshold;
90
-  constexpr uint8_t over_current_flag = false;  // M916 doesn't play with the overcurrent thresholds
91
-
92
-  #define DRIVER_TYPE_L6474(Q) AXIS_DRIVER_TYPE_##Q(L6474)
93
-
94
-  uint8_t j;   // general purpose counter
95
-
96
-  if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold))
97
-    return;  // quit if invalid user input
98
-
99
-  DEBUG_ECHOLNPGM("feedrate = ", final_feedrate);
100
-
101
-  planner.synchronize();                             // wait for all current movement commands to complete
102
-
103
-  const L64XX_Marlin::L64XX_shadow_t &sh = L64xxManager.shadow;
104
-  for (j = 0; j < driver_count; j++)
105
-    L64xxManager.get_status(axis_index[j]);  // clear out any pre-existing error flags
106
-
107
-  char temp_axis_string[] = " ";
108
-  temp_axis_string[0] = axis_mon[0][0];  // need to have a string for use within sprintf format section
109
-  char gcode_string[80];
110
-  uint16_t status_composite = 0;
111
-
112
-  uint16_t M91x_counter = kval_hold;
113
-  uint16_t M91x_counter_max;
114
-  if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT) {
115
-    M91x_counter_max = 128;  // TVAL is 7 bits
116
-    LIMIT(M91x_counter, 0U, 127U);
117
-  }
118
-  else
119
-    M91x_counter_max = 256;  // KVAL_HOLD is 8 bits
120
-
121
-  uint8_t M91x_delay_s = parser.byteval('D');   // get delay in seconds
122
-  millis_t M91x_delay_ms = SEC_TO_MS(M91x_delay_s * 60);
123
-  millis_t M91x_delay_end;
124
-
125
-  DEBUG_ECHOLNPGM(".\n.");
126
-
127
-  do {
128
-
129
-    if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT)
130
-      DEBUG_ECHOLNPGM("TVAL current (mA) = ", (M91x_counter + 1) * sh.AXIS_STALL_CURRENT_CONSTANT_INV);        // report TVAL current for this run
131
-    else
132
-      DEBUG_ECHOLNPGM("kval_hold = ", M91x_counter);                                   // report KVAL_HOLD for this run
133
-
134
-    for (j = 0; j < driver_count; j++)
135
-      L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, M91x_counter);  //set KVAL_HOLD or TVAL (same register address)
136
-
137
-    M91x_delay_end = millis() + M91x_delay_ms;
138
-    do {
139
-      // turn the motor(s) both directions
140
-      sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate));
141
-      process_subcommands_now(gcode_string);
142
-
143
-      sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(final_feedrate));
144
-      process_subcommands_now(gcode_string);
145
-
146
-      // get the status after the motors have stopped
147
-      planner.synchronize();
148
-
149
-      status_composite = 0;    // clear out the old bits
150
-
151
-      for (j = 0; j < driver_count; j++) {
152
-        axis_status[j] = (~L64xxManager.get_status(axis_index[j])) & sh.L6470_ERROR_MASK;    // bits of interest are all active low
153
-        status_composite |= axis_status[j] ;
154
-      }
155
-
156
-      if (status_composite) break;
157
-    } while (millis() < M91x_delay_end);
158
-
159
-    if (status_composite) break;
160
-
161
-    M91x_counter++;
162
-
163
-  } while (!(status_composite & (sh.STATUS_AXIS_TH_WRN | sh.STATUS_AXIS_TH_SD)) && (M91x_counter < M91x_counter_max));
164
-
165
-  DEBUG_ECHOLNPGM(".");
166
-
167
-  #if ENABLED(L6470_CHITCHAT)
168
-    if (status_composite) {
169
-      L64xxManager.error_status_decode(status_composite, axis_index[0],
170
-        sh.STATUS_AXIS_TH_SD, sh.STATUS_AXIS_TH_WRN,
171
-        sh.STATUS_AXIS_STEP_LOSS_A, sh.STATUS_AXIS_STEP_LOSS_B,
172
-        sh.STATUS_AXIS_OCD, sh.STATUS_AXIS_LAYOUT);
173
-      DEBUG_ECHOLNPGM(".");
174
-    }
175
-  #endif
176
-
177
-  if ((status_composite & (sh.STATUS_AXIS_TH_WRN | sh.STATUS_AXIS_TH_SD)))
178
-    DEBUG_ECHOLNPGM(".\n.\nTest completed normally - Thermal warning/shutdown has occurred");
179
-  else if (status_composite)
180
-    DEBUG_ECHOLNPGM(".\n.\nTest completed abnormally - non-thermal error has occurred");
181
-  else
182
-    DEBUG_ECHOLNPGM(".\n.\nTest completed normally - Unable to get to thermal warning/shutdown");
183
-
184
-  L64xxManager.pause_monitor(false);
185
-}
186
-
187
-/**
188
- * M917: Find minimum current thresholds
189
- *
190
- *   Decrease OCD current until overcurrent error
191
- *   Increase OCD until overcurrent error goes away
192
- *   Decrease stall threshold until stall (not done on L6474)
193
- *   Increase stall until stall error goes away (not done on L6474)
194
- *
195
- * J - select which driver(s) to monitor on multi-driver axis
196
- *     0 - (default) monitor all drivers on the axis or E0
197
- *     1 - monitor only X, Y, Z, E1
198
- *     2 - monitor only X2, Y2, Z2, E2
199
- * Xxxx, Yxxx, Zxxx, Exxx - axis to be monitored with displacement
200
- *     xxx (1-255) is distance moved on either side of current position
201
- *
202
- * F - feedrate
203
- *     optional - will use default max feedrate from Configuration.h if not specified
204
- *
205
- * I - starting over-current threshold
206
- *     optional - will report current value from driver if not specified
207
- *     if there are multiple drivers on the axis then all will be set the same
208
- *
209
- * T - current (mA) setting for TVAL (0 - 4A in 31.25mA increments, rounds down) - L6474 only
210
- *     optional - will report current value from driver if not specified
211
- *
212
- * K - value for KVAL_HOLD (0 - 255) (ignored for L6474)
213
- *     optional - will report current value from driver if not specified
214
- */
215
-void GcodeSuite::M917() {
216
-
217
-  DEBUG_ECHOLNPGM("M917");
218
-
219
-  L64xxManager.pause_monitor(true); // Keep monitor_driver() from stealing status
220
-
221
-  char axis_mon[3][3] = { {"  "}, {"  "}, {"  "} };   // list of Axes to be monitored
222
-  L64XX_axis_t axis_index[3];
223
-  uint16_t axis_status[3];
224
-  uint8_t driver_count = 1;
225
-  float position_max;
226
-  float position_min;
227
-  float final_feedrate;
228
-  uint8_t kval_hold;
229
-  uint8_t OCD_TH_val = 0;
230
-  uint8_t STALL_TH_val = 0;
231
-  uint16_t over_current_threshold;
232
-  constexpr uint8_t over_current_flag = true;
233
-
234
-  uint8_t j;   // general purpose counter
235
-
236
-  if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold))
237
-    return;  // quit if invalid user input
238
-
239
-  DEBUG_ECHOLNPGM("feedrate = ", final_feedrate);
240
-
241
-  planner.synchronize();                             // wait for all current movement commands to complete
242
-
243
-  const L64XX_Marlin::L64XX_shadow_t &sh = L64xxManager.shadow;
244
-  for (j = 0; j < driver_count; j++)
245
-    L64xxManager.get_status(axis_index[j]);  // clear error flags
246
-  char temp_axis_string[] = " ";
247
-  temp_axis_string[0] = axis_mon[0][0];   // need a sprintf format string
248
-  char gcode_string[80];
249
-  uint16_t status_composite = 0;
250
-  uint8_t test_phase = 0;                 // 0 - decreasing OCD - exit when OCD warning occurs (ignore STALL)
251
-                                          // 1 - increasing OCD - exit when OCD warning stops (ignore STALL)
252
-                                          // 2 - OCD finalized - decreasing STALL - exit when STALL warning happens
253
-                                          // 3 - OCD finalized - increasing STALL - exit when STALL warning stop
254
-                                          // 4 - all testing completed
255
-  DEBUG_ECHOPGM(".\n.\n.\nover_current threshold : ", (OCD_TH_val + 1) * 375);   // first status display
256
-  DEBUG_ECHOPGM("  (OCD_TH:  : ", OCD_TH_val);
257
-  if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) {
258
-    DEBUG_ECHOPGM(")   Stall threshold: ", (STALL_TH_val + 1) * 31.25);
259
-    DEBUG_ECHOPGM("  (STALL_TH: ", STALL_TH_val);
260
-  }
261
-  DEBUG_ECHOLNPGM(")");
262
-
263
-  do {
264
-
265
-    if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) DEBUG_ECHOPGM("STALL threshold : ", (STALL_TH_val + 1) * 31.25);
266
-    DEBUG_ECHOLNPGM("   OCD threshold : ", (OCD_TH_val + 1) * 375);
267
-
268
-    sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(final_feedrate));
269
-    process_subcommands_now(gcode_string);
270
-
271
-    sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(final_feedrate));
272
-    process_subcommands_now(gcode_string);
273
-
274
-    planner.synchronize();
275
-
276
-    status_composite = 0;    // clear out the old bits
277
-
278
-    for (j = 0; j < driver_count; j++) {
279
-      axis_status[j] = (~L64xxManager.get_status(axis_index[j])) & sh.L6470_ERROR_MASK;    // bits of interest are all active low
280
-      status_composite |= axis_status[j];
281
-    }
282
-
283
-    if (status_composite && (status_composite & sh.STATUS_AXIS_UVLO)) {
284
-      DEBUG_ECHOLNPGM("Test aborted (Undervoltage lockout active)");
285
-      #if ENABLED(L6470_CHITCHAT)
286
-        for (j = 0; j < driver_count; j++) {
287
-          if (j) DEBUG_ECHOPGM("...");
288
-          L64xxManager.error_status_decode(axis_status[j], axis_index[j],
289
-            sh.STATUS_AXIS_TH_SD, sh.STATUS_AXIS_TH_WRN,
290
-            sh.STATUS_AXIS_STEP_LOSS_A, sh.STATUS_AXIS_STEP_LOSS_B,
291
-            sh.STATUS_AXIS_OCD, sh.STATUS_AXIS_LAYOUT);
292
-        }
293
-      #endif
294
-      return;
295
-    }
296
-
297
-    if (status_composite & (sh.STATUS_AXIS_TH_WRN | sh.STATUS_AXIS_TH_SD)) {
298
-      DEBUG_ECHOLNPGM("thermal problem - waiting for chip(s) to cool down ");
299
-      uint16_t status_composite_temp = 0;
300
-      uint8_t k = 0;
301
-      do {
302
-        k++;
303
-        if (!(k % 4)) {
304
-          kval_hold *= 0.95;
305
-          DEBUG_EOL();
306
-          DEBUG_ECHOLNPGM("Lowering KVAL_HOLD by about 5% to ", kval_hold);
307
-          for (j = 0; j < driver_count; j++)
308
-            L64xxManager.set_param(axis_index[j], L6470_KVAL_HOLD, kval_hold);
309
-        }
310
-        DEBUG_ECHOLNPGM(".");
311
-        reset_stepper_timeout(); // keep steppers powered
312
-        safe_delay(5000);
313
-        status_composite_temp = 0;
314
-        for (j = 0; j < driver_count; j++) {
315
-          axis_status[j] = (~L64xxManager.get_status(axis_index[j])) & sh.L6470_ERROR_MASK;    // bits of interest are all active low
316
-          status_composite_temp |= axis_status[j];
317
-        }
318
-      }
319
-      while (status_composite_temp & (sh.STATUS_AXIS_TH_WRN | sh.STATUS_AXIS_TH_SD));
320
-      DEBUG_EOL();
321
-    }
322
-    if (status_composite & (sh.STATUS_AXIS_STEP_LOSS_A | sh.STATUS_AXIS_STEP_LOSS_B | sh.STATUS_AXIS_OCD)) {
323
-      switch (test_phase) {
324
-
325
-        case 0: {
326
-          if (status_composite & sh.STATUS_AXIS_OCD) {
327
-            // phase 0 with OCD warning - time to go to next phase
328
-            if (OCD_TH_val >= sh.AXIS_OCD_TH_MAX) {
329
-              OCD_TH_val = sh.AXIS_OCD_TH_MAX;           // limit to max
330
-              test_phase = 2;            // at highest value so skip phase 1
331
-              //DEBUG_ECHOLNPGM("LOGIC E0A OCD at highest - skip to 2");
332
-              DEBUG_ECHOLNPGM("OCD at highest - OCD finalized");
333
-            }
334
-            else {
335
-              OCD_TH_val++;              // normal exit to next phase
336
-              test_phase = 1;            // setup for first pass of phase 1
337
-              //DEBUG_ECHOLNPGM("LOGIC E0B - inc OCD  & go to 1");
338
-              DEBUG_ECHOLNPGM("inc OCD");
339
-            }
340
-          }
341
-          else {  // phase 0 without OCD warning - keep on decrementing if can
342
-            if (OCD_TH_val) {
343
-              OCD_TH_val--;              // try lower value
344
-              //DEBUG_ECHOLNPGM("LOGIC E0C - dec OCD");
345
-              DEBUG_ECHOLNPGM("dec OCD");
346
-            }
347
-            else {
348
-              test_phase = 2;            // at lowest value without warning so skip phase 1
349
-              //DEBUG_ECHOLNPGM("LOGIC E0D - OCD at latest - go to 2");
350
-              DEBUG_ECHOLNPGM("OCD finalized");
351
-            }
352
-          }
353
-        } break;
354
-
355
-        case 1: {
356
-          if (status_composite & sh.STATUS_AXIS_OCD) {
357
-            // phase 1 with OCD warning - increment if can
358
-            if (OCD_TH_val >= sh.AXIS_OCD_TH_MAX) {
359
-              OCD_TH_val = sh.AXIS_OCD_TH_MAX;           // limit to max
360
-              test_phase = 2;            // at highest value so go to next phase
361
-              //DEBUG_ECHOLNPGM("LOGIC E1A - OCD at max - go to 2");
362
-              DEBUG_ECHOLNPGM("OCD finalized");
363
-            }
364
-            else {
365
-              OCD_TH_val++;              // try a higher value
366
-              //DEBUG_ECHOLNPGM("LOGIC E1B - inc OCD");
367
-              DEBUG_ECHOLNPGM("inc OCD");
368
-            }
369
-          }
370
-          else { // phase 1 without OCD warning - normal exit to phase 2
371
-            test_phase = 2;
372
-            //DEBUG_ECHOLNPGM("LOGIC E1C - no OCD warning - go to 1");
373
-            DEBUG_ECHOLNPGM("OCD finalized");
374
-          }
375
-        } break;
376
-
377
-        case 2: {
378
-          if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT) {  // skip all STALL_TH steps if L6474
379
-            test_phase = 4;
380
-            break;
381
-          }
382
-          if (status_composite & (sh.STATUS_AXIS_STEP_LOSS_A | sh.STATUS_AXIS_STEP_LOSS_B)) {
383
-            // phase 2 with stall warning - time to go to next phase
384
-            if (STALL_TH_val >= 127) {
385
-              STALL_TH_val = 127;  // limit to max
386
-              //DEBUG_ECHOLNPGM("LOGIC E2A - STALL warning, STALL at max, quit");
387
-              DEBUG_ECHOLNPGM("finished - STALL at maximum value but still have stall warning");
388
-              test_phase = 4;
389
-            }
390
-            else {
391
-              test_phase = 3;              // normal exit to next phase (found failing value of STALL)
392
-              STALL_TH_val++;              // setup for first pass of phase 3
393
-              //DEBUG_ECHOLNPGM("LOGIC E2B - INC - STALL warning, inc Stall, go to 3");
394
-              DEBUG_ECHOLNPGM("inc Stall");
395
-            }
396
-          }
397
-          else {  // phase 2 without stall warning - decrement if can
398
-            if (STALL_TH_val) {
399
-              STALL_TH_val--;              // try a lower value
400
-              //DEBUG_ECHOLNPGM("LOGIC E2C - no STALL, dec STALL");
401
-              DEBUG_ECHOLNPGM("dec STALL");
402
-            }
403
-            else {
404
-              DEBUG_ECHOLNPGM("finished - STALL at lowest value but still do NOT have stall warning");
405
-              test_phase = 4;
406
-              //DEBUG_ECHOLNPGM("LOGIC E2D - no STALL, at lowest so quit");
407
-            }
408
-          }
409
-        } break;
410
-
411
-        case 3: {
412
-          if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT) {  // skip all STALL_TH steps if L6474
413
-            test_phase = 4;
414
-            break;
415
-          }
416
-          if (status_composite & (sh.STATUS_AXIS_STEP_LOSS_A | sh.STATUS_AXIS_STEP_LOSS_B)) {
417
-            // phase 3 with stall warning - increment if can
418
-            if (STALL_TH_val >= 127) {
419
-              STALL_TH_val = 127; // limit to max
420
-              DEBUG_ECHOLNPGM("finished - STALL at maximum value but still have stall warning");
421
-              test_phase = 4;
422
-              //DEBUG_ECHOLNPGM("LOGIC E3A - STALL, at max so quit");
423
-            }
424
-            else {
425
-              STALL_TH_val++;              // still looking for passing value
426
-              //DEBUG_ECHOLNPGM("LOGIC E3B - STALL, inc stall");
427
-              DEBUG_ECHOLNPGM("inc stall");
428
-            }
429
-          }
430
-          else {  //phase 3 without stall warning  but have OCD warning
431
-            DEBUG_ECHOLNPGM("Hardware problem - OCD warning without STALL warning");
432
-            test_phase = 4;
433
-            //DEBUG_ECHOLNPGM("LOGIC E3C - not STALLED, hardware problem (quit)");
434
-          }
435
-        } break;
436
-
437
-      }
438
-
439
-    }
440
-    else {
441
-      switch (test_phase) {
442
-        case 0: { // phase 0 without OCD warning - keep on decrementing if can
443
-          if (OCD_TH_val) {
444
-            OCD_TH_val--;             // try lower value
445
-            //DEBUG_ECHOLNPGM("LOGIC N0A - DEC OCD");
446
-            DEBUG_ECHOLNPGM("DEC OCD");
447
-          }
448
-          else {
449
-            test_phase = 2;           // at lowest value without warning so skip phase 1
450
-            //DEBUG_ECHOLNPGM("LOGIC N0B - OCD at lowest (go to phase 2)");
451
-            DEBUG_ECHOLNPGM("OCD finalized");
452
-          }
453
-        } break;
454
-
455
-        case 1: //DEBUG_ECHOLNPGM("LOGIC N1 (go directly to 2)"); // phase 1 without OCD warning - drop directly to phase 2
456
-                DEBUG_ECHOLNPGM("OCD finalized");
457
-
458
-        case 2: { // phase 2 without stall warning - keep on decrementing if can
459
-          if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT) {  // skip all STALL_TH steps if L6474
460
-            test_phase = 4;
461
-            break;
462
-          }
463
-          if (STALL_TH_val) {
464
-            STALL_TH_val--;              // try a lower value (stay in phase 2)
465
-            //DEBUG_ECHOLNPGM("LOGIC N2B - dec STALL");
466
-            DEBUG_ECHOLNPGM("dec STALL");
467
-          }
468
-          else {
469
-            DEBUG_ECHOLNPGM("finished - STALL at lowest value but still no stall warning");
470
-            test_phase = 4;
471
-            //DEBUG_ECHOLNPGM("LOGIC N2C - STALL at lowest (quit)");
472
-          }
473
-        } break;
474
-
475
-        case 3: {
476
-          if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT) {  // skip all STALL_TH steps if L6474
477
-            test_phase = 4;
478
-            break;
479
-          }
480
-          test_phase = 4;
481
-           //DEBUG_ECHOLNPGM("LOGIC N3 - finished!");
482
-           DEBUG_ECHOLNPGM("finished!");
483
-        } break;  // phase 3 without any warnings - desired exit
484
-      }  //
485
-    }  // end of status checks
486
-
487
-    if (test_phase != 4) {
488
-      for (j = 0; j < driver_count; j++) {                       // update threshold(s)
489
-        L64xxManager.set_param(axis_index[j], L6470_OCD_TH, OCD_TH_val);
490
-        if (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT) L64xxManager.set_param(axis_index[j], L6470_STALL_TH, STALL_TH_val);
491
-        if (L64xxManager.get_param(axis_index[j], L6470_OCD_TH) != OCD_TH_val) DEBUG_ECHOLNPGM("OCD mismatch");
492
-        if ((L64xxManager.get_param(axis_index[j], L6470_STALL_TH) != STALL_TH_val) && (sh.STATUS_AXIS_LAYOUT != L6474_STATUS_LAYOUT)) DEBUG_ECHOLNPGM("STALL mismatch");
493
-      }
494
-    }
495
-
496
-  } while (test_phase != 4);
497
-
498
-  DEBUG_ECHOLNPGM(".");
499
-  if (status_composite) {
500
-    #if ENABLED(L6470_CHITCHAT)
501
-      for (j = 0; j < driver_count; j++) {
502
-        if (j) DEBUG_ECHOPGM("...");
503
-        L64xxManager.error_status_decode(axis_status[j], axis_index[j],
504
-          sh.STATUS_AXIS_TH_SD, sh.STATUS_AXIS_TH_WRN,
505
-          sh.STATUS_AXIS_STEP_LOSS_A, sh.STATUS_AXIS_STEP_LOSS_B,
506
-          sh.STATUS_AXIS_OCD, sh.STATUS_AXIS_LAYOUT);
507
-      }
508
-      DEBUG_ECHOLNPGM(".");
509
-    #endif
510
-    DEBUG_ECHOLNPGM("Completed with errors");
511
-  }
512
-  else
513
-    DEBUG_ECHOLNPGM("Completed with no errors");
514
-  DEBUG_ECHOLNPGM(".");
515
-
516
-  L64xxManager.pause_monitor(false);
517
-}
518
-
519
-/**
520
- * M918: increase speed until error or max feedrate achieved (as shown in configuration.h))
521
- *
522
- * J - select which driver(s) to monitor on multi-driver axis
523
- *     0 - (default) monitor all drivers on the axis or E0
524
- *     1 - monitor only X, Y, Z, E1
525
- *     2 - monitor only X2, Y2, Z2, E2
526
- * Xxxx, Yxxx, Zxxx, Exxx - axis to be monitored with displacement
527
- *     xxx (1-255) is distance moved on either side of current position
528
- *
529
- * I - over current threshold
530
- *     optional - will report current value from driver if not specified
531
- *
532
- * T - current (mA) setting for TVAL (0 - 4A in 31.25mA increments, rounds down) - L6474 only
533
- *     optional - will report current value from driver if not specified
534
- *
535
- * K - value for KVAL_HOLD (0 - 255) (ignored for L6474)
536
- *     optional - will report current value from driver if not specified
537
- *
538
- * M - value for microsteps (1 - 128) (optional)
539
- *     optional - will report current value from driver if not specified
540
- */
541
-void GcodeSuite::M918() {
542
-
543
-  DEBUG_ECHOLNPGM("M918");
544
-
545
-  L64xxManager.pause_monitor(true); // Keep monitor_driver() from stealing status
546
-
547
-  char axis_mon[3][3] = { {"  "}, {"  "}, {"  "} };   // list of Axes to be monitored
548
-  L64XX_axis_t axis_index[3];
549
-  uint16_t axis_status[3];
550
-  uint8_t driver_count = 1;
551
-  float position_max, position_min;
552
-  float final_feedrate;
553
-  uint8_t kval_hold;
554
-  uint8_t OCD_TH_val = 0;
555
-  uint8_t STALL_TH_val = 0;
556
-  uint16_t over_current_threshold;
557
-  constexpr uint8_t over_current_flag = true;
558
-
559
-  const L64XX_Marlin::L64XX_shadow_t &sh = L64xxManager.shadow;
560
-
561
-  uint8_t j;   // general purpose counter
562
-
563
-  if (L64xxManager.get_user_input(driver_count, axis_index, axis_mon, position_max, position_min, final_feedrate, kval_hold, over_current_flag, OCD_TH_val, STALL_TH_val, over_current_threshold))
564
-    return;  // quit if invalid user input
565
-
566
-  L64xxManager.get_status(axis_index[0]); // populate shadow array
567
-
568
-  uint8_t m_steps = parser.byteval('M');
569
-
570
-  if (m_steps != 0) {
571
-    LIMIT(m_steps, 1, sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT ? 16 : 128);  // L6474
572
-
573
-    uint8_t stepVal;
574
-    for (stepVal = 0; stepVal < 8; stepVal++) {  // convert to L64xx register value
575
-      if (m_steps == 1) break;
576
-      m_steps >>= 1;
577
-    }
578
-
579
-    if (sh.STATUS_AXIS_LAYOUT == L6474_STATUS_LAYOUT)
580
-      stepVal |= 0x98;  // NO SYNC
581
-    else
582
-      stepVal |= (!SYNC_EN) | SYNC_SEL_1 | stepVal;
583
-
584
-    for (j = 0; j < driver_count; j++) {
585
-      L64xxManager.set_param(axis_index[j], dSPIN_HARD_HIZ, 0);          // can't write STEP register if stepper being powered
586
-                                                                         //   results in an extra NOOP being sent (data 00)
587
-      L64xxManager.set_param(axis_index[j], L6470_STEP_MODE, stepVal);   // set microsteps
588
-    }
589
-  }
590
-  m_steps = L64xxManager.get_param(axis_index[0], L6470_STEP_MODE) & 0x07;   // get microsteps
591
-
592
-  DEBUG_ECHOLNPGM("Microsteps = ", _BV(m_steps));
593
-  DEBUG_ECHOLNPGM("target (maximum) feedrate = ", final_feedrate);
594
-
595
-  const float feedrate_inc = final_feedrate / 10,   // Start at 1/10 of max & go up by 1/10 per step
596
-              fr_limit = final_feedrate * 0.99f;    // Rounding-safe comparison value
597
-  float current_feedrate = 0;
598
-
599
-  planner.synchronize();                            // Wait for moves to complete
600
-
601
-  for (j = 0; j < driver_count; j++)
602
-    L64xxManager.get_status(axis_index[j]);         // Clear error flags
603
-
604
-  char temp_axis_string[2] = " ";
605
-  temp_axis_string[0] = axis_mon[0][0];             // Need a sprintf format string
606
-  //temp_axis_string[1] = '\n';
607
-
608
-  char gcode_string[80];
609
-  uint16_t status_composite = 0;
610
-  DEBUG_ECHOLNPGM(".\n.\n.");                       // Make feedrate outputs easier to read
611
-
612
-  do {
613
-    current_feedrate += feedrate_inc;
614
-    DEBUG_ECHOLNPGM("...feedrate = ", current_feedrate);
615
-
616
-    sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_min), uint16_t(current_feedrate));
617
-    process_subcommands_now(gcode_string);
618
-
619
-    sprintf_P(gcode_string, PSTR("G0 %s%03d F%03d"), temp_axis_string, uint16_t(position_max), uint16_t(current_feedrate));
620
-    process_subcommands_now(gcode_string);
621
-
622
-    planner.synchronize();
623
-
624
-    for (j = 0; j < driver_count; j++) {
625
-      axis_status[j] = (~L64xxManager.get_status(axis_index[j])) & 0x0800;  // Bits of interest are all active LOW
626
-      status_composite |= axis_status[j];
627
-    }
628
-    if (status_composite) break;              // Break on any error
629
-  } while (current_feedrate < fr_limit);
630
-
631
-  DEBUG_ECHOPGM("Completed with ");
632
-  if (status_composite) {
633
-    DEBUG_ECHOLNPGM("errors");
634
-    #if ENABLED(L6470_CHITCHAT)
635
-      for (j = 0; j < driver_count; j++) {
636
-        if (j) DEBUG_ECHOPGM("...");
637
-        L64xxManager.error_status_decode(axis_status[j], axis_index[j],
638
-          sh.STATUS_AXIS_TH_SD, sh.STATUS_AXIS_TH_WRN,
639
-          sh.STATUS_AXIS_STEP_LOSS_A, sh.STATUS_AXIS_STEP_LOSS_B,
640
-          sh.STATUS_AXIS_OCD, sh.STATUS_AXIS_LAYOUT);
641
-      }
642
-    #endif
643
-  }
644
-  else
645
-    DEBUG_ECHOLNPGM("no errors");
646
-
647
-  L64xxManager.pause_monitor(false);
648
-}
649
-
650
-#endif // HAS_L64XX

+ 0
- 8
Marlin/src/gcode/gcode.cpp View File

@@ -1005,14 +1005,6 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
1005 1005
         case 919: M919(); break;                                  // M919: Set stepper Chopper Times
1006 1006
       #endif
1007 1007
 
1008
-      #if HAS_L64XX
1009
-        case 122: M122(); break;                                   // M122: Report status
1010
-        case 906: M906(); break;                                   // M906: Set or get motor drive level
1011
-        case 916: M916(); break;                                   // M916: L6470 tuning: Increase drive level until thermal warning
1012
-        case 917: M917(); break;                                   // M917: L6470 tuning: Find minimum current thresholds
1013
-        case 918: M918(); break;                                   // M918: L6470 tuning: Increase speed until max or error
1014
-      #endif
1015
-
1016 1008
       #if HAS_MICROSTEPS
1017 1009
         case 350: M350(); break;                                  // M350: Set microstepping mode. Warning: Steps per unit remains unchanged. S code sets stepping mode for all drivers.
1018 1010
         case 351: M351(); break;                                  // M351: Toggle MS1 MS2 pins directly, S# determines MS1 or MS2, X# sets the pin high/low.

+ 2
- 13
Marlin/src/gcode/gcode.h View File

@@ -155,7 +155,7 @@
155 155
  * M120 - Enable endstops detection.
156 156
  * M121 - Disable endstops detection.
157 157
  *
158
- * M122 - Debug stepper (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660 or L6470)
158
+ * M122 - Debug stepper (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
159 159
  * M123 - Report fan tachometers. (Requires En_FAN_TACHO_PIN) Optionally set auto-report interval. (Requires AUTO_REPORT_FANS)
160 160
  * M125 - Save current position and move to filament change position. (Requires PARK_HEAD_ON_PAUSE)
161 161
  *
@@ -286,7 +286,7 @@
286 286
  * M871 - Print/reset/clear first layer temperature offset values. (Requires PTC_PROBE, PTC_BED, or PTC_HOTEND)
287 287
  * M876 - Handle Prompt Response. (Requires HOST_PROMPT_SUPPORT and not EMERGENCY_PARSER)
288 288
  * M900 - Get or Set Linear Advance K-factor. (Requires LIN_ADVANCE)
289
- * M906 - Set or get motor current in milliamps using axis codes XYZE, etc. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660 or L6470)
289
+ * M906 - Set or get motor current in milliamps using axis codes XYZE, etc. Report values if no axis codes given. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
290 290
  * M907 - Set digital trimpot motor current using axis codes. (Requires a board with digital trimpots)
291 291
  * M908 - Control digital trimpot directly. (Requires HAS_MOTOR_CURRENT_DAC or DIGIPOTSS_PIN)
292 292
  * M909 - Print digipot/DAC current value. (Requires HAS_MOTOR_CURRENT_DAC)
@@ -295,9 +295,6 @@
295 295
  * M912 - Clear stepper driver overtemperature pre-warn condition flag. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
296 296
  * M913 - Set HYBRID_THRESHOLD speed. (Requires HYBRID_THRESHOLD)
297 297
  * M914 - Set StallGuard sensitivity. (Requires SENSORLESS_HOMING or SENSORLESS_PROBING)
298
- * M916 - L6470 tuning: Increase KVAL_HOLD until thermal warning. (Requires at least one _DRIVER_TYPE L6470)
299
- * M917 - L6470 tuning: Find minimum current thresholds. (Requires at least one _DRIVER_TYPE L6470)
300
- * M918 - L6470 tuning: Increase speed until max or error. (Requires at least one _DRIVER_TYPE L6470)
301 298
  * M919 - Get or Set motor Chopper Times (time_off, hysteresis_end, hysteresis_start) using axis codes XYZE, etc. If no parameters are given, report. (Requires at least one _DRIVER_TYPE defined as TMC2130/2160/5130/5160/2208/2209/2660)
302 299
  * M951 - Set Magnetic Parking Extruder parameters. (Requires MAGNETIC_PARKING_EXTRUDER)
303 300
  * M3426 - Read MCP3426 ADC over I2C. (Requires HAS_MCP3426_ADC)
@@ -1163,14 +1160,6 @@ private:
1163 1160
     static void M919();
1164 1161
   #endif
1165 1162
 
1166
-  #if HAS_L64XX
1167
-    static void M122();
1168
-    static void M906();
1169
-    static void M916();
1170
-    static void M917();
1171
-    static void M918();
1172
-  #endif
1173
-
1174 1163
   #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM || HAS_MOTOR_CURRENT_I2C || HAS_MOTOR_CURRENT_DAC
1175 1164
     static void M907();
1176 1165
     #if HAS_MOTOR_CURRENT_SPI || HAS_MOTOR_CURRENT_PWM

+ 0
- 89
Marlin/src/gcode/host/M114.cpp View File

@@ -28,12 +28,6 @@
28 28
 
29 29
 #if ENABLED(M114_DETAIL)
30 30
 
31
-  #if HAS_L64XX
32
-    #include "../../libs/L64XX/L64XX_Marlin.h"
33
-    #define DEBUG_OUT ENABLED(L6470_CHITCHAT)
34
-    #include "../../core/debug_out.h"
35
-  #endif
36
-
37 31
   void report_all_axis_pos(const xyze_pos_t &pos, const uint8_t n=LOGICAL_AXES, const uint8_t precision=3) {
38 32
     char str[12];
39 33
     LOOP_L_N(a, n) {
@@ -84,89 +78,6 @@
84 78
 
85 79
     planner.synchronize();
86 80
 
87
-    #if HAS_L64XX
88
-      char temp_buf[80];
89
-      int32_t temp;
90
-      //#define ABS_POS_SIGN_MASK 0b1111 1111 1110 0000 0000 0000 0000 0000
91
-      #define ABS_POS_SIGN_MASK 0b11111111111000000000000000000000
92
-      #define REPORT_ABSOLUTE_POS(Q) do{                            \
93
-          L64xxManager.say_axis(Q, false);                          \
94
-          temp = L6470_GETPARAM(L6470_ABS_POS,Q);                   \
95
-          if (temp & ABS_POS_SIGN_MASK) temp |= ABS_POS_SIGN_MASK;  \
96
-          sprintf_P(temp_buf, PSTR(":%8ld   "), temp);              \
97
-          DEBUG_ECHO(temp_buf);                                     \
98
-        }while(0)
99
-
100
-      DEBUG_ECHOPGM("\nL6470:");
101
-      #if AXIS_IS_L64XX(X)
102
-        REPORT_ABSOLUTE_POS(X);
103
-      #endif
104
-      #if AXIS_IS_L64XX(X2)
105
-        REPORT_ABSOLUTE_POS(X2);
106
-      #endif
107
-      #if AXIS_IS_L64XX(Y)
108
-        REPORT_ABSOLUTE_POS(Y);
109
-      #endif
110
-      #if AXIS_IS_L64XX(Y2)
111
-        REPORT_ABSOLUTE_POS(Y2);
112
-      #endif
113
-      #if AXIS_IS_L64XX(Z)
114
-        REPORT_ABSOLUTE_POS(Z);
115
-      #endif
116
-      #if AXIS_IS_L64XX(Z2)
117
-        REPORT_ABSOLUTE_POS(Z2);
118
-      #endif
119
-      #if AXIS_IS_L64XX(Z3)
120
-        REPORT_ABSOLUTE_POS(Z3);
121
-      #endif
122
-      #if AXIS_IS_L64XX(Z4)
123
-        REPORT_ABSOLUTE_POS(Z4);
124
-      #endif
125
-      #if AXIS_IS_L64XX(I)
126
-        REPORT_ABSOLUTE_POS(I);
127
-      #endif
128
-      #if AXIS_IS_L64XX(J)
129
-        REPORT_ABSOLUTE_POS(J);
130
-      #endif
131
-      #if AXIS_IS_L64XX(K)
132
-        REPORT_ABSOLUTE_POS(K);
133
-      #endif
134
-      #if AXIS_IS_L64XX(U)
135
-        REPORT_ABSOLUTE_POS(U);
136
-      #endif
137
-      #if AXIS_IS_L64XX(V)
138
-        REPORT_ABSOLUTE_POS(V);
139
-      #endif
140
-      #if AXIS_IS_L64XX(W)
141
-        REPORT_ABSOLUTE_POS(W);
142
-      #endif
143
-      #if AXIS_IS_L64XX(E0)
144
-        REPORT_ABSOLUTE_POS(E0);
145
-      #endif
146
-      #if AXIS_IS_L64XX(E1)
147
-        REPORT_ABSOLUTE_POS(E1);
148
-      #endif
149
-      #if AXIS_IS_L64XX(E2)
150
-        REPORT_ABSOLUTE_POS(E2);
151
-      #endif
152
-      #if AXIS_IS_L64XX(E3)
153
-        REPORT_ABSOLUTE_POS(E3);
154
-      #endif
155
-      #if AXIS_IS_L64XX(E4)
156
-        REPORT_ABSOLUTE_POS(E4);
157
-      #endif
158
-      #if AXIS_IS_L64XX(E5)
159
-        REPORT_ABSOLUTE_POS(E5);
160
-      #endif
161
-      #if AXIS_IS_L64XX(E6)
162
-        REPORT_ABSOLUTE_POS(E6);
163
-      #endif
164
-      #if AXIS_IS_L64XX(E7)
165
-        REPORT_ABSOLUTE_POS(E7);
166
-      #endif
167
-      SERIAL_EOL();
168
-    #endif // HAS_L64XX
169
-
170 81
     SERIAL_ECHOPGM("Stepper:");
171 82
     LOOP_LOGICAL_AXES(i) {
172 83
       SERIAL_ECHOPGM_P((PGM_P)pgm_read_ptr(&SP_AXIS_LBL[i]), stepper.position((AxisEnum)i));

+ 21
- 21
Marlin/src/inc/Conditionals_post.h View File

@@ -1610,7 +1610,7 @@
1610 1610
   #define HAS_X_MS_PINS 1
1611 1611
 #endif
1612 1612
 
1613
-#if PIN_EXISTS(X2_ENABLE) || AXIS_IS_L64XX(X2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))
1613
+#if PIN_EXISTS(X2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(X2))
1614 1614
   #define HAS_X2_ENABLE 1
1615 1615
 #endif
1616 1616
 #if PIN_EXISTS(X2_DIR)
@@ -1631,7 +1631,7 @@
1631 1631
 #endif
1632 1632
 
1633 1633
 #if HAS_Y_AXIS
1634
-  #if PIN_EXISTS(Y_ENABLE) || AXIS_IS_L64XX(Y) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
1634
+  #if PIN_EXISTS(Y_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y))
1635 1635
     #define HAS_Y_ENABLE 1
1636 1636
   #endif
1637 1637
   #if PIN_EXISTS(Y_DIR)
@@ -1644,7 +1644,7 @@
1644 1644
     #define HAS_Y_MS_PINS 1
1645 1645
   #endif
1646 1646
 
1647
-  #if PIN_EXISTS(Y2_ENABLE) || AXIS_IS_L64XX(Y2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))
1647
+  #if PIN_EXISTS(Y2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Y2))
1648 1648
     #define HAS_Y2_ENABLE 1
1649 1649
   #endif
1650 1650
   #if PIN_EXISTS(Y2_DIR)
@@ -1664,7 +1664,7 @@
1664 1664
 #endif
1665 1665
 
1666 1666
 #if HAS_Z_AXIS
1667
-  #if PIN_EXISTS(Z_ENABLE) || AXIS_IS_L64XX(Z) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))
1667
+  #if PIN_EXISTS(Z_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z))
1668 1668
     #define HAS_Z_ENABLE 1
1669 1669
   #endif
1670 1670
   #if PIN_EXISTS(Z_DIR)
@@ -1684,7 +1684,7 @@
1684 1684
 #endif
1685 1685
 
1686 1686
 #if NUM_Z_STEPPERS >= 2
1687
-  #if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
1687
+  #if PIN_EXISTS(Z2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
1688 1688
     #define HAS_Z2_ENABLE 1
1689 1689
   #endif
1690 1690
   #if PIN_EXISTS(Z2_DIR)
@@ -1699,7 +1699,7 @@
1699 1699
 #endif
1700 1700
 
1701 1701
 #if NUM_Z_STEPPERS >= 3
1702
-  #if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
1702
+  #if PIN_EXISTS(Z3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
1703 1703
     #define HAS_Z3_ENABLE 1
1704 1704
   #endif
1705 1705
   #if PIN_EXISTS(Z3_DIR)
@@ -1714,7 +1714,7 @@
1714 1714
 #endif
1715 1715
 
1716 1716
 #if NUM_Z_STEPPERS >= 4
1717
-  #if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
1717
+  #if PIN_EXISTS(Z4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
1718 1718
     #define HAS_Z4_ENABLE 1
1719 1719
   #endif
1720 1720
   #if PIN_EXISTS(Z4_DIR)
@@ -1729,7 +1729,7 @@
1729 1729
 #endif
1730 1730
 
1731 1731
 #if HAS_I_AXIS
1732
-  #if PIN_EXISTS(I_ENABLE) || AXIS_IS_L64XX(I) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(I))
1732
+  #if PIN_EXISTS(I_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(I))
1733 1733
     #define HAS_I_ENABLE 1
1734 1734
   #endif
1735 1735
   #if PIN_EXISTS(I_DIR)
@@ -1749,7 +1749,7 @@
1749 1749
 #endif
1750 1750
 
1751 1751
 #if HAS_J_AXIS
1752
-  #if PIN_EXISTS(J_ENABLE) || AXIS_IS_L64XX(J) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(J))
1752
+  #if PIN_EXISTS(J_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(J))
1753 1753
     #define HAS_J_ENABLE 1
1754 1754
   #endif
1755 1755
   #if PIN_EXISTS(J_DIR)
@@ -1769,7 +1769,7 @@
1769 1769
 #endif
1770 1770
 
1771 1771
 #if HAS_K_AXIS
1772
-  #if PIN_EXISTS(K_ENABLE) || AXIS_IS_L64XX(K) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(K))
1772
+  #if PIN_EXISTS(K_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(K))
1773 1773
     #define HAS_K_ENABLE 1
1774 1774
   #endif
1775 1775
   #if PIN_EXISTS(K_DIR)
@@ -1789,7 +1789,7 @@
1789 1789
 #endif
1790 1790
 
1791 1791
 #if HAS_U_AXIS
1792
-  #if PIN_EXISTS(U_ENABLE) || AXIS_IS_L64XX(U) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(U))
1792
+  #if PIN_EXISTS(U_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(U))
1793 1793
     #define HAS_U_ENABLE 1
1794 1794
   #endif
1795 1795
   #if PIN_EXISTS(U_DIR)
@@ -1809,7 +1809,7 @@
1809 1809
 #endif
1810 1810
 
1811 1811
 #if HAS_V_AXIS
1812
-  #if PIN_EXISTS(V_ENABLE) || AXIS_IS_L64XX(V) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(V))
1812
+  #if PIN_EXISTS(V_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(V))
1813 1813
     #define HAS_V_ENABLE 1
1814 1814
   #endif
1815 1815
   #if PIN_EXISTS(V_DIR)
@@ -1829,7 +1829,7 @@
1829 1829
 #endif
1830 1830
 
1831 1831
 #if HAS_W_AXIS
1832
-  #if PIN_EXISTS(W_ENABLE) || AXIS_IS_L64XX(W) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(W))
1832
+  #if PIN_EXISTS(W_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(W))
1833 1833
     #define HAS_W_ENABLE 1
1834 1834
   #endif
1835 1835
   #if PIN_EXISTS(W_DIR)
@@ -1851,7 +1851,7 @@
1851 1851
 // Extruder steppers and solenoids
1852 1852
 #if HAS_EXTRUDERS
1853 1853
 
1854
-  #if PIN_EXISTS(E0_ENABLE) || AXIS_IS_L64XX(E0) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))
1854
+  #if PIN_EXISTS(E0_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E0))
1855 1855
     #define HAS_E0_ENABLE 1
1856 1856
   #endif
1857 1857
   #if PIN_EXISTS(E0_DIR)
@@ -1865,7 +1865,7 @@
1865 1865
   #endif
1866 1866
 
1867 1867
   #if E_STEPPERS > 1 || ENABLED(E_DUAL_STEPPER_DRIVERS)
1868
-    #if PIN_EXISTS(E1_ENABLE) || AXIS_IS_L64XX(E1) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
1868
+    #if PIN_EXISTS(E1_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E1))
1869 1869
       #define HAS_E1_ENABLE 1
1870 1870
     #endif
1871 1871
     #if PIN_EXISTS(E1_DIR)
@@ -1880,7 +1880,7 @@
1880 1880
   #endif
1881 1881
 
1882 1882
   #if E_STEPPERS > 2
1883
-    #if PIN_EXISTS(E2_ENABLE) || AXIS_IS_L64XX(E2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))
1883
+    #if PIN_EXISTS(E2_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E2))
1884 1884
       #define HAS_E2_ENABLE 1
1885 1885
     #endif
1886 1886
     #if PIN_EXISTS(E2_DIR)
@@ -1895,7 +1895,7 @@
1895 1895
   #endif
1896 1896
 
1897 1897
   #if E_STEPPERS > 3
1898
-    #if PIN_EXISTS(E3_ENABLE) || AXIS_IS_L64XX(E3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))
1898
+    #if PIN_EXISTS(E3_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E3))
1899 1899
       #define HAS_E3_ENABLE 1
1900 1900
     #endif
1901 1901
     #if PIN_EXISTS(E3_DIR)
@@ -1910,7 +1910,7 @@
1910 1910
   #endif
1911 1911
 
1912 1912
   #if E_STEPPERS > 4
1913
-    #if PIN_EXISTS(E4_ENABLE) || AXIS_IS_L64XX(E4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))
1913
+    #if PIN_EXISTS(E4_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E4))
1914 1914
       #define HAS_E4_ENABLE 1
1915 1915
     #endif
1916 1916
     #if PIN_EXISTS(E4_DIR)
@@ -1925,7 +1925,7 @@
1925 1925
   #endif
1926 1926
 
1927 1927
   #if E_STEPPERS > 5
1928
-    #if PIN_EXISTS(E5_ENABLE) || AXIS_IS_L64XX(E5) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))
1928
+    #if PIN_EXISTS(E5_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E5))
1929 1929
       #define HAS_E5_ENABLE 1
1930 1930
     #endif
1931 1931
     #if PIN_EXISTS(E5_DIR)
@@ -1940,7 +1940,7 @@
1940 1940
   #endif
1941 1941
 
1942 1942
   #if E_STEPPERS > 6
1943
-    #if PIN_EXISTS(E6_ENABLE) || AXIS_IS_L64XX(E6) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))
1943
+    #if PIN_EXISTS(E6_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E6))
1944 1944
       #define HAS_E6_ENABLE 1
1945 1945
     #endif
1946 1946
     #if PIN_EXISTS(E6_DIR)
@@ -1955,7 +1955,7 @@
1955 1955
   #endif
1956 1956
 
1957 1957
   #if E_STEPPERS > 7
1958
-    #if PIN_EXISTS(E7_ENABLE) || AXIS_IS_L64XX(E7) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))
1958
+    #if PIN_EXISTS(E7_ENABLE) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(E7))
1959 1959
       #define HAS_E7_ENABLE 1
1960 1960
     #endif
1961 1961
     #if PIN_EXISTS(E7_DIR)

+ 22
- 12
Marlin/src/inc/SanityCheck.h View File

@@ -350,7 +350,7 @@
350 350
 #elif defined(HAVE_TMC2208)
351 351
   #error "HAVE_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208."
352 352
 #elif defined(HAVE_L6470DRIVER)
353
-  #error "HAVE_L6470DRIVER is now [AXIS]_DRIVER_TYPE L6470."
353
+  #error "HAVE_L6470DRIVER is obsolete. L64xx stepper drivers are no longer supported in Marlin."
354 354
 #elif defined(X_IS_TMC) || defined(X2_IS_TMC) || defined(Y_IS_TMC) || defined(Y2_IS_TMC) || defined(Z_IS_TMC) || defined(Z2_IS_TMC) || defined(Z3_IS_TMC) \
355 355
    || defined(E0_IS_TMC) || defined(E1_IS_TMC) || defined(E2_IS_TMC) || defined(E3_IS_TMC) || defined(E4_IS_TMC) || defined(E5_IS_TMC) || defined(E6_IS_TMC) || defined(E7_IS_TMC)
356 356
   #error "[AXIS]_IS_TMC is now [AXIS]_DRIVER_TYPE TMC26X."
@@ -363,9 +363,6 @@
363 363
 #elif defined(X_IS_TMC2208) || defined(X2_IS_TMC2208) || defined(Y_IS_TMC2208) || defined(Y2_IS_TMC2208) || defined(Z_IS_TMC2208) || defined(Z2_IS_TMC2208) || defined(Z3_IS_TMC2208) \
364 364
    || defined(E0_IS_TMC2208) || defined(E1_IS_TMC2208) || defined(E2_IS_TMC2208) || defined(E3_IS_TMC2208) || defined(E4_IS_TMC2208) || defined(E5_IS_TMC2208) || defined(E6_IS_TMC2208) || defined(E7_IS_TMC2208)
365 365
   #error "[AXIS]_IS_TMC2208 is now [AXIS]_DRIVER_TYPE TMC2208."
366
-#elif defined(X_IS_L6470) || defined(X2_IS_L6470) || defined(Y_IS_L6470) || defined(Y2_IS_L6470) || defined(Z_IS_L6470) || defined(Z2_IS_L6470) || defined(Z3_IS_L6470) \
367
-   || defined(E0_IS_L6470) || defined(E1_IS_L6470) || defined(E2_IS_L6470) || defined(E3_IS_L6470) || defined(E4_IS_L6470) || defined(E5_IS_L6470) || defined(E6_IS_L6470) || defined(E7_IS_L6470)
368
-  #error "[AXIS]_IS_L6470 is now [AXIS]_DRIVER_TYPE L6470."
369 366
 #elif defined(AUTOMATIC_CURRENT_CONTROL)
370 367
   #error "AUTOMATIC_CURRENT_CONTROL is now MONITOR_DRIVER_STATUS."
371 368
 #elif defined(FILAMENT_CHANGE_LOAD_LENGTH)
@@ -647,6 +644,26 @@
647 644
   #error "LEVEL_CENTER_TOO is now BED_TRAMMING_INCLUDE_CENTER."
648 645
 #endif
649 646
 
647
+// L64xx stepper drivers have been removed
648
+#define _L6470              0x6470
649
+#define _L6474              0x6474
650
+#define _L6480              0x6480
651
+#define _POWERSTEP01        0xF00D
652
+#if HAS_DRIVER(L6470)
653
+  #error "L6470 stepper drivers are no longer supported in Marlin."
654
+#elif HAS_DRIVER(L6474)
655
+  #error "L6474 stepper drivers are no longer supported in Marlin."
656
+#elif HAS_DRIVER(L6480)
657
+  #error "L6480 stepper drivers are no longer supported in Marlin."
658
+#elif HAS_DRIVER(POWERSTEP01)
659
+  #error "POWERSTEP01 stepper drivers are no longer supported in Marlin."
660
+#endif
661
+#undef _L6470
662
+#undef _L6474
663
+#undef _L6480
664
+#undef _POWERSTEP01
665
+
666
+// Check AXIS_RELATIVE_MODES
650 667
 constexpr float arm[] = AXIS_RELATIVE_MODES;
651 668
 static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _LOGICAL_AXES_STR "elements.");
652 669
 
@@ -3533,7 +3550,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
3533 3550
 /**
3534 3551
  * TMC SPI Chaining
3535 3552
  */
3536
-#define IN_CHAIN(A) ((A##_CHAIN_POS > 0) && !HAS_L64XX)
3553
+#define IN_CHAIN(A) A##_CHAIN_POS > 0
3537 3554
 #if  IN_CHAIN(X ) || IN_CHAIN(Y ) || IN_CHAIN(Z ) || IN_CHAIN(X2) || IN_CHAIN(Y2) || IN_CHAIN(Z2) || IN_CHAIN(Z3) || IN_CHAIN(Z4) \
3538 3555
   || IN_CHAIN(E0) || IN_CHAIN(E1) || IN_CHAIN(E2) || IN_CHAIN(E3) || IN_CHAIN(E4) || IN_CHAIN(E5) || IN_CHAIN(E6) || IN_CHAIN(E7)
3539 3556
   #define BAD_CHAIN(A) (IN_CHAIN(A) && !PIN_EXISTS(A##_CS))
@@ -3599,13 +3616,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
3599 3616
 #undef IN_CHAIN
3600 3617
 
3601 3618
 /**
3602
- * L64XX requirement
3603
- */
3604
-#if HAS_L64XX && NUM_AXES > 3
3605
-  #error "L64XX requires NUM_AXES <= 3. Homing with L64XX is not yet implemented for NUM_AXES > 3."
3606
-#endif
3607
-
3608
-/**
3609 3619
  * Digipot requirement
3610 3620
  */
3611 3621
 #if HAS_MOTOR_CURRENT_I2C

+ 0
- 998
Marlin/src/libs/L64XX/L64XX_Marlin.cpp
File diff suppressed because it is too large
View File


+ 0
- 141
Marlin/src/libs/L64XX/L64XX_Marlin.h View File

@@ -1,141 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-#include "../../inc/MarlinConfig.h"
25
-
26
-#include <L6470.h>
27
-#if !(L6470_LIBRARY_VERSION >= 0x000800)
28
-  #error 'L6470_LIBRARY_VERSION 0x000800 or later required'
29
-#endif
30
-
31
-#define L6470_GETPARAM(P,Q) stepper##Q.GetParam(P)
32
-
33
-#define dSPIN_STEP_CLOCK      0x58
34
-#define dSPIN_STEP_CLOCK_FWD dSPIN_STEP_CLOCK
35
-#define dSPIN_STEP_CLOCK_REV dSPIN_STEP_CLOCK+1
36
-#define HAS_L64XX_EXTRUDER (AXIS_IS_L64XX(E0) || AXIS_IS_L64XX(E1) || AXIS_IS_L64XX(E2) || AXIS_IS_L64XX(E3) || AXIS_IS_L64XX(E4) || AXIS_IS_L64XX(E5) || AXIS_IS_L64XX(E6) || AXIS_IS_L64XX(E7))
37
-
38
-#define _EN_ITEM(N) , E##N
39
-enum L64XX_axis_t : uint8_t { MAIN_AXIS_NAMES, X2, Y2, Z2, Z3, Z4 REPEAT(E_STEPPERS, _EN_ITEM), MAX_L64XX };
40
-#undef _EN_ITEM
41
-
42
-class L64XX_Marlin : public L64XXHelper {
43
-public:
44
-  static PGM_P const index_to_axis[MAX_L64XX];
45
-
46
-  static const uint8_t index_to_dir[MAX_L64XX];
47
-
48
-  static uint8_t dir_commands[MAX_L64XX];
49
-
50
-  // Flags to guarantee graceful switch if stepper interrupts L6470 SPI transfer
51
-  static volatile uint8_t spi_abort;
52
-  static uint8_t spi_active;
53
-
54
-  L64XX_Marlin() {}
55
-
56
-  static void init();
57
-  static void init_to_defaults();
58
-
59
-  static uint16_t get_stepper_status(L64XX &st);
60
-
61
-  static uint16_t get_status(const L64XX_axis_t axis);
62
-
63
-  static uint32_t get_param(const L64XX_axis_t axis, const uint8_t param);
64
-
65
-  static void set_param(const L64XX_axis_t axis, const uint8_t param, const uint32_t value);
66
-
67
-  //static void send_command(const L64XX_axis_t axis, uint8_t command);
68
-
69
-  static uint8_t get_user_input(uint8_t &driver_count, L64XX_axis_t axis_index[3], char axis_mon[3][3],
70
-                            float &position_max, float &position_min, float &final_feedrate, uint8_t &kval_hold,
71
-                            uint8_t over_current_flag, uint8_t &OCD_TH_val, uint8_t &STALL_TH_val, uint16_t &over_current_threshold);
72
-
73
-  static void transfer(uint8_t L6470_buf[], const uint8_t length);
74
-
75
-  static void say_axis(const L64XX_axis_t axis, const uint8_t label=true);
76
-  #if ENABLED(L6470_CHITCHAT)
77
-    static void error_status_decode(
78
-      const uint16_t status, const L64XX_axis_t axis,
79
-      const uint16_t _status_axis_th_sd, const uint16_t _status_axis_th_wrn,
80
-      const uint16_t _status_axis_step_loss_a, const uint16_t _status_axis_step_loss_b,
81
-      const uint16_t _status_axis_ocd, const uint8_t _status_axis_layout
82
-    );
83
-  #else
84
-    FORCE_INLINE static void error_status_decode(
85
-      const uint16_t, const L64XX_axis_t,
86
-      const uint16_t, const uint16_t,
87
-      const uint16_t, const uint16_t,
88
-      const uint16_t, const uint8_t
89
-    ){}
90
-  #endif
91
-
92
-  // ~40 bytes SRAM to simplify status decode routines
93
-  typedef struct {
94
-    uint8_t STATUS_AXIS_LAYOUT;              // Copy of L6470_status_layout
95
-    uint8_t AXIS_OCD_TH_MAX;              // Size of OCD_TH field
96
-    uint8_t AXIS_STALL_TH_MAX;            // Size of STALL_TH field
97
-    float AXIS_OCD_CURRENT_CONSTANT_INV;   // mA per count
98
-    float AXIS_STALL_CURRENT_CONSTANT_INV; // mA per count
99
-    uint8_t L6470_AXIS_CONFIG,            // Address of the CONFIG register
100
-            L6470_AXIS_STATUS;            // Address of the STATUS register
101
-    uint16_t L6470_ERROR_MASK,            // STATUS_UVLO | STATUS_TH_WRN | STATUS_TH_SD  | STATUS_OCD | STATUS_STEP_LOSS_A | STATUS_STEP_LOSS_B
102
-             L6474_ERROR_MASK,            // STATUS_UVLO | STATUS_TH_WRN | STATUS_TH_SD  | STATUS_OCD
103
-             STATUS_AXIS_RAW,             // Copy of status register contents
104
-             STATUS_AXIS,                 // Copy of status register contents but with all error bits active low
105
-             STATUS_AXIS_OCD,             // Overcurrent detected bit position
106
-             STATUS_AXIS_SCK_MOD,         // Step clock mode is active bit position
107
-             STATUS_AXIS_STEP_LOSS_A,     // Stall detected on A bridge bit position
108
-             STATUS_AXIS_STEP_LOSS_B,     // Stall detected on B bridge bit position
109
-             STATUS_AXIS_TH_SD,           // Thermal shutdown bit position
110
-             STATUS_AXIS_TH_WRN,          // Thermal warning bit position
111
-             STATUS_AXIS_UVLO,            // Undervoltage lockout is active bit position
112
-             STATUS_AXIS_WRONG_CMD,       // Last command not valid bit position
113
-             STATUS_AXIS_CMD_ERR,         // Command error bit position
114
-             STATUS_AXIS_NOTPERF_CMD;     // Last command not performed bit position
115
-  } L64XX_shadow_t;
116
-
117
-  static L64XX_shadow_t shadow;
118
-
119
-  #if ENABLED(MONITOR_L6470_DRIVER_STATUS)
120
-    static bool monitor_paused;
121
-    static void pause_monitor(const bool p) { monitor_paused = p; }
122
-    static void monitor_update(L64XX_axis_t stepper_index);
123
-    static void monitor_driver();
124
-  #else
125
-    static void pause_monitor(const bool) {}
126
-  #endif
127
-
128
-//protected:
129
-  // L64XXHelper methods
130
-  static void spi_init();
131
-  static uint8_t transfer_single(uint8_t data, int16_t ss_pin);
132
-  static uint8_t transfer_chain(uint8_t data, int16_t ss_pin, uint8_t chain_position);
133
-
134
-private:
135
-  static void append_stepper_err(char* &p, const uint8_t stepper_index, const char * const err=nullptr);
136
-
137
-};
138
-
139
-void echo_yes_no(const bool yes);
140
-
141
-extern L64XX_Marlin L64xxManager;

+ 0
- 98
Marlin/src/libs/L64XX/README.md View File

@@ -1,98 +0,0 @@
1
-### L64XX Stepper Driver
2
-
3
-*Arduino-L6470* library revision 0.8.0 or above is required.
4
-
5
-This software can be used with the L6470, L6474, L6480 and the powerSTEP01 (collectively referred to as "L64xx" from now on). Different drivers can be mixed within a system.
6
-
7
-These devices use voltage PWMs to drive the stepper phases. On the L6474 the phase current is controlled by the `TVAL` register. On all the other drivers the phase current is indirectly controlled via the `KVAL_HOLD` register which scales the PWM duty cycle.
8
-
9
-This software assumes that all drivers are in one SPI daisy chain.
10
-
11
-### Hardware Setup
12
-
13
-- MOSI from controller tied to SDI on the first device
14
-
15
-- SDO of the first device is tied to SDI of the next device
16
-
17
-- SDO of the last device is tied to MISO of the controller
18
-
19
-- All devices share the same `SCK_PIN` and `SS_PIN` pins. The user must supply a macro to control the `RESET_PIN`(s).
20
-
21
-- Each L6470 passes the data it saw on its SDI to its neighbor on the **NEXT** SPI cycle (8 bit delay).
22
-
23
-- Each L6470 acts on the **last** SPI data it saw when the `SS_PIN` **goes high**.
24
-
25
-The L6474 uses the standard STEP DIR interface. Phase currents are changed in response to step pulses. The direction is set by the DIR pin. Instead of an ENA pin, stepper power is controlled with SPI commands.
26
-
27
-The other drivers operate in `STEP_CLOCK` mode. In this mode the Direction / Enable functions are done with SPI commands and the phase currents are changed in response to STEP pulses.
28
-
29
-### Hardware / Software Interaction
30
-
31
-Except for the L6474, powering up a stepper and setting the direction are done by the same command. You can't do one without the other.
32
-
33
-**All** directions are set **every time** a new block is popped off the queue by the stepper ISR.
34
-
35
-When setting direction, SPI transfers are minimized by using arrays and a specialized SPI method. *Arduino-L6470* library calls are not used. For N L64xx drivers, this results in N bytes transferred. If library calls were used then N<sup>2</sup> bytes would be sent.
36
-
37
-### Power-up (Reset) Sequence
38
-
39
-- Stepper objects are instantiated before the `setup()` entry point is reached.
40
-
41
-- In `setup()` (before stepper drivers are initialized) the `L6470_init()` method is called to do the following:
42
-
43
-  - If present, pulse the hardware reset pin.
44
-
45
-  - Populate the `L6470_chain` array, which maps positions in the SPI stream to commands/data for L64XX stepper drivers.
46
-
47
-  - Initialize the L64XX Software SPI pin states.
48
-
49
-  - Initialize L64XX drivers. They may be reset later by a call to `L6470_init_to_defaults()`.
50
-
51
-The steppers are **NOT** powered up (enabled) during this sequence.
52
-
53
-### `L6470_chain` array
54
-
55
-This array is used by all routines that transmit SPI data. For a chain with N devices, the array contains:
56
-
57
-Index|Value
58
------|-----
59
-0|Number of drivers in chain
60
-1|Axis index of the first device in the chain (closest to MOSI)
61
-...|
62
-N|Axis index of the last device chain (closest to MISO)
63
-
64
-### Set Direction and Enable
65
-
66
-The `DIR_WRITE` macros for the L64xx drivers are written so that the standard X, Y, Z and extruder logic used by the `set_directions()` routine is not altered. These macros write the correct forward/reverse command to the corresponding location in the array `L6470_dir_commands`. On the L6474 the array the command used just enables the stepper because direction is set by the DIR pin.
67
-
68
-At the end of the `set_directions()` routine, the array `L6470_chain` is used to grab the corresponding direction/enable commands out of the array `L6470_dir_commands` and put them in the correct sequence in the array `L6470_buf`. Array `L6470_buf` is then passed to the **`void`** `L6470_Transfer` function which actually sends the data to the devices.
69
-
70
-### Utilities, etc.
71
-
72
-The **absolute position** registers should accurately reflect Marlin’s stepper position counts. They are set to zero during initialization. `G28` sets them to the Marlin counts for the corresponding axis after homing. NOTE: These registers are often the negative of the Marlin counts. This is because the Marlin counts reflect the logical direction while the registers reflect the stepper direction. The register contents are displayed via the `M114 D` command.
73
-
74
-The `L6470_monitor` feature reads the status of each device every half second. It will report if there are any error conditions present or if communications has been lost/restored. The `KVAL_HOLD` value is reduced every 2 – 2.5 seconds if the thermal warning or thermal shutdown conditions are present.
75
-
76
-**M122** displays the settings of most of the bits in the status register plus a couple of other items.
77
-
78
-**M906** can be used to set the `KVAL_HOLD` register (`TVAL` on L6474) one driver at a time. If a setting is not included with the command then the contents of the registers that affect the phase current/voltage are displayed.
79
-
80
-**M916, M917 & M918**
81
-
82
-These utilities are used to tune the system. They can get you in the ballpark for acceptable jerk, acceleration, top speed and `KVAL_HOLD` settings (`TVAL` on L6474). In general they seem to provide an overly optimistic `KVAL_HOLD` (`TVAL`) setting because of the lag between setting `KVAL_HOLD` (`TVAL`) and the driver reaching final temperature. Enabling the `L6470_monitor` feature during prints will provide the **final useful setting**.
83
-
84
-The amount of power needed to move the stepper without skipping steps increases as jerk, acceleration, top speed, and micro-steps increase. The power dissipated by the driver increases as the power to the stepper increases. The net result is a balancing act between jerk, acceleration, top speed, micro-steps, and power dissipated by the driver.
85
-
86
-**M916** - Increases `KVAL_HOLD` (`TVAL`) while moving one axis until a thermal warning is generated. This routine is also useful for determining the approximate `KVAL_HOLD` (`TVAL`) where the stepper stops losing steps. The sound will get noticeably quieter as it stops losing steps.
87
-
88
-**M917** - Find minimum current thresholds. This is accomplished by doing the following steps while moving an axis:
89
-
90
-1. Decrease OCD current until overcurrent error.
91
-
92
-2. Increase OCD until overcurrent error goes away.
93
-
94
-3. Decrease stall threshold until stall error (not available on the L6474).
95
-
96
-4. Increase stall until stall error goes away (not available on the L6474).
97
-
98
-**M918** - Increase speed until error or max feedrate achieved.

+ 1
- 30
Marlin/src/module/stepper.cpp View File

@@ -117,12 +117,6 @@ Stepper stepper; // Singleton
117 117
   #include "../feature/runout.h"
118 118
 #endif
119 119
 
120
-#if HAS_L64XX
121
-  #include "../libs/L64XX/L64XX_Marlin.h"
122
-  uint8_t L6470_buf[MAX_L64XX + 1];   // chip command sequence - element 0 not used
123
-  bool L64XX_OK_to_power_up = false;  // flag to keep L64xx steppers powered down after a reset or power up
124
-#endif
125
-
126 120
 #if ENABLED(AUTO_POWER_CONTROL)
127 121
   #include "../feature/power.h"
128 122
 #endif
@@ -618,27 +612,6 @@ void Stepper::set_directions() {
618 612
     #endif
619 613
   #endif // !LIN_ADVANCE
620 614
 
621
-  #if HAS_L64XX
622
-    if (L64XX_OK_to_power_up) { // OK to send the direction commands (which powers up the L64XX steppers)
623
-      if (L64xxManager.spi_active) {
624
-        L64xxManager.spi_abort = true;                    // Interrupted SPI transfer needs to shut down gracefully
625
-        for (uint8_t j = 1; j <= L64XX::chain[0]; j++)
626
-          L6470_buf[j] = dSPIN_NOP;                         // Fill buffer with NOOPs
627
-        L64xxManager.transfer(L6470_buf, L64XX::chain[0]);  // Send enough NOOPs to complete any command
628
-        L64xxManager.transfer(L6470_buf, L64XX::chain[0]);
629
-        L64xxManager.transfer(L6470_buf, L64XX::chain[0]);
630
-      }
631
-
632
-      // L64xxManager.dir_commands[] is an array that holds direction command for each stepper
633
-
634
-      // Scan command array, copy matches into L64xxManager.transfer
635
-      for (uint8_t j = 1; j <= L64XX::chain[0]; j++)
636
-        L6470_buf[j] = L64xxManager.dir_commands[L64XX::chain[j]];
637
-
638
-      L64xxManager.transfer(L6470_buf, L64XX::chain[0]);  // send the command stream to the drivers
639
-    }
640
-  #endif
641
-
642 615
   DIR_WAIT_AFTER();
643 616
 }
644 617
 
@@ -2351,13 +2324,11 @@ uint32_t Stepper::block_phase_isr() {
2351 2324
         else LA_isr_rate = LA_ADV_NEVER;
2352 2325
       #endif
2353 2326
 
2354
-      if ( ENABLED(HAS_L64XX)       // Always set direction for L64xx (Also enables the chips)
2355
-        || ENABLED(DUAL_X_CARRIAGE) // TODO: Find out why this fixes "jittery" small circles
2327
+      if ( ENABLED(DUAL_X_CARRIAGE) // TODO: Find out why this fixes "jittery" small circles
2356 2328
         || current_block->direction_bits != last_direction_bits
2357 2329
         || TERN(MIXING_EXTRUDER, false, stepper_extruder != last_moved_extruder)
2358 2330
       ) {
2359 2331
         E_TERN_(last_moved_extruder = stepper_extruder);
2360
-        TERN_(HAS_L64XX, L64XX_OK_to_power_up = true);
2361 2332
         set_directions(current_block->direction_bits);
2362 2333
       }
2363 2334
 

+ 0
- 264
Marlin/src/module/stepper/L64xx.cpp View File

@@ -1,264 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-
23
-/**
24
- * stepper/L64xx.cpp
25
- * Stepper driver indirection for L64XX drivers
26
- */
27
-
28
-#include "../../inc/MarlinConfig.h"
29
-
30
-#if HAS_L64XX
31
-
32
-#include "L64xx.h"
33
-
34
-#if AXIS_IS_L64XX(X)
35
-  L64XX_CLASS(X) stepperX(L6470_CHAIN_SS_PIN);
36
-#endif
37
-#if AXIS_IS_L64XX(X2)
38
-  L64XX_CLASS(X2) stepperX2(L6470_CHAIN_SS_PIN);
39
-#endif
40
-#if AXIS_IS_L64XX(Y)
41
-  L64XX_CLASS(Y) stepperY(L6470_CHAIN_SS_PIN);
42
-#endif
43
-#if AXIS_IS_L64XX(Y2)
44
-  L64XX_CLASS(Y2) stepperY2(L6470_CHAIN_SS_PIN);
45
-#endif
46
-#if AXIS_IS_L64XX(Z)
47
-  L64XX_CLASS(Z) stepperZ(L6470_CHAIN_SS_PIN);
48
-#endif
49
-#if AXIS_IS_L64XX(Z2)
50
-  L64XX_CLASS(Z2) stepperZ2(L6470_CHAIN_SS_PIN);
51
-#endif
52
-#if AXIS_IS_L64XX(Z3)
53
-  L64XX_CLASS(Z3) stepperZ3(L6470_CHAIN_SS_PIN);
54
-#endif
55
-#if AXIS_IS_L64XX(Z4)
56
-  L64XX_CLASS(Z4) stepperZ4(L6470_CHAIN_SS_PIN);
57
-#endif
58
-#if AXIS_IS_L64XX(I)
59
-  L64XX_CLASS(I) stepperI(L6470_CHAIN_SS_PIN);
60
-#endif
61
-#if AXIS_IS_L64XX(J)
62
-  L64XX_CLASS(J) stepperJ(L6470_CHAIN_SS_PIN);
63
-#endif
64
-#if AXIS_IS_L64XX(K)
65
-  L64XX_CLASS(K) stepperK(L6470_CHAIN_SS_PIN);
66
-#endif
67
-#if AXIS_IS_L64XX(U)
68
-  L64XX_CLASS(u) stepperU(L6470_CHAIN_SS_PIN);
69
-#endif
70
-#if AXIS_IS_L64XX(V)
71
-  L64XX_CLASS(v) stepperV(L6470_CHAIN_SS_PIN);
72
-#endif
73
-#if AXIS_IS_L64XX(W)
74
-  L64XX_CLASS(w) stepperW(L6470_CHAIN_SS_PIN);
75
-#endif
76
-#if AXIS_IS_L64XX(E0)
77
-  L64XX_CLASS(E0) stepperE0(L6470_CHAIN_SS_PIN);
78
-#endif
79
-#if AXIS_IS_L64XX(E1)
80
-  L64XX_CLASS(E1) stepperE1(L6470_CHAIN_SS_PIN);
81
-#endif
82
-#if AXIS_IS_L64XX(E2)
83
-  L64XX_CLASS(E2) stepperE2(L6470_CHAIN_SS_PIN);
84
-#endif
85
-#if AXIS_IS_L64XX(E3)
86
-  L64XX_CLASS(E3) stepperE3(L6470_CHAIN_SS_PIN);
87
-#endif
88
-#if AXIS_IS_L64XX(E4)
89
-  L64XX_CLASS(E4) stepperE4(L6470_CHAIN_SS_PIN);
90
-#endif
91
-#if AXIS_IS_L64XX(E5)
92
-  L64XX_CLASS(E5) stepperE5(L6470_CHAIN_SS_PIN);
93
-#endif
94
-#if AXIS_IS_L64XX(E6)
95
-  L64XX_CLASS(E6) stepperE6(L6470_CHAIN_SS_PIN);
96
-#endif
97
-#if AXIS_IS_L64XX(E7)
98
-  L64XX_CLASS(E7) stepperE7(L6470_CHAIN_SS_PIN);
99
-#endif
100
-
101
-// Not using L64XX class init method because it
102
-// briefly sends power to the steppers
103
-
104
-inline void L6470_init_chip(L64XX &st, const int ms, const int oc, const int sc, const int mv, const int slew_rate) {
105
-  st.set_handlers(L64xxManager.spi_init, L64xxManager.transfer_single, L64xxManager.transfer_chain);  // specify which external SPI routines to use
106
-  switch (st.L6470_status_layout) {
107
-    case L6470_STATUS_LAYOUT: {
108
-      st.resetDev();
109
-      st.softFree();
110
-      st.SetParam(st.L64XX_CONFIG, CONFIG_PWM_DIV_1 | CONFIG_PWM_MUL_2 | CONFIG_OC_SD_DISABLE | CONFIG_VS_COMP_DISABLE | CONFIG_SW_HARD_STOP | CONFIG_INT_16MHZ);
111
-      st.SetParam(L6470_KVAL_RUN, 0xFF);
112
-      st.SetParam(L6470_KVAL_ACC, 0xFF);
113
-      st.SetParam(L6470_KVAL_DEC, 0xFF);
114
-      st.setMicroSteps(ms);
115
-      st.setOverCurrent(oc);
116
-      st.setStallCurrent(sc);
117
-      st.SetParam(L6470_KVAL_HOLD, mv);
118
-      st.SetParam(L6470_ABS_POS, 0);
119
-      uint32_t config_temp = st.GetParam(st.L64XX_CONFIG);
120
-      config_temp &= ~CONFIG_POW_SR;
121
-      switch (slew_rate) {
122
-        case 0: st.SetParam(st.L64XX_CONFIG, config_temp | CONFIG_SR_75V_us); break;
123
-        default:
124
-        case 1: st.SetParam(st.L64XX_CONFIG, config_temp | CONFIG_SR_110V_us); break;
125
-        case 3:
126
-        case 2: st.SetParam(st.L64XX_CONFIG, config_temp | CONFIG_SR_260V_us); break;
127
-      }
128
-      st.getStatus();
129
-      st.getStatus();
130
-      break;
131
-    }
132
-
133
-    case L6474_STATUS_LAYOUT: {
134
-      st.free();
135
-      //st.SetParam(st.L64XX_CONFIG, CONFIG_PWM_DIV_1 | CONFIG_PWM_MUL_2 | CONFIG_OC_SD_DISABLE | CONFIG_VS_COMP_DISABLE | CONFIG_SW_HARD_STOP | CONFIG_INT_16MHZ);
136
-      //st.SetParam(L6474_TVAL, 0xFF);
137
-      st.setMicroSteps(ms);
138
-      st.setOverCurrent(oc);
139
-      st.setTVALCurrent(sc);
140
-      st.SetParam(L6470_ABS_POS, 0);
141
-      uint32_t config_temp = st.GetParam(st.L64XX_CONFIG);
142
-      config_temp &= ~CONFIG_POW_SR & ~CONFIG_EN_TQREG;  // clear out slew rate and set current to be controlled by TVAL register
143
-      switch (slew_rate) {
144
-        case 0: st.SetParam(st.L64XX_CONFIG, config_temp | CONFIG_SR_75V_us); break;
145
-        default:
146
-        case 1: st.SetParam(st.L64XX_CONFIG, config_temp | CONFIG_SR_110V_us); break;
147
-        case 3:
148
-        case 2: st.SetParam(st.L64XX_CONFIG, config_temp | CONFIG_SR_260V_us); break;
149
-        //case 0: st.SetParam(st.L64XX_CONFIG, 0x2E88 | CONFIG_EN_TQREG | CONFIG_SR_75V_us); break;
150
-        //default:
151
-        //case 1: st.SetParam(st.L64XX_CONFIG, 0x2E88 | CONFIG_EN_TQREG | CONFIG_SR_110V_us); break;
152
-        //case 3:
153
-        //case 2: st.SetParam(st.L64XX_CONFIG, 0x2E88 | CONFIG_EN_TQREG | CONFIG_SR_260V_us); break;
154
-
155
-        //case 0: st.SetParam(st.L64XX_CONFIG, 0x2E88 ); break;
156
-        //default:
157
-        //case 1: st.SetParam(st.L64XX_CONFIG, 0x2E88 ); break;
158
-        //case 3:
159
-        //case 2: st.SetParam(st.L64XX_CONFIG, 0x2E88 ); break;
160
-      }
161
-      st.getStatus();
162
-      st.getStatus();
163
-      break;
164
-    }
165
-
166
-    case L6480_STATUS_LAYOUT: {
167
-      st.resetDev();
168
-      st.softFree();
169
-      st.SetParam(st.L64XX_CONFIG, CONFIG_PWM_DIV_1 | CONFIG_PWM_MUL_2 | CONFIG_OC_SD_DISABLE | CONFIG_VS_COMP_DISABLE | CONFIG_SW_HARD_STOP | CONFIG_INT_16MHZ);
170
-      st.SetParam(L6470_KVAL_RUN, 0xFF);
171
-      st.SetParam(L6470_KVAL_ACC, 0xFF);
172
-      st.SetParam(L6470_KVAL_DEC, 0xFF);
173
-      st.setMicroSteps(ms);
174
-      st.setOverCurrent(oc);
175
-      st.setStallCurrent(sc);
176
-      st.SetParam(+-L6470_KVAL_HOLD, mv);
177
-      st.SetParam(L6470_ABS_POS, 0);
178
-      st.SetParam(st.L64XX_CONFIG,(st.GetParam(st.L64XX_CONFIG) | PWR_VCC_7_5V));
179
-      st.getStatus();     // must clear out status bits before can set slew rate
180
-      st.getStatus();
181
-      switch (slew_rate) {
182
-        case 0: st.SetParam(L6470_GATECFG1, CONFIG1_SR_220V_us); st.SetParam(L6470_GATECFG2, CONFIG2_SR_220V_us); break;
183
-        default:
184
-        case 1: st.SetParam(L6470_GATECFG1, CONFIG1_SR_400V_us); st.SetParam(L6470_GATECFG2, CONFIG2_SR_400V_us); break;
185
-        case 2: st.SetParam(L6470_GATECFG1, CONFIG1_SR_520V_us); st.SetParam(L6470_GATECFG2, CONFIG2_SR_520V_us); break;
186
-        case 3: st.SetParam(L6470_GATECFG1, CONFIG1_SR_980V_us); st.SetParam(L6470_GATECFG2, CONFIG2_SR_980V_us); break;
187
-      }
188
-      break;
189
-    }
190
-  }
191
-}
192
-
193
-#define L6470_INIT_CHIP(Q) L6470_init_chip(stepper##Q, Q##_MICROSTEPS, Q##_OVERCURRENT, Q##_STALLCURRENT, Q##_MAX_VOLTAGE, Q##_SLEW_RATE)
194
-
195
-void L64XX_Marlin::init_to_defaults() {
196
-  #if AXIS_IS_L64XX(X)
197
-    L6470_INIT_CHIP(X);
198
-  #endif
199
-  #if AXIS_IS_L64XX(X2)
200
-    L6470_INIT_CHIP(X2);
201
-  #endif
202
-  #if AXIS_IS_L64XX(Y)
203
-    L6470_INIT_CHIP(Y);
204
-  #endif
205
-  #if AXIS_IS_L64XX(Y2)
206
-    L6470_INIT_CHIP(Y2);
207
-  #endif
208
-  #if AXIS_IS_L64XX(Z)
209
-    L6470_INIT_CHIP(Z);
210
-  #endif
211
-  #if AXIS_IS_L64XX(Z2)
212
-    L6470_INIT_CHIP(Z2);
213
-  #endif
214
-  #if AXIS_IS_L64XX(Z3)
215
-    L6470_INIT_CHIP(Z3);
216
-  #endif
217
-  #if AXIS_IS_L64XX(Z4)
218
-    L6470_INIT_CHIP(Z4);
219
-  #endif
220
-  #if AXIS_IS_L64XX(I)
221
-    L6470_INIT_CHIP(I);
222
-  #endif
223
-  #if AXIS_IS_L64XX(J)
224
-    L6470_INIT_CHIP(J);
225
-  #endif
226
-  #if AXIS_IS_L64XX(K)
227
-    L6470_INIT_CHIP(K);
228
-  #endif
229
-  #if AXIS_IS_L64XX(U)
230
-    L6470_INIT_CHIP(U);
231
-  #endif
232
-  #if AXIS_IS_L64XX(V)
233
-    L6470_INIT_CHIP(V);
234
-  #endif
235
-  #if AXIS_IS_L64XX(W)
236
-    L6470_INIT_CHIP(W);
237
-  #endif
238
-  #if AXIS_IS_L64XX(E0)
239
-    L6470_INIT_CHIP(E0);
240
-  #endif
241
-  #if AXIS_IS_L64XX(E1)
242
-    L6470_INIT_CHIP(E1);
243
-  #endif
244
-  #if AXIS_IS_L64XX(E2)
245
-    L6470_INIT_CHIP(E2);
246
-  #endif
247
-  #if AXIS_IS_L64XX(E3)
248
-    L6470_INIT_CHIP(E3);
249
-  #endif
250
-  #if AXIS_IS_L64XX(E4)
251
-    L6470_INIT_CHIP(E4);
252
-  #endif
253
-  #if AXIS_IS_L64XX(E5)
254
-    L6470_INIT_CHIP(E5);
255
-  #endif
256
-  #if AXIS_IS_L64XX(E6)
257
-    L6470_INIT_CHIP(E6);
258
-  #endif
259
-  #if AXIS_IS_L64XX(E7)
260
-    L6470_INIT_CHIP(E7);
261
-  #endif
262
-}
263
-
264
-#endif // HAS_L64XX

+ 0
- 490
Marlin/src/module/stepper/L64xx.h View File

@@ -1,490 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-/**
25
- * stepper/L64xx.h
26
- * Stepper driver indirection for L64XX drivers
27
- */
28
-
29
-#include "../../inc/MarlinConfig.h"
30
-#include "../../libs/L64XX/L64XX_Marlin.h"
31
-
32
-// Convert option names to L64XX classes
33
-#define CLASS_L6470       L6470
34
-#define CLASS_L6474       L6474
35
-#define CLASS_POWERSTEP01 powerSTEP01
36
-
37
-#define __L64XX_CLASS(TYPE) CLASS_##TYPE
38
-#define _L64XX_CLASS(TYPE)  __L64XX_CLASS(TYPE)
39
-#define L64XX_CLASS(ST)     _L64XX_CLASS(ST##_DRIVER_TYPE)
40
-
41
-#define L6474_DIR_WRITE(A,STATE) do{ L64xxManager.dir_commands[A] = dSPIN_L6474_ENABLE; WRITE(A##_DIR_PIN, STATE); }while(0)
42
-#define L64XX_DIR_WRITE(A,STATE) do{ L64xxManager.dir_commands[A] = (STATE) ? dSPIN_STEP_CLOCK_REV : dSPIN_STEP_CLOCK_FWD; }while(0)
43
-
44
-// X Stepper
45
-#if AXIS_IS_L64XX(X)
46
-  extern L64XX_CLASS(X)         stepperX;
47
-  #define X_ENABLE_INIT()       NOOP
48
-  #define X_ENABLE_WRITE(STATE) (STATE ? stepperX.hardStop() : stepperX.free())
49
-  #define X_ENABLE_READ()       (stepperX.getStatus() & STATUS_HIZ)
50
-  #if AXIS_DRIVER_TYPE_X(L6474)
51
-    #define X_DIR_INIT()        SET_OUTPUT(X_DIR_PIN)
52
-    #define X_DIR_WRITE(STATE)  L6474_DIR_WRITE(X, STATE)
53
-    #define X_DIR_READ()        READ(X_DIR_PIN)
54
-  #else
55
-    #define X_DIR_INIT()        NOOP
56
-    #define X_DIR_WRITE(STATE)  L64XX_DIR_WRITE(X, STATE)
57
-    #define X_DIR_READ()        (stepper##X.getStatus() & STATUS_DIR);
58
-    #if AXIS_DRIVER_TYPE_X(L6470)
59
-      #define DISABLE_STEPPER_X() stepperX.free()
60
-    #endif
61
-  #endif
62
-#endif
63
-
64
-// Y Stepper
65
-#if AXIS_IS_L64XX(Y)
66
-  extern L64XX_CLASS(Y)         stepperY;
67
-  #define Y_ENABLE_INIT()       NOOP
68
-  #define Y_ENABLE_WRITE(STATE) (STATE ? stepperY.hardStop() : stepperY.free())
69
-  #define Y_ENABLE_READ()       (stepperY.getStatus() & STATUS_HIZ)
70
-  #if AXIS_DRIVER_TYPE_Y(L6474)
71
-    #define Y_DIR_INIT()        SET_OUTPUT(Y_DIR_PIN)
72
-    #define Y_DIR_WRITE(STATE)  L6474_DIR_WRITE(Y, STATE)
73
-    #define Y_DIR_READ()        READ(Y_DIR_PIN)
74
-  #else
75
-    #define Y_DIR_INIT()        NOOP
76
-    #define Y_DIR_WRITE(STATE)  L64XX_DIR_WRITE(Y, STATE)
77
-    #define Y_DIR_READ()        (stepper##Y.getStatus() & STATUS_DIR);
78
-    #if AXIS_DRIVER_TYPE_Y(L6470)
79
-      #define DISABLE_STEPPER_Y() stepperY.free()
80
-    #endif
81
-  #endif
82
-#endif
83
-
84
-// Z Stepper
85
-#if AXIS_IS_L64XX(Z)
86
-  extern L64XX_CLASS(Z)         stepperZ;
87
-  #define Z_ENABLE_INIT()       NOOP
88
-  #define Z_ENABLE_WRITE(STATE) (STATE ? stepperZ.hardStop() : stepperZ.free())
89
-  #define Z_ENABLE_READ()       (stepperZ.getStatus() & STATUS_HIZ)
90
-  #if AXIS_DRIVER_TYPE_Z(L6474)
91
-    #define Z_DIR_INIT()        SET_OUTPUT(Z_DIR_PIN)
92
-    #define Z_DIR_WRITE(STATE)  L6474_DIR_WRITE(Z, STATE)
93
-    #define Z_DIR_READ()        READ(Z_DIR_PIN)
94
-  #else
95
-    #define Z_DIR_INIT()        NOOP
96
-    #define Z_DIR_WRITE(STATE)  L64XX_DIR_WRITE(Z, STATE)
97
-    #define Z_DIR_READ()        (stepper##Z.getStatus() & STATUS_DIR);
98
-    #if AXIS_DRIVER_TYPE_Z(L6470)
99
-      #define DISABLE_STEPPER_Z() stepperZ.free()
100
-    #endif
101
-  #endif
102
-#endif
103
-
104
-// X2 Stepper
105
-#if HAS_X2_ENABLE && AXIS_IS_L64XX(X2)
106
-  extern L64XX_CLASS(X2)         stepperX2;
107
-  #define X2_ENABLE_INIT()       NOOP
108
-  #define X2_ENABLE_WRITE(STATE) (STATE ? stepperX2.hardStop() : stepperX2.free())
109
-  #define X2_ENABLE_READ()       (stepperX2.getStatus() & STATUS_HIZ)
110
-  #if AXIS_DRIVER_TYPE_X2(L6474)
111
-    #define X2_DIR_INIT()        SET_OUTPUT(X2_DIR_PIN)
112
-    #define X2_DIR_WRITE(STATE)  L6474_DIR_WRITE(X2, STATE)
113
-    #define X2_DIR_READ()        READ(X2_DIR_PIN)
114
-  #else
115
-    #define X2_DIR_INIT()        NOOP
116
-    #define X2_DIR_WRITE(STATE)  L64XX_DIR_WRITE(X2, STATE)
117
-    #define X2_DIR_READ()        (stepper##X2.getStatus() & STATUS_DIR);
118
-  #endif
119
-#endif
120
-
121
-#if AXIS_DRIVER_TYPE_X2(L6470)
122
-  #define DISABLE_STEPPER_X2() stepperX2.free()
123
-#endif
124
-
125
-// Y2 Stepper
126
-#if HAS_Y2_ENABLE && AXIS_IS_L64XX(Y2)
127
-  extern L64XX_CLASS(Y2)         stepperY2;
128
-  #define Y2_ENABLE_INIT()       NOOP
129
-  #define Y2_ENABLE_WRITE(STATE) (STATE ? stepperY2.hardStop() : stepperY2.free())
130
-  #define Y2_ENABLE_READ()       (stepperY2.getStatus() & STATUS_HIZ)
131
-  #if AXIS_DRIVER_TYPE_Y2(L6474)
132
-    #define Y2_DIR_INIT()        SET_OUTPUT(Y2_DIR_PIN)
133
-    #define Y2_DIR_WRITE(STATE)  L6474_DIR_WRITE(Y2, STATE)
134
-    #define Y2_DIR_READ()        READ(Y2_DIR_PIN)
135
-  #else
136
-    #define Y2_DIR_INIT()        NOOP
137
-    #define Y2_DIR_WRITE(STATE)  L64XX_DIR_WRITE(Y2, STATE)
138
-    #define Y2_DIR_READ()        (stepper##Y2.getStatus() & STATUS_DIR);
139
-  #endif
140
-#endif
141
-
142
-#if AXIS_DRIVER_TYPE_Y2(L6470)
143
-  #define DISABLE_STEPPER_Y2() stepperY2.free()
144
-#endif
145
-
146
-// Z2 Stepper
147
-#if HAS_Z2_ENABLE && AXIS_IS_L64XX(Z2)
148
-  extern L64XX_CLASS(Z2)         stepperZ2;
149
-  #define Z2_ENABLE_INIT()       NOOP
150
-  #define Z2_ENABLE_WRITE(STATE) (STATE ? stepperZ2.hardStop() : stepperZ2.free())
151
-  #define Z2_ENABLE_READ()       (stepperZ2.getStatus() & STATUS_HIZ)
152
-  #if AXIS_DRIVER_TYPE_Z2(L6474)
153
-    #define Z2_DIR_INIT()        SET_OUTPUT(Z2_DIR_PIN)
154
-    #define Z2_DIR_WRITE(STATE)  L6474_DIR_WRITE(Z2, STATE)
155
-    #define Z2_DIR_READ()        READ(Z2_DIR_PIN)
156
-  #else
157
-    #define Z2_DIR_INIT()        NOOP
158
-    #define Z2_DIR_WRITE(STATE)  L64XX_DIR_WRITE(Z2, STATE)
159
-    #define Z2_DIR_READ()        (stepper##Z2.getStatus() & STATUS_DIR);
160
-  #endif
161
-#endif
162
-
163
-#if AXIS_DRIVER_TYPE_Z2(L6470)
164
-  #define DISABLE_STEPPER_Z2() stepperZ2.free()
165
-#endif
166
-
167
-// Z3 Stepper
168
-#if HAS_Z3_ENABLE && AXIS_IS_L64XX(Z3)
169
-  extern L64XX_CLASS(Z3)         stepperZ3;
170
-  #define Z3_ENABLE_INIT()       NOOP
171
-  #define Z3_ENABLE_WRITE(STATE) (STATE ? stepperZ3.hardStop() : stepperZ3.free())
172
-  #define Z3_ENABLE_READ()       (stepperZ3.getStatus() & STATUS_HIZ)
173
-  #if AXIS_DRIVER_TYPE_Z3(L6474)
174
-    #define Z3_DIR_INIT()        SET_OUTPUT(Z3_DIR_PIN)
175
-    #define Z3_DIR_WRITE(STATE)  L6474_DIR_WRITE(Z3, STATE)
176
-    #define Z3_DIR_READ()        READ(Z3_DIR_PIN)
177
-  #else
178
-    #define Z3_DIR_INIT()        NOOP
179
-    #define Z3_DIR_WRITE(STATE)  L64XX_DIR_WRITE(Z3, STATE)
180
-    #define Z3_DIR_READ()        (stepper##Z3.getStatus() & STATUS_DIR);
181
-  #endif
182
-#endif
183
-
184
-#if AXIS_DRIVER_TYPE_Z3(L6470)
185
-  #define DISABLE_STEPPER_Z3() stepperZ3.free()
186
-#endif
187
-
188
-// Z4 Stepper
189
-#if HAS_Z4_ENABLE && AXIS_IS_L64XX(Z4)
190
-  extern L64XX_CLASS(Z4)         stepperZ4;
191
-  #define Z4_ENABLE_INIT()       NOOP
192
-  #define Z4_ENABLE_WRITE(STATE) (STATE ? stepperZ4.hardStop() : stepperZ4.free())
193
-  #define Z4_ENABLE_READ()       (stepperZ4.getStatus() & STATUS_HIZ)
194
-  #if AXIS_DRIVER_TYPE_Z4(L6474)
195
-    #define Z4_DIR_INIT()        SET_OUTPUT(Z4_DIR_PIN)
196
-    #define Z4_DIR_WRITE(STATE)  L6474_DIR_WRITE(Z4, STATE)
197
-    #define Z4_DIR_READ()        READ(Z4_DIR_PIN)
198
-  #else
199
-    #define Z4_DIR_INIT()        NOOP
200
-    #define Z4_DIR_WRITE(STATE)  L64XX_DIR_WRITE(Z4, STATE)
201
-    #define Z4_DIR_READ()        (stepper##Z4.getStatus() & STATUS_DIR);
202
-  #endif
203
-#endif
204
-
205
-#if AXIS_DRIVER_TYPE_Z4(L6470)
206
-  #define DISABLE_STEPPER_Z4() stepperZ4.free()
207
-#endif
208
-
209
-// I Stepper
210
-#if AXIS_IS_L64XX(I)
211
-  extern L64XX_CLASS(I)         stepperI;
212
-  #define I_ENABLE_INIT()       NOOP
213
-  #define I_ENABLE_WRITE(STATE) (STATE ? stepperI.hardStop() : stepperI.free())
214
-  #define I_ENABLE_READ()       (stepperI.getStatus() & STATUS_HIZ)
215
-  #if AXIS_DRIVER_TYPE_I(L6474)
216
-    #define I_DIR_INIT()        SET_OUTPUT(I_DIR_PIN)
217
-    #define I_DIR_WRITE(STATE)  L6474_DIR_WRITE(I, STATE)
218
-    #define I_DIR_READ()        READ(I_DIR_PIN)
219
-  #else
220
-    #define I_DIR_INIT()        NOOP
221
-    #define I_DIR_WRITE(STATE)  L64XX_DIR_WRITE(I, STATE)
222
-    #define I_DIR_READ()        (stepper##I.getStatus() & STATUS_DIR);
223
-    #if AXIS_DRIVER_TYPE_I(L6470)
224
-      #define DISABLE_STEPPER_I() stepperI.free()
225
-    #endif
226
-  #endif
227
-#endif
228
-
229
-// J Stepper
230
-#if AXIS_IS_L64XX(J)
231
-  extern L64XX_CLASS(J)         stepperJ;
232
-  #define J_ENABLE_INIT()       NOOP
233
-  #define J_ENABLE_WRITE(STATE) (STATE ? stepperJ.hardStop() : stepperJ.free())
234
-  #define J_ENABLE_READ()       (stepperJ.getStatus() & STATUS_HIZ)
235
-  #if AXIS_DRIVER_TYPE_J(L6474)
236
-    #define J_DIR_INIT()        SET_OUTPUT(J_DIR_PIN)
237
-    #define J_DIR_WRITE(STATE)  L6474_DIR_WRITE(J, STATE)
238
-    #define J_DIR_READ()        READ(J_DIR_PIN)
239
-  #else
240
-    #define J_DIR_INIT()        NOOP
241
-    #define J_DIR_WRITE(STATE)  L64XX_DIR_WRITE(J, STATE)
242
-    #define J_DIR_READ()        (stepper##J.getStatus() & STATUS_DIR);
243
-    #if AXIS_DRIVER_TYPE_J(L6470)
244
-      #define DISABLE_STEPPER_J() stepperJ.free()
245
-    #endif
246
-  #endif
247
-#endif
248
-
249
-// K Stepper
250
-#if AXIS_IS_L64XX(K)
251
-  extern L64XX_CLASS(K)         stepperK;
252
-  #define K_ENABLE_INIT()       NOOP
253
-  #define K_ENABLE_WRITE(STATE) (STATE ? stepperK.hardStop() : stepperK.free())
254
-  #define K_ENABLE_READ()       (stepperK.getStatus() & STATUS_HIZ)
255
-  #if AXIS_DRIVER_TYPE_K(L6474)
256
-    #define K_DIR_INIT()        SET_OUTPUT(K_DIR_PIN)
257
-    #define K_DIR_WRITE(STATE)  L6474_DIR_WRITE(K, STATE)
258
-    #define K_DIR_READ()        READ(K_DIR_PIN)
259
-  #else
260
-    #define K_DIR_INIT()        NOOP
261
-    #define K_DIR_WRITE(STATE)  L64XX_DIR_WRITE(K, STATE)
262
-    #define K_DIR_READ()        (stepper##K.getStatus() & STATUS_DIR);
263
-    #if AXIS_DRIVER_TYPE_K(L6470)
264
-      #define DISABLE_STEPPER_K() stepperK.free()
265
-    #endif
266
-  #endif
267
-#endif
268
-
269
-// U Stepper
270
-#if HAS_U_AXIS
271
-  #if AXIS_IS_L64XX(U)
272
-    extern L64XX_CLASS(U)         stepperU;
273
-    #define U_ENABLE_INIT()       NOOP
274
-    #define U_ENABLE_WRITE(STATE) (STATE ? stepperU.hardStop() : stepperU.free())
275
-    #define U_ENABLE_READ()       (stepperU.getStatus() & STATUS_HIZ)
276
-    #if AXIS_DRIVER_TYPE_U(L6474)
277
-      #define U_DIR_INIT()        SET_OUTPUT(U_DIR_PIN)
278
-      #define U_DIR_WRITE(STATE)  L6474_DIR_WRITE(U, STATE)
279
-      #define U_DIR_READ()        READ(U_DIR_PIN)
280
-    #else
281
-      #define U_DIR_INIT()        NOOP
282
-      #define U_DIR_WRITE(STATE)  L64XX_DIR_WRITE(U, STATE)
283
-      #define U_DIR_READ()        (stepper##U.getStatus() & STATUS_DIR);
284
-      #if AXIS_DRIVER_TYPE_U(L6470)
285
-        #define DISABLE_STEPPER_U() stepperU.free()
286
-      #endif
287
-    #endif
288
-  #endif
289
-#endif
290
-
291
-// V Stepper
292
-#if HAS_V_AXIS
293
-  #if AXIS_IS_L64XX(V)
294
-    extern L64XX_CLASS(V)         stepperV;
295
-    #define V_ENABLE_INIT()       NOOP
296
-    #define V_ENABLE_WRITE(STATE) (STATE ? stepperV.hardStop() : stepperV.free())
297
-    #define V_ENABLE_READ()       (stepperV.getStatus() & STATUS_HIZ)
298
-    #if AXIS_DRIVER_TYPE_V(L6474)
299
-      #define V_DIR_INIT()        SET_OUTPUT(V_DIR_PIN)
300
-      #define V_DIR_WRITE(STATE)  L6474_DIR_WRITE(V, STATE)
301
-      #define V_DIR_READ()        READ(V_DIR_PIN)
302
-    #else
303
-      #define V_DIR_INIT()        NOOP
304
-      #define V_DIR_WRITE(STATE)  L64XX_DIR_WRITE(V, STATE)
305
-      #define V_DIR_READ()        (stepper##V.getStatus() & STATUS_DIR);
306
-      #if AXIS_DRIVER_TYPE_V(L6470)
307
-        #define DISABLE_STEPPER_V() stepperV.free()
308
-      #endif
309
-    #endif
310
-  #endif
311
-#endif
312
-
313
-// W Stepper
314
-#if HAS_W_AXIS
315
-  #if AXIS_IS_L64XX(W)
316
-    extern L64XX_CLASS(w)         stepperW;
317
-    #define W_ENABLE_INIT()       NOOP
318
-    #define W_ENABLE_WRITE(STATE) (STATE ? stepperW.hardStop() : stepperW.free())
319
-    #define W_ENABLE_READ()       (stepperW.getStatus() & STATUS_HIZ)
320
-    #if AXIS_DRIVER_TYPE_W(L6474)
321
-      #define W_DIR_INIT()        SET_OUTPUT(W_DIR_PIN)
322
-      #define W_DIR_WRITE(STATE)  L6474_DIR_WRITE(W, STATE)
323
-      #define W_DIR_READ()        READ(W_DIR_PIN)
324
-    #else
325
-      #define W_DIR_INIT()        NOOP
326
-      #define W_DIR_WRITE(STATE)  L64XX_DIR_WRITE(W, STATE)
327
-      #define W_DIR_READ()        (stepper##W.getStatus() & STATUS_DIR);
328
-      #if AXIS_DRIVER_TYPE_W(L6470)
329
-        #define DISABLE_STEPPER_W() stepperW.free()
330
-      #endif
331
-    #endif
332
-  #endif
333
-#endif
334
-
335
-// E0 Stepper
336
-#if AXIS_IS_L64XX(E0)
337
-  extern L64XX_CLASS(E0)         stepperE0;
338
-  #define E0_ENABLE_INIT()       NOOP
339
-  #define E0_ENABLE_WRITE(STATE)  (STATE ? stepperE0.hardStop() : stepperE0.free())
340
-  #define E0_ENABLE_READ()       (stepperE0.getStatus() & STATUS_HIZ)
341
-  #if AXIS_DRIVER_TYPE_E0(L6474)
342
-    #define E0_DIR_INIT()        SET_OUTPUT(E0_DIR_PIN)
343
-    #define E0_DIR_WRITE(STATE)  L6474_DIR_WRITE(E0, STATE)
344
-    #define E0_DIR_READ()        READ(E0_DIR_PIN)
345
-  #else
346
-    #define E0_DIR_INIT()        NOOP
347
-    #define E0_DIR_WRITE(STATE)  L64XX_DIR_WRITE(E0, STATE)
348
-    #define E0_DIR_READ()        (stepper##E0.getStatus() & STATUS_DIR);
349
-    #if AXIS_DRIVER_TYPE_E0(L6470)
350
-      #define DISABLE_STEPPER_E0() do{ stepperE0.free(); }while(0)
351
-    #endif
352
-  #endif
353
-#endif
354
-
355
-// E1 Stepper
356
-#if AXIS_IS_L64XX(E1)
357
-  extern L64XX_CLASS(E1)         stepperE1;
358
-  #define E1_ENABLE_INIT()       NOOP
359
-  #define E1_ENABLE_WRITE(STATE) (STATE ? stepperE1.hardStop() : stepperE1.free())
360
-  #define E1_ENABLE_READ()       (stepperE1.getStatus() & STATUS_HIZ)
361
-  #if AXIS_DRIVER_TYPE_E1(L6474)
362
-    #define E1_DIR_INIT()        SET_OUTPUT(E1_DIR_PIN)
363
-    #define E1_DIR_WRITE(STATE)  L6474_DIR_WRITE(E1, STATE)
364
-    #define E1_DIR_READ()        READ(E1_DIR_PIN)
365
-  #else
366
-    #define E1_DIR_INIT()        NOOP
367
-    #define E1_DIR_WRITE(STATE)  L64XX_DIR_WRITE(E1, STATE)
368
-    #define E1_DIR_READ()        (stepper##E1.getStatus() & STATUS_DIR);
369
-    #if AXIS_DRIVER_TYPE_E1(L6470)
370
-      #define DISABLE_STEPPER_E1() do{ stepperE1.free(); }while(0)
371
-    #endif
372
-  #endif
373
-#endif
374
-
375
-// E2 Stepper
376
-#if AXIS_IS_L64XX(E2)
377
-  extern L64XX_CLASS(E2)         stepperE2;
378
-  #define E2_ENABLE_INIT()       NOOP
379
-  #define E2_ENABLE_WRITE(STATE) (STATE ? stepperE2.hardStop() : stepperE2.free())
380
-  #define E2_ENABLE_READ()       (stepperE2.getStatus() & STATUS_HIZ)
381
-  #if AXIS_DRIVER_TYPE_E2(L6474)
382
-    #define E2_DIR_INIT()        SET_OUTPUT(E2_DIR_PIN)
383
-    #define E2_DIR_WRITE(STATE)  L6474_DIR_WRITE(E2, STATE)
384
-    #define E2_DIR_READ()        READ(E2_DIR_PIN)
385
-  #else
386
-    #define E2_DIR_INIT()        NOOP
387
-    #define E2_DIR_WRITE(STATE)  L64XX_DIR_WRITE(E2, STATE)
388
-    #define E2_DIR_READ()        (stepper##E2.getStatus() & STATUS_DIR);
389
-    #if AXIS_DRIVER_TYPE_E2(L6470)
390
-      #define DISABLE_STEPPER_E2() do{ stepperE2.free(); }while(0)
391
-    #endif
392
-  #endif
393
-#endif
394
-
395
-// E3 Stepper
396
-#if AXIS_IS_L64XX(E3)
397
-  extern L64XX_CLASS(E3)         stepperE3;
398
-  #define E3_ENABLE_INIT()       NOOP
399
-  #define E3_ENABLE_WRITE(STATE) (STATE ? stepperE3.hardStop() : stepperE3.free())
400
-  #define E3_ENABLE_READ()       (stepperE3.getStatus() & STATUS_HIZ)
401
-  #if AXIS_DRIVER_TYPE_E3(L6474)
402
-    #define E3_DIR_INIT()        SET_OUTPUT(E3_DIR_PIN)
403
-    #define E3_DIR_WRITE(STATE)  L6474_DIR_WRITE(E3, STATE)
404
-    #define E3_DIR_READ()        READ(E3_DIR_PIN)
405
-  #else
406
-    #define E3_DIR_INIT()        NOOP
407
-    #define E3_DIR_WRITE(STATE)  L64XX_DIR_WRITE(E3, STATE)
408
-    #define E3_DIR_READ()        (stepper##E3.getStatus() & STATUS_DIR);
409
-  #endif
410
-#endif
411
-
412
-// E4 Stepper
413
-#if AXIS_IS_L64XX(E4)
414
-  extern L64XX_CLASS(E4)         stepperE4;
415
-  #define E4_ENABLE_INIT()       NOOP
416
-  #define E4_ENABLE_WRITE(STATE) (STATE ? stepperE4.hardStop() : stepperE4.free())
417
-  #define E4_ENABLE_READ()       (stepperE4.getStatus() & STATUS_HIZ)
418
-  #if AXIS_DRIVER_TYPE_E4(L6474)
419
-    #define E4_DIR_INIT()        SET_OUTPUT(E4_DIR_PIN)
420
-    #define E4_DIR_WRITE(STATE)  L6474_DIR_WRITE(E4, STATE)
421
-    #define E4_DIR_READ()        READ(E4_DIR_PIN)
422
-  #else
423
-    #define E4_DIR_INIT()        NOOP
424
-    #define E4_DIR_WRITE(STATE)  L64XX_DIR_WRITE(E4, STATE)
425
-    #define E4_DIR_READ()        (stepper##E4.getStatus() & STATUS_DIR);
426
-    #if AXIS_DRIVER_TYPE_E4(L6470)
427
-      #define DISABLE_STEPPER_E4() do{ stepperE4.free(); }while(0)
428
-    #endif
429
-  #endif
430
-#endif
431
-
432
-// E5 Stepper
433
-#if AXIS_IS_L64XX(E5)
434
-  extern L64XX_CLASS(E5)         stepperE5;
435
-  #define E5_ENABLE_INIT()       NOOP
436
-  #define E5_ENABLE_WRITE(STATE) (STATE ? stepperE5.hardStop() : stepperE5.free())
437
-  #define E5_ENABLE_READ()       (stepperE5.getStatus() & STATUS_HIZ)
438
-  #if AXIS_DRIVER_TYPE_E5(L6474)
439
-    #define E5_DIR_INIT()        SET_OUTPUT(E5_DIR_PIN)
440
-    #define E5_DIR_WRITE(STATE)  L6474_DIR_WRITE(E5, STATE)
441
-    #define E5_DIR_READ()        READ(E5_DIR_PIN)
442
-  #else
443
-    #define E5_DIR_INIT()        NOOP
444
-    #define E5_DIR_WRITE(STATE)  L64XX_DIR_WRITE(E5, STATE)
445
-    #define E5_DIR_READ()        (stepper##E5.getStatus() & STATUS_DIR);
446
-    #if AXIS_DRIVER_TYPE_E5(L6470)
447
-      #define DISABLE_STEPPER_E5() do{ stepperE5.free(); }while(0)
448
-    #endif
449
-  #endif
450
-#endif
451
-
452
-// E6 Stepper
453
-#if AXIS_IS_L64XX(E6)
454
-  extern L64XX_CLASS(E6)         stepperE6;
455
-  #define E6_ENABLE_INIT()       NOOP
456
-  #define E6_ENABLE_WRITE(STATE) (STATE ? stepperE6.hardStop() : stepperE6.free())
457
-  #define E6_ENABLE_READ()       (stepperE6.getStatus() & STATUS_HIZ)
458
-  #if AXIS_DRIVER_TYPE_E6(L6474)
459
-    #define E6_DIR_INIT()        SET_OUTPUT(E6_DIR_PIN)
460
-    #define E6_DIR_WRITE(STATE)  L6474_DIR_WRITE(E6, STATE)
461
-    #define E6_DIR_READ()        READ(E6_DIR_PIN)
462
-  #else
463
-    #define E6_DIR_INIT()        NOOP
464
-    #define E6_DIR_WRITE(STATE)  L64XX_DIR_WRITE(E6, STATE)
465
-    #define E6_DIR_READ()        (stepper##E6.getStatus() & STATUS_DIR);
466
-    #if AXIS_DRIVER_TYPE_E6(L6470)
467
-      #define DISABLE_STEPPER_E6() do{ stepperE6.free(); }while(0)
468
-    #endif
469
-  #endif
470
-#endif
471
-
472
-// E7 Stepper
473
-#if AXIS_IS_L64XX(E7)
474
-  extern L64XX_CLASS(E7)         stepperE7;
475
-  #define E7_ENABLE_INIT()       NOOP
476
-  #define E7_ENABLE_WRITE(STATE) (STATE ? stepperE7.hardStop() : stepperE7.free())
477
-  #define E7_ENABLE_READ()       (stepperE7.getStatus() & STATUS_HIZ)
478
-  #if AXIS_DRIVER_TYPE_E7(L6474)
479
-    #define E7_DIR_INIT()        SET_OUTPUT(E7_DIR_PIN)
480
-    #define E7_DIR_WRITE(STATE)  L6474_DIR_WRITE(E7, STATE)
481
-    #define E7_DIR_READ()        READ(E7_DIR_PIN)
482
-  #else
483
-    #define E7_DIR_INIT()        NOOP
484
-    #define E7_DIR_WRITE(STATE)  L64XX_DIR_WRITE(E7, STATE)
485
-    #define E7_DIR_READ()        (stepper##E7.getStatus() & STATUS_DIR);
486
-    #if AXIS_DRIVER_TYPE_E7(L6470)
487
-      #define DISABLE_STEPPER_E7() do{ stepperE7.free(); }while(0)
488
-    #endif
489
-  #endif
490
-#endif

+ 0
- 1
Marlin/src/module/stepper/indirection.cpp View File

@@ -38,7 +38,6 @@ void restore_stepper_drivers() {
38 38
 
39 39
 void reset_stepper_drivers() {
40 40
   TERN_(HAS_TMC26X, tmc26x_init_to_defaults());
41
-  TERN_(HAS_L64XX, L64xxManager.init_to_defaults());
42 41
   TERN_(HAS_TRINAMIC_CONFIG, reset_trinamic_drivers());
43 42
 }
44 43
 

+ 0
- 4
Marlin/src/module/stepper/indirection.h View File

@@ -32,10 +32,6 @@
32 32
 
33 33
 #include "../../inc/MarlinConfig.h"
34 34
 
35
-#if HAS_L64XX
36
-  #include "L64xx.h"
37
-#endif
38
-
39 35
 #if HAS_TMC26X
40 36
   #include "TMC26X.h"
41 37
 #endif

+ 4
- 4
Marlin/src/pins/pins.h View File

@@ -629,8 +629,6 @@
629 629
   #include "stm32f4/pins_RUMBA32_BTT.h"         // STM32F4                                env:rumba32
630 630
 #elif MB(BLACK_STM32F407VE)
631 631
   #include "stm32f4/pins_BLACK_STM32F407VE.h"   // STM32F4                                env:STM32F407VE_black
632
-#elif MB(STEVAL_3DP001V1)
633
-  #include "stm32f4/pins_STEVAL_3DP001V1.h"     // STM32F4                                env:STM32F401VE_STEVAL
634 632
 #elif MB(BTT_SKR_PRO_V1_1)
635 633
   #include "stm32f4/pins_BTT_SKR_PRO_V1_1.h"    // STM32F4                                env:BIGTREE_SKR_PRO env:BIGTREE_SKR_PRO_usb_flash_drive
636 634
 #elif MB(BTT_SKR_PRO_V1_2)
@@ -786,6 +784,7 @@
786 784
   #define BOARD_STM32F103R              99906
787 785
   #define BOARD_ESP32                   99907
788 786
   #define BOARD_STEVAL                  99908
787
+  #define BOARD_STEVAL_3DP001V1         99908
789 788
   #define BOARD_BIGTREE_SKR_V1_1        99909
790 789
   #define BOARD_BIGTREE_SKR_V1_3        99910
791 790
   #define BOARD_BIGTREE_SKR_V1_4        99911
@@ -841,7 +840,7 @@
841 840
   #elif MOTHERBOARD == BOARD_ESP32
842 841
     #error "BOARD_ESP32 has been renamed BOARD_ESPRESSIF_ESP32. Please update your configuration."
843 842
   #elif MB(STEVAL)
844
-    #error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration."
843
+    #error "BOARD_STEVAL_3DP001V1 (BOARD_STEVAL) is no longer supported in Marlin."
845 844
   #elif MB(RUMBA32)
846 845
     #error "BOARD_RUMBA32 is now BOARD_RUMBA32_MKS or BOARD_RUMBA32_V1_0. Please update your configuration."
847 846
   #elif MB(RUMBA32_AUS3D)
@@ -873,7 +872,7 @@
873 872
   #undef BOARD_STM32F103R
874 873
   #undef BOARD_ESP32
875 874
   #undef BOARD_STEVAL
876
-  #undef BOARD_BIGTREE_SKR_MINI_E3
875
+  #undef BOARD_STEVAL_3DP001V1
877 876
   #undef BOARD_BIGTREE_SKR_V1_1
878 877
   #undef BOARD_BIGTREE_SKR_V1_3
879 878
   #undef BOARD_BIGTREE_SKR_V1_4
@@ -881,6 +880,7 @@
881 880
   #undef BOARD_BIGTREE_BTT002_V1_0
882 881
   #undef BOARD_BIGTREE_SKR_PRO_V1_1
883 882
   #undef BOARD_BIGTREE_SKR_MINI_V1_1
883
+  #undef BOARD_BIGTREE_SKR_MINI_E3
884 884
   #undef BOARD_BIGTREE_SKR_E3_DIP
885 885
   #undef BOARD_RUMBA32
886 886
   #undef BOARD_RUMBA32_AUS3D

+ 0
- 15
Marlin/src/pins/pinsDebug_list.h View File

@@ -1826,21 +1826,6 @@
1826 1826
 #if PIN_EXISTS(K_SERIAL_RX)
1827 1827
   REPORT_NAME_DIGITAL(__LINE__, K_SERIAL_RX_PIN)
1828 1828
 #endif
1829
-#if PIN_EXISTS(L6470_CHAIN_SCK)
1830
-  REPORT_NAME_DIGITAL(__LINE__, L6470_CHAIN_SCK_PIN)
1831
-#endif
1832
-#if PIN_EXISTS(L6470_CHAIN_MISO)
1833
-  REPORT_NAME_DIGITAL(__LINE__, L6470_CHAIN_MISO_PIN)
1834
-#endif
1835
-#if PIN_EXISTS(L6470_CHAIN_MOSI)
1836
-  REPORT_NAME_DIGITAL(__LINE__, L6470_CHAIN_MOSI_PIN)
1837
-#endif
1838
-#if PIN_EXISTS(L6470_CHAIN_SS)
1839
-  REPORT_NAME_DIGITAL(__LINE__, L6470_CHAIN_SS_PIN)
1840
-#endif
1841
-#if PIN_EXISTS(L6470_RESET_CHAIN)
1842
-  REPORT_NAME_DIGITAL(__LINE__, L6470_RESET_CHAIN_PIN)
1843
-#endif
1844 1829
 #if PIN_EXISTS(FET_SAFETY)
1845 1830
   REPORT_NAME_DIGITAL(__LINE__, FET_SAFETY_PIN)
1846 1831
 #endif

+ 0
- 325
Marlin/src/pins/stm32f4/pins_STEVAL_3DP001V1.h View File

@@ -1,325 +0,0 @@
1
-/**
2
- * Marlin 3D Printer Firmware
3
- * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4
- *
5
- * Based on Sprinter and grbl.
6
- * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7
- *
8
- * This program is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
- *
21
- */
22
-#pragma once
23
-
24
-// Source: https://github.com/stm32duino/Arduino_Core_STM32/blob/master/variants/ST3DP001_EVAL/variant.cpp
25
-
26
-/**
27
- * HOW TO COMPILE
28
- *
29
- * PlatformIO - Use the STM32F401VE_STEVAL environment (or the "Auto Build Marlin" extension).
30
- *
31
- * Arduino - Tested with 1.8.10
32
- *      Install library per https://github.com/stm32duino/Arduino_Core_STM32
33
- *      Make the following selections under the TOOL menu in the Arduino IDE
34
- *          Board: "3D printer boards"
35
- *          Board part number: "STEVAL-3DP001V1"
36
- *          U(S)ART support: "Enabled (generic "Serial")"
37
- *          USB support (if available): "CDC (no generic "Serial")"
38
- *          Optimize: "Smallest (-Os default)"
39
- *          C Runtime Library: "newlib Nano (default)"
40
- */
41
-
42
-#include "env_validate.h"
43
-
44
-#ifndef MACHINE_NAME
45
-  #define MACHINE_NAME "STEVAL-3DP001V1"
46
-#endif
47
-
48
-//
49
-// Limit Switches
50
-//
51
-#define X_MIN_PIN                           PD8   // X_STOP
52
-#define Y_MIN_PIN                           PD9   // Y_STOP
53
-#define Z_MIN_PIN                           PD10  // Z_STOP
54
-
55
-#define X_MAX_PIN                           PD0   // W_STOP
56
-#define Y_MAX_PIN                           PA8   // V_STOP
57
-#define Z_MAX_PIN                           PD11  // U_STOP
58
-
59
-//
60
-// Z Probe (when not Z_MIN_PIN)
61
-//
62
-//#ifndef Z_MIN_PROBE_PIN
63
-//  #define Z_MIN_PROBE_PIN                 PA4   // SPI1_CS
64
-//#endif
65
-
66
-//
67
-// Filament runout
68
-//
69
-//#define FIL_RUNOUT_PIN                    PA3   // BED_THERMISTOR_3
70
-
71
-//
72
-// Steppers
73
-//
74
-
75
-#define X_STEP_PIN                          PE14  // X_PWM
76
-#define X_DIR_PIN                           PE15  // X_DIR
77
-#define X_ENABLE_PIN                        PE13  // X_RESET
78
-#define X_CS_PIN                            PA4   // SPI1_CS
79
-
80
-#define Y_STEP_PIN                          PB10  // Y_PWM
81
-#define Y_DIR_PIN                           PE9   // Y_DIR
82
-#define Y_ENABLE_PIN                        PE10  // Y_RESET
83
-#define Y_CS_PIN                            PA4   // SPI1_CS
84
-
85
-#define Z_STEP_PIN                          PC6   // Z_PWM
86
-#define Z_DIR_PIN                           PC0   // Z_DIR
87
-#define Z_ENABLE_PIN                        PC15  // Z_RESET
88
-#define Z_CS_PIN                            PA4   // SPI1_CS
89
-
90
-#define E0_STEP_PIN                         PD12  // E1_PW
91
-#define E0_DIR_PIN                          PC13  // E1_DIR
92
-#define E0_ENABLE_PIN                       PC14  // E1_RESET
93
-#define E0_CS_PIN                           PA4   // SPI1_CS
94
-
95
-#define E1_STEP_PIN                         PE5   // E2_PWM
96
-#define E1_DIR_PIN                          PE6   // E2_DIR
97
-#define E1_ENABLE_PIN                       PE4   // E2_RESET
98
-#define E1_CS_PIN                           PA4   // SPI1_CS
99
-
100
-#define E2_STEP_PIN                         PB8   // E3_PWM
101
-#define E2_DIR_PIN                          PE2   // E3_DIR
102
-#define E2_ENABLE_PIN                       PE3   // E3_RESET
103
-#define E2_CS_PIN                           PA4   // SPI1_CS
104
-
105
-// needed to pass a sanity check
106
-#define X2_CS_PIN                           PA4   // SPI1_CS
107
-#define Y2_CS_PIN                           PA4   // SPI1_CS
108
-#define Z2_CS_PIN                           PA4   // SPI1_CS
109
-#define Z3_CS_PIN                           PA4   // SPI1_CS
110
-#define E3_CS_PIN                           PA4   // SPI1_CS
111
-#define E4_CS_PIN                           PA4   // SPI1_CS
112
-#define E5_CS_PIN                           PA4   // SPI1_CS
113
-
114
-#if HAS_L64XX
115
-  #define L6470_CHAIN_SCK_PIN               PA5   // SPI1_SCK
116
-  #define L6470_CHAIN_MISO_PIN              PA6   // SPI1_MISO
117
-  #define L6470_CHAIN_MOSI_PIN              PA7   // SPI1_MOSI
118
-  #define L6470_CHAIN_SS_PIN                PA4   // SPI1_CS
119
-
120
-  //#define SD_SCK_PIN       L6470_CHAIN_SCK_PIN
121
-  //#define SD_MISO_PIN     L6470_CHAIN_MISO_PIN
122
-  //#define SD_MOSI_PIN     L6470_CHAIN_MOSI_PIN
123
-#else
124
-  //#define SD_SCK_PIN                      PB13  // SPI2_SCK
125
-  //#define SD_MISO_PIN                     PB14  // SPI2_MISO
126
-  //#define SD_MOSI_PIN                     PB15  // SPI2_MOSI
127
-#endif
128
-
129
-/**
130
- * Macro to reset/enable L6474 stepper drivers
131
- *
132
- * IMPORTANT - To disable (bypass) L6474s, install the corresponding
133
- *             resistors (R11 - R17) and change the "V" to "0" for the
134
- *             corresponding pins here:
135
- */
136
-#define ENABLE_RESET_L64XX_CHIPS(V)   do{ OUT_WRITE(X_ENABLE_PIN, V); \
137
-                                          OUT_WRITE(Y_ENABLE_PIN, V); \
138
-                                          OUT_WRITE(Z_ENABLE_PIN, V); \
139
-                                          OUT_WRITE(E0_ENABLE_PIN,V); \
140
-                                          OUT_WRITE(E1_ENABLE_PIN,V); \
141
-                                          OUT_WRITE(E2_ENABLE_PIN,V); \
142
-                                        }while(0)
143
-
144
-//
145
-// Temperature Sensors
146
-//
147
-#define TEMP_0_PIN                          PA0   // Analog Input 3
148
-#define TEMP_1_PIN                          PA1   // Analog Input 4
149
-#define TEMP_2_PIN                          PA2   // Analog Input 5
150
-#define TEMP_BED_PIN                        PC2   // Analog Input 0
151
-#define TEMP_BED_1_PIN                      PC3   // Analog Input 1
152
-#define TEMP_BED_2_PIN                      PA3   // Analog Input 2
153
-
154
-//
155
-// Heaters / Fans
156
-//
157
-#define HEATER_0_PIN                        PC7   // E1_HEAT_PWM
158
-#define HEATER_1_PIN                        PB0   // E2_HEAT_PWM
159
-#define HEATER_2_PIN                        PB1   // E3_HEAT_PWM
160
-#define HEATER_BED_PIN                      PD14  // BED_HEAT_1 FET
161
-#define HEATER_BED_1_PIN                    PD13  // BED_HEAT_2 FET
162
-#define HEATER_BED_2_PIN                    PD15  // BED_HEAT_3 FET
163
-
164
-#define FAN_PIN                             PC4   // E1_FAN   PWM pin, Part cooling fan FET
165
-#define FAN1_PIN                            PC5   // E2_FAN   PWM pin, Extruder fan FET
166
-#define FAN2_PIN                            PE8   // E3_FAN   PWM pin, Controller fan FET
167
-
168
-#ifndef E0_AUTO_FAN_PIN
169
-  #define E0_AUTO_FAN_PIN                   PC5   // FAN1_PIN
170
-#endif
171
-
172
-//
173
-// Misc functions
174
-//
175
-#define LED_PIN                             -1    // PE1  Green LED Heartbeat
176
-#define PS_ON_PIN                           -1
177
-#define KILL_PIN                            -1
178
-#define POWER_LOSS_PIN                      -1    // PWR_LOSS / nAC_FAULT
179
-
180
-//
181
-// LCD / Controller
182
-//
183
-//#define SD_DETECT_PIN                     PA15  // SD_CARD_DETECT
184
-//#define BEEPER_PIN                        PC9   // SDIO_D1
185
-//#define LCD_PINS_RS                       PE9   // Y_DIR
186
-//#define LCD_PINS_ENABLE                   PE8   // E3_FAN
187
-//#define LCD_PINS_D4                       PB12  // SPI2_CS
188
-//#define LCD_PINS_D5                       PB13  // SPI2_SCK
189
-//#define LCD_PINS_D6                       PB14  // SPI2_MISO
190
-//#define LCD_PINS_D7                       PB15  // SPI2_MOSI
191
-//#define BTN_EN1                           PC4   // E1_FAN
192
-//#define BTN_EN2                           PC5   // E2_FAN
193
-//#define BTN_ENC                           PC3   // BED_THERMISTOR_2
194
-
195
-//
196
-// Extension pins
197
-//
198
-//#define EXT0_PIN                          PB0   // E2_HEAT
199
-//#define EXT1_PIN                          PB1   // E3_HEAT
200
-//#define EXT2_PIN                          PB2   // not used (tied to ground)
201
-//#define EXT3_PIN                          PD8   // X_STOP
202
-//#define EXT4_PIN                          PD9   // Y_STOP
203
-//#define EXT5_PIN                          PD10  // Z_STOP
204
-//#define EXT6_PIN                          PD11  // U_STOP
205
-//#define EXT7_PIN                          PD12  // E1_PWM
206
-//#define EXT8_PIN                          PB10  // Y_PWM
207
-
208
-// WIFI
209
-// PD3   CTS
210
-// PD4   RTS
211
-// PD5   TX
212
-// PD6   RX
213
-// PB5   WIFI_WAKEUP
214
-// PE11  WIFI_RESET
215
-// PE12  WIFI_BOOT
216
-
217
-// I2C USER
218
-// PB7   SDA
219
-// PB6   SCL
220
-
221
-// JTAG
222
-// PA13  JTAG_TMS/SWDIO
223
-// PA14  JTAG_TCK/SWCLK
224
-// PB3   JTAG_TDO/SWO
225
-
226
-//
227
-// Onboard SD support
228
-//
229
-#ifndef SDCARD_CONNECTION
230
-  #define SDCARD_CONNECTION              ONBOARD
231
-#endif
232
-
233
-#if SD_CONNECTION_IS(ONBOARD)
234
-
235
-  #define SDIO_SUPPORT                            // Use SDIO for onboard SD
236
-  #if DISABLED(SDIO_SUPPORT)
237
-    #define SOFTWARE_SPI                          // Use soft SPI for onboard SD
238
-    #define SDSS                            PC11
239
-    #define SD_SCK_PIN                      PC12
240
-    #define SD_MISO_PIN                     PC8
241
-    #define SD_MOSI_PIN                     PD2
242
-  #endif
243
-
244
-  //#define SD_DETECT_PIN                   PA15
245
-
246
-#endif
247
-
248
-#ifndef SDSS
249
-  #define SDSS                              PA4   // SPI1_CS
250
-#endif
251
-
252
-// OTG
253
-// PA11   OTG_DM
254
-// PA12   OTG_DP
255
-
256
-// USER_PINS
257
-// PD7    USER3
258
-// PB9    USER1
259
-// PE0    USER2
260
-// PB4    USER4
261
-
262
-// USERKET
263
-// PE7    USER_BUTTON
264
-
265
-// PA9    TX
266
-// PA10   RX
267
-
268
-// IR/PROBE
269
-// PD1    IR_OUT
270
-// PC1    IR_ON
271
-
272
-/**
273
- * Logical pin vs. port/pin cross reference
274
- *
275
- * PA0    E1_THERMISTOR           PD0    W_STOP
276
- * PA1    E2_THERMISTOR           PD1    IR_OUT
277
- * PA2    E3_THERMISTOR           PD2    SDIO_CMD
278
- * PA3    BED_THERMISTOR_3        PD3    CTS
279
- * PA4    SPI1_CS                 PD4    RTS
280
- * PA5    SPI1_SCK                PD5    TX
281
- * PA6    SPI1_MISO               PD6    RX
282
- * PA7    SPI1_MOSI               PD7    USER3
283
- * PA8    V_STOP                  PD8    X_STOP
284
- * PA9    TX                      PD9    Y_STOP
285
- * PA10   RX                      PD10   Z_STOP
286
- * PA11   OTG_DM                  PD11   U_STOP
287
- * PA12   OTG_DP                  PD12   E1_PWM
288
- * PA13   JTAG_TMS/SWDIO          PD13   BED_HEAT_2
289
- * PA14   JTAG_TCK/SWCLK          PD14   BED_HEAT_1
290
- * PA15   SD_CARD_DETECT          PD15   BED_HEAT_3
291
- *
292
- * PB0    E2_HEAT_PWM             PE0    USER2
293
- * PB1    E3_HEAT_PWM             PE1    STATUS_LED
294
- * PB2    ---                     PE2    E3_DIR
295
- * PB3    JTAG_TDO/SWO            PE3    E3_RESET
296
- * PB4    USER4                   PE4    E2_RESET
297
- * PB5    WIFI_WAKEUP             PE5    E2_PWM
298
- * PB6    SCL                     PE6    E2_DIR
299
- * PB7    SDA                     PE7    USER_BUTTON
300
- * PB8    E3_PWM                  PE8    E3_FAN
301
- * PB9    USER1                   PE9    Y_DIR
302
- * PB10   Y_PWM                   PE10   Y_RESET
303
- * PB11   ---                     PE11   WIFI_RESET
304
- * PB12   SPI2_CS                 PE12   WIFI_BOOT
305
- * PB13   SPI2_SCK                PE13   X_RESET
306
- * PB14   SPI2_MISO               PE14   X_PWM
307
- * PB15   SPI2_MOSI               PE15   X_DIR
308
- *
309
- * PC0    Z_DIR
310
- * PC1    IR_ON
311
- * PC2    BED_THERMISTOR_1
312
- * PC3    BED_THERMISTOR_2
313
- * PC4    E1_FAN
314
- * PC5    E2_FAN
315
- * PC6    Z_PWM
316
- * PC7    E1_HEAT_PWM
317
- * PC8    SDIO_D0
318
- * PC9    SDIO_D1
319
- * PC10   SDIO_D2
320
- * PC11   SDIO_D3
321
- * PC12   SDIO_CK
322
- * PC13   E1_DIR
323
- * PC14   E1_RESET
324
- * PC15   Z_RESET
325
- */

+ 0
- 64
buildroot/share/PlatformIO/boards/marlin_STEVAL_STM32F401VE.json View File

@@ -1,64 +0,0 @@
1
-{
2
-  "build": {
3
-    "core": "stm32",
4
-    "cpu": "cortex-m4",
5
-    "extra_flags": "-DSTM32F401xx -DARDUINO_STEVAL",
6
-    "f_cpu": "84000000L",
7
-    "hwids": [
8
-      [
9
-        "0x1EAF",
10
-        "0x0003"
11
-      ],
12
-      [
13
-        "0x0483",
14
-        "0x3748"
15
-      ]
16
-    ],
17
-    "mcu": "stm32f401vet6",
18
-    "variant": "MARLIN_STEVAL_F401VE"
19
-  },
20
-  "debug": {
21
-    "jlink_device": "STM32F401VE",
22
-    "openocd_target": "stm32f4x",
23
-    "svd_path": "STM32F40x.svd",
24
-    "tools": {
25
-      "stlink": {
26
-        "server": {
27
-          "arguments": [
28
-            "-f",
29
-            "scripts/interface/stlink.cfg",
30
-            "-c",
31
-            "transport select hla_swd",
32
-            "-f",
33
-            "scripts/target/stm32f4x.cfg",
34
-            "-c",
35
-            "reset_config none"
36
-          ],
37
-          "executable": "bin/openocd",
38
-          "package": "tool-openocd"
39
-        }
40
-      }
41
-    }
42
-  },
43
-  "frameworks": [
44
-    "arduino",
45
-    "stm32cube"
46
-  ],
47
-  "name": "STM32F401VE (96k RAM. 512k Flash)",
48
-  "upload": {
49
-    "disable_flushing": false,
50
-    "maximum_ram_size": 98304,
51
-    "maximum_size": 514288,
52
-    "protocol": "stlink",
53
-    "protocols": [
54
-      "stlink",
55
-      "dfu",
56
-      "jlink"
57
-    ],
58
-    "require_upload_port": true,
59
-    "use_1200bps_touch": false,
60
-    "wait_for_upload_port": false
61
-  },
62
-  "url": "https://www.st.com/en/evaluation-tools/steval-3dp001v1.html",
63
-  "vendor": "Generic"
64
-}

+ 0
- 260
buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PeripheralPins.c View File

@@ -1,260 +0,0 @@
1
-
2
-/*
3
- *******************************************************************************
4
- * Copyright (c) 2019, STMicroelectronics
5
- * All rights reserved.
6
- *
7
- * This software component is licensed by ST under BSD 3-Clause license,
8
- * the "License"; You may not use this file except in compliance with the
9
- * License. You may obtain a copy of the License at:
10
- *                        opensource.org/licenses/BSD-3-Clause
11
- *
12
- *******************************************************************************
13
- * Automatically generated from STM32F401V(D-E)Tx.xml
14
- */
15
-#include "Arduino.h"
16
-#include "PeripheralPins.h"
17
-
18
-/* =====
19
- * Note: Commented lines are alternative possibilities which are not used per default.
20
- *       If you change them, you will have to know what you do
21
- * =====
22
- */
23
-
24
-//*** ADC ***
25
-
26
-#ifdef HAL_ADC_MODULE_ENABLED
27
-WEAK const PinMap PinMap_ADC[] = {
28
-  {PA_0,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 0, 0)}, // ADC1_IN0
29
-  {PA_1,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 1, 0)}, // ADC1_IN1
30
-  {PA_2,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 2, 0)}, // ADC1_IN2
31
-  {PA_3,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 3, 0)}, // ADC1_IN3
32
-  //{PA_4,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 4, 0)}, // ADC1_IN4
33
-  //{PA_5,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 5, 0)}, // ADC1_IN5
34
-  //{PA_6,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 6, 0)}, // ADC1_IN6
35
-  //{PA_7,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 7, 0)}, // ADC1_IN7
36
-  //{PB_0,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 8, 0)}, // ADC1_IN8
37
-  //{PB_1,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 9, 0)}, // ADC1_IN9
38
-  //{PC_0,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 10, 0)}, // ADC1_IN10
39
-  //{PC_1,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 11, 0)}, // ADC1_IN11
40
-  {PC_2,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 12, 0)}, // ADC1_IN12
41
-  {PC_3,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 13, 0)}, // ADC1_IN13
42
-  //{PC_4,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 14, 0)}, // ADC1_IN14
43
-  //{PC_5,  ADC1,  STM_PIN_DATA_EXT(STM_MODE_ANALOG, GPIO_NOPULL, 0, 15, 0)}, // ADC1_IN15
44
-  {NC,    NP,    0}
45
-};
46
-#endif
47
-
48
-//*** No DAC ***
49
-
50
-//*** I2C ***
51
-
52
-#ifdef HAL_I2C_MODULE_ENABLED
53
-WEAK const PinMap PinMap_I2C_SDA[] = {
54
-  //{PB_3,  I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C2)},
55
-  //{PB_4,  I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF9_I2C3)},
56
-  {PB_7,  I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
57
-  //{PB_9,  I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
58
-  //{PC_9,  I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
59
-  {NC,    NP,    0}
60
-};
61
-
62
-WEAK const PinMap PinMap_I2C_SCL[] = {
63
-  //{PA_8,  I2C3, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C3)},
64
-  {PB_6,  I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
65
-  //{PB_8,  I2C1, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C1)},
66
-  //{PB_10, I2C2, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_NOPULL, GPIO_AF4_I2C2)},
67
-  {NC,    NP,    0}
68
-};
69
-#endif
70
-
71
-//*** PWM ***
72
-
73
-#ifdef HAL_TIM_MODULE_ENABLED
74
-WEAK const PinMap PinMap_PWM[] = {
75
-  //{PA_0,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
76
-  //{PA_0,  TIM5,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 1, 0)}, // TIM5_CH1
77
-  //{PA_1,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
78
-  //{PA_1,  TIM5,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 2, 0)}, // TIM5_CH2
79
-  //{PA_2,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
80
-  //{PA_2,  TIM5,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 3, 0)}, // TIM5_CH3
81
-  //{PA_2,  TIM9,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1
82
-  //{PA_3,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 4, 0)}, // TIM2_CH4
83
-  //{PA_3,  TIM5,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM5, 4, 0)}, // TIM5_CH4
84
-  //{PA_3,  TIM9,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2
85
-  //{PA_5,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
86
-  //{PA_6,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
87
-  //{PA_7,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
88
-  //{PA_7,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
89
-  //{PA_8,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
90
-  //{PA_9,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
91
-  //{PA_10, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
92
-  //{PA_11, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
93
-  //{PA_15, TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 1, 0)}, // TIM2_CH1
94
-  //{PB_0,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
95
-  {PB_0,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3
96
-  //{PB_1,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
97
-  {PB_1,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4
98
-  //{PB_3,  TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 2, 0)}, // TIM2_CH2
99
-  //{PB_4,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
100
-  //{PB_5,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
101
-  //{PB_6,  TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1
102
-  //{PB_7,  TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2
103
-  //{PB_8,  TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3
104
-  //{PB_8,  TIM10,  STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM10, 1, 0)}, // TIM10_CH1
105
-  //{PB_9,  TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
106
-  //{PB_9,  TIM11,  STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM11, 1, 0)}, // TIM11_CH1
107
-  {PB_10, TIM2,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM2, 3, 0)}, // TIM2_CH3
108
-  //{PB_13, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
109
-  //{PB_14, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
110
-  //{PB_15, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
111
-  {PC_6,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 1, 0)}, // TIM3_CH1
112
-  {PC_7,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 2, 0)}, // TIM3_CH2
113
-  //{PC_8,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 3, 0)}, // TIM3_CH3
114
-  //{PC_9,  TIM3,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM3, 4, 0)}, // TIM3_CH4
115
-  {PD_12, TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 1, 0)}, // TIM4_CH1
116
-  {PD_13, TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 2, 0)}, // TIM4_CH2
117
-  {PD_14, TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 3, 0)}, // TIM4_CH3
118
-  {PD_15, TIM4,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF2_TIM4, 4, 0)}, // TIM4_CH4
119
-  {PE_5,  TIM9,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 1, 0)}, // TIM9_CH1
120
-  //{PE_6,  TIM9,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF3_TIM9, 2, 0)}, // TIM9_CH2
121
-  //{PE_8,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 1)}, // TIM1_CH1N
122
-  //{PE_9,  TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 1, 0)}, // TIM1_CH1
123
-  //{PE_10, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 1)}, // TIM1_CH2N
124
-  //{PE_11, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 2, 0)}, // TIM1_CH2
125
-  //{PE_12, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 1)}, // TIM1_CH3N
126
-  //{PE_13, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 3, 0)}, // TIM1_CH3
127
-  {PE_14, TIM1,   STM_PIN_DATA_EXT(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF1_TIM1, 4, 0)}, // TIM1_CH4
128
-  {NC,    NP,    0}
129
-};
130
-#endif
131
-
132
-//*** SERIAL ***
133
-
134
-#ifdef HAL_UART_MODULE_ENABLED
135
-WEAK const PinMap PinMap_UART_TX[] = {
136
-  //{PA_2,  USART2,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
137
-  {PA_9,  USART1,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
138
-  //{PA_11, USART6,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
139
-  //{PB_6,  USART1,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
140
-  //{PC_6,  USART6,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
141
-  {PD_5,  USART2,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
142
-  {NC,    NP,    0}
143
-};
144
-
145
-WEAK const PinMap PinMap_UART_RX[] = {
146
-  //{PA_3,  USART2,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
147
-  {PA_10, USART1,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
148
-  //{PA_12, USART6,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
149
-  //{PB_7,  USART1,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
150
-  //{PC_7,  USART6,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF8_USART6)},
151
-  {PD_6,  USART2,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
152
-  {NC,    NP,    0}
153
-};
154
-
155
-WEAK const PinMap PinMap_UART_RTS[] = {
156
-  //{PA_1,  USART2,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
157
-  //{PA_12, USART1,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
158
-  {PD_4,  USART2,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
159
-  {NC,    NP,    0}
160
-};
161
-
162
-WEAK const PinMap PinMap_UART_CTS[] = {
163
-  //{PA_0,  USART2,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
164
-  //{PA_11, USART1,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART1)},
165
-  {PD_3,  USART2,  STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF7_USART2)},
166
-  {NC,    NP,    0}
167
-};
168
-#endif
169
-
170
-//*** SPI ***
171
-
172
-#ifdef HAL_SPI_MODULE_ENABLED
173
-WEAK const PinMap PinMap_SPI_MOSI[] = {
174
-  {PA_7,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
175
-  //{PB_5,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
176
-  //{PB_5,  SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
177
-  {PB_15, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
178
-  //{PC_3,  SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
179
-  //{PC_12, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
180
-  //{PD_6,  SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
181
-  //{PE_6,  SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)},
182
-  //{PE_14, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)},
183
-  {NC,    NP,    0}
184
-};
185
-
186
-WEAK const PinMap PinMap_SPI_MISO[] = {
187
-  {PA_6,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
188
-  //{PB_4,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
189
-  //{PB_4,  SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
190
-  {PB_14, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
191
-  //{PC_2,  SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
192
-  //{PC_11, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
193
-  //{PE_5,  SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)},
194
-  //{PE_13, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)},
195
-  {NC,    NP,    0}
196
-};
197
-
198
-WEAK const PinMap PinMap_SPI_SCLK[] = {
199
-  {PA_5,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
200
-  //{PB_3,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
201
-  //{PB_3,  SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
202
-  //{PB_10, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
203
-  {PB_13, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
204
-  //{PC_10, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
205
-  //{PD_3,  SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
206
-  //{PE_2,  SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)},
207
-  //{PE_12, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)},
208
-  {NC,    NP,    0}
209
-};
210
-
211
-WEAK const PinMap PinMap_SPI_SSEL[] = {
212
-  {PA_4,  SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
213
-  //{PA_4,  SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
214
-  //{PA_15, SPI1, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI1)},
215
-  //{PA_15, SPI3, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF6_SPI3)},
216
-  //{PB_9,  SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
217
-  {PB_12, SPI2, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI2)},
218
-  //{PE_4,  SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)},
219
-  //{PE_11, SPI4, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF5_SPI4)},
220
-  {NC,    NP,    0}
221
-};
222
-#endif
223
-
224
-//*** No CAN ***
225
-
226
-//*** No ETHERNET ***
227
-
228
-//*** No QUADSPI ***
229
-
230
-//*** USB ***
231
-
232
-#ifdef HAL_PCD_MODULE_ENABLED
233
-WEAK const PinMap PinMap_USB_OTG_FS[] = {
234
-  //{PA_8,  USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_SOF
235
-  //{PA_9,  USB_OTG_FS, STM_PIN_DATA(STM_MODE_INPUT, GPIO_NOPULL, GPIO_AF_NONE)}, // USB_OTG_FS_VBUS
236
-  //{PA_10, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_OD, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_ID
237
-  {PA_11, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DM
238
-  {PA_12, USB_OTG_FS, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF10_OTG_FS)}, // USB_OTG_FS_DP
239
-  {NC,    NP,    0}
240
-};
241
-#endif
242
-
243
-//*** No USB_OTG_HS ***
244
-//*** SD ***
245
-
246
-#ifdef HAL_SD_MODULE_ENABLED
247
-WEAK const PinMap PinMap_SD[] = {
248
-  //{PB_8,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D4
249
-  //{PB_9,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D5
250
-  //{PC_6,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D6
251
-  //{PC_7,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D7
252
-  {PC_8,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D0
253
-  {PC_9,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D1
254
-  {PC_10, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D2
255
-  {PC_11, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_PULLUP, GPIO_AF12_SDIO)}, // SDIO_D3
256
-  {PC_12, SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CK
257
-  {PD_2,  SDIO, STM_PIN_DATA(STM_MODE_AF_PP, GPIO_NOPULL, GPIO_AF12_SDIO)}, // SDIO_CMD
258
-  {NC,    NP,    0}
259
-};
260
-#endif

+ 0
- 33
buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/PinNamesVar.h View File

@@ -1,33 +0,0 @@
1
-/* SYS_WKUP */
2
-#ifdef PWR_WAKEUP_PIN1
3
-  SYS_WKUP1 = PA_0,
4
-#endif
5
-#ifdef PWR_WAKEUP_PIN2
6
-  SYS_WKUP2 = NC,
7
-#endif
8
-#ifdef PWR_WAKEUP_PIN3
9
-  SYS_WKUP3 = NC,
10
-#endif
11
-#ifdef PWR_WAKEUP_PIN4
12
-  SYS_WKUP4 = NC,
13
-#endif
14
-#ifdef PWR_WAKEUP_PIN5
15
-  SYS_WKUP5 = NC,
16
-#endif
17
-#ifdef PWR_WAKEUP_PIN6
18
-  SYS_WKUP6 = NC,
19
-#endif
20
-#ifdef PWR_WAKEUP_PIN7
21
-  SYS_WKUP7 = NC,
22
-#endif
23
-#ifdef PWR_WAKEUP_PIN8
24
-  SYS_WKUP8 = NC,
25
-#endif
26
-/* USB */
27
-#ifdef USBCON
28
-  USB_OTG_FS_SOF  = PA_8,
29
-  USB_OTG_FS_VBUS = PA_9,
30
-  USB_OTG_FS_ID   = PA_10,
31
-  USB_OTG_FS_DM   = PA_11,
32
-  USB_OTG_FS_DP   = PA_12,
33
-#endif

+ 0
- 495
buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/hal_conf_custom.h View File

@@ -1,495 +0,0 @@
1
-/**
2
-  ******************************************************************************
3
-  * @file    stm32f4xx_hal_conf.h
4
-  * @brief   HAL configuration file.
5
-  ******************************************************************************
6
-  * @attention
7
-  *
8
-  * <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
9
-  * All rights reserved.</center></h2>
10
-  *
11
-  * This software component is licensed by ST under BSD 3-Clause license,
12
-  * the "License"; You may not use this file except in compliance with the
13
-  * License. You may obtain a copy of the License at:
14
-  *                        opensource.org/licenses/BSD-3-Clause
15
-  *
16
-  ******************************************************************************
17
-  */
18
-
19
-/* Define to prevent recursive inclusion -------------------------------------*/
20
-#ifndef __STM32F4xx_HAL_CONF_CUSTOM
21
-#define __STM32F4xx_HAL_CONF_CUSTOM
22
-
23
-#ifdef __cplusplus
24
-extern "C" {
25
-#endif
26
-
27
-/* Exported types ------------------------------------------------------------*/
28
-/* Exported constants --------------------------------------------------------*/
29
-
30
-/* ########################## Module Selection ############################## */
31
- /**
32
-  * @brief This is the list of modules to be used in the HAL driver
33
-  */
34
-#define HAL_MODULE_ENABLED
35
-#define HAL_ADC_MODULE_ENABLED
36
-#define HAL_CRC_MODULE_ENABLED
37
-#define HAL_DMA_MODULE_ENABLED
38
-#define HAL_EXTI_MODULE_ENABLED   // Needed for Endstop (and other external) Interrupts
39
-#define HAL_FLASH_MODULE_ENABLED
40
-#define HAL_GPIO_MODULE_ENABLED
41
-#define HAL_I2C_MODULE_ENABLED
42
-#define HAL_IWDG_MODULE_ENABLED
43
-#define HAL_PWR_MODULE_ENABLED
44
-#define HAL_RCC_MODULE_ENABLED
45
-#define HAL_RTC_MODULE_ENABLED
46
-#define HAL_SD_MODULE_ENABLED
47
-#define HAL_SPI_MODULE_ENABLED
48
-#define HAL_TIM_MODULE_ENABLED
49
-#define HAL_CORTEX_MODULE_ENABLED
50
-//#define HAL_PCD_MODULE_ENABLED // Automatically added if any type of USB is enabled, as in Arduino IDE. (STM32 v3.10700.191028)
51
-
52
-//#define HAL_CAN_MODULE_ENABLED
53
-//#define HAL_CAN_LEGACY_MODULE_ENABLED
54
-//#define HAL_CEC_MODULE_ENABLED
55
-//#define HAL_CRYP_MODULE_ENABLED
56
-//#define HAL_DAC_MODULE_ENABLED
57
-//#define HAL_DCMI_MODULE_ENABLED
58
-//#define HAL_DMA2D_MODULE_ENABLED
59
-//#define HAL_ETH_MODULE_ENABLED
60
-//#define HAL_NAND_MODULE_ENABLED
61
-//#define HAL_NOR_MODULE_ENABLED
62
-//#define HAL_PCCARD_MODULE_ENABLED
63
-//#define HAL_SRAM_MODULE_ENABLED
64
-//#define HAL_SDRAM_MODULE_ENABLED
65
-//#define HAL_HASH_MODULE_ENABLED
66
-//#define HAL_SMBUS_MODULE_ENABLED
67
-//#define HAL_I2S_MODULE_ENABLED
68
-//#define HAL_LTDC_MODULE_ENABLED
69
-//#define HAL_DSI_MODULE_ENABLED
70
-//#define HAL_QSPI_MODULE_ENABLED
71
-//#define HAL_RNG_MODULE_ENABLED
72
-//#define HAL_SAI_MODULE_ENABLED
73
-//#define HAL_UART_MODULE_ENABLED // by default
74
-//#define HAL_USART_MODULE_ENABLED
75
-//#define HAL_IRDA_MODULE_ENABLED
76
-//#define HAL_SMARTCARD_MODULE_ENABLED
77
-//#define HAL_WWDG_MODULE_ENABLED
78
-//#define HAL_HCD_MODULE_ENABLED
79
-//#define HAL_FMPI2C_MODULE_ENABLED
80
-//#define HAL_SPDIFRX_MODULE_ENABLED
81
-//#define HAL_DFSDM_MODULE_ENABLED
82
-//#define HAL_LPTIM_MODULE_ENABLED
83
-//#define HAL_MMC_MODULE_ENABLED
84
-
85
-/* ########################## HSE/HSI Values adaptation ##################### */
86
-/**
87
-  * @brief Adjust the value of External High Speed oscillator (HSE) used in your application.
88
-  *        This value is used by the RCC HAL module to compute the system frequency
89
-  *        (when HSE is used as system clock source, directly or through the PLL).
90
-  */
91
-#ifndef HSE_VALUE
92
-#define HSE_VALUE              8000000U /*!< Value of the External oscillator in Hz */
93
-#endif /* HSE_VALUE */
94
-
95
-#ifndef HSE_STARTUP_TIMEOUT
96
-#define HSE_STARTUP_TIMEOUT    100U      /*!< Time out for HSE start up, in ms */
97
-#endif /* HSE_STARTUP_TIMEOUT */
98
-
99
-/**
100
-  * @brief Internal High Speed oscillator (HSI) value.
101
-  *        This value is used by the RCC HAL module to compute the system frequency
102
-  *        (when HSI is used as system clock source, directly or through the PLL).
103
-  */
104
-#ifndef HSI_VALUE
105
-#define HSI_VALUE              16000000U /*!< Value of the Internal oscillator in Hz */
106
-#endif /* HSI_VALUE */
107
-
108
-/**
109
-  * @brief Internal Low Speed oscillator (LSI) value.
110
-  */
111
-#ifndef LSI_VALUE
112
-#define LSI_VALUE               32000U    /*!< LSI Typical Value in Hz */
113
-#endif /* LSI_VALUE */                      /*!< Value of the Internal Low Speed oscillator in Hz
114
-The real value may vary depending on the variations
115
-in voltage and temperature. */
116
-/**
117
-  * @brief External Low Speed oscillator (LSE) value.
118
-  */
119
-#ifndef LSE_VALUE
120
-#define LSE_VALUE               32768U    /*!< Value of the External Low Speed oscillator in Hz */
121
-#endif /* LSE_VALUE */
122
-
123
-#ifndef LSE_STARTUP_TIMEOUT
124
-#define LSE_STARTUP_TIMEOUT    5000U     /*!< Time out for LSE start up, in ms */
125
-#endif /* LSE_STARTUP_TIMEOUT */
126
-
127
-/**
128
-  * @brief External clock source for I2S peripheral
129
-  *        This value is used by the I2S HAL module to compute the I2S clock source
130
-  *        frequency, this source is inserted directly through I2S_CKIN pad.
131
-  */
132
-#ifndef EXTERNAL_CLOCK_VALUE
133
-#define EXTERNAL_CLOCK_VALUE     12288000U /*!< Value of the External oscillator in Hz*/
134
-#endif /* EXTERNAL_CLOCK_VALUE */
135
-
136
-/* Tip: To avoid modifying this file each time you need to use different HSE,
137
-   ===  you can define the HSE value in your toolchain compiler preprocessor. */
138
-
139
-/* ########################### System Configuration ######################### */
140
-/**
141
-  * @brief This is the HAL system configuration section
142
-  */
143
-#if !defined (VDD_VALUE)
144
-#define  VDD_VALUE                    3300U /*!< Value of VDD in mv */
145
-#endif
146
-#if !defined (TICK_INT_PRIORITY)
147
-#define  TICK_INT_PRIORITY            0x00U /*!< tick interrupt priority */
148
-#endif
149
-#if !defined (USE_RTOS)
150
-#define  USE_RTOS                     0U
151
-#endif
152
-#if !defined (PREFETCH_ENABLE)
153
-#define  PREFETCH_ENABLE              1U
154
-#endif
155
-#if !defined (INSTRUCTION_CACHE_ENABLE)
156
-#define  INSTRUCTION_CACHE_ENABLE     1U
157
-#endif
158
-#if !defined (DATA_CACHE_ENABLE)
159
-#define  DATA_CACHE_ENABLE            1U
160
-#endif
161
-
162
-#define  USE_HAL_ADC_REGISTER_CALLBACKS         0U /* ADC register callback disabled       */
163
-#define  USE_HAL_CAN_REGISTER_CALLBACKS         0U /* CAN register callback disabled       */
164
-#define  USE_HAL_CEC_REGISTER_CALLBACKS         0U /* CEC register callback disabled       */
165
-#define  USE_HAL_CRYP_REGISTER_CALLBACKS        0U /* CRYP register callback disabled      */
166
-#define  USE_HAL_DAC_REGISTER_CALLBACKS         0U /* DAC register callback disabled       */
167
-#define  USE_HAL_DCMI_REGISTER_CALLBACKS        0U /* DCMI register callback disabled      */
168
-#define  USE_HAL_DFSDM_REGISTER_CALLBACKS       0U /* DFSDM register callback disabled     */
169
-#define  USE_HAL_DMA2D_REGISTER_CALLBACKS       0U /* DMA2D register callback disabled     */
170
-#define  USE_HAL_DSI_REGISTER_CALLBACKS         0U /* DSI register callback disabled       */
171
-#define  USE_HAL_ETH_REGISTER_CALLBACKS         0U /* ETH register callback disabled       */
172
-#define  USE_HAL_HASH_REGISTER_CALLBACKS        0U /* HASH register callback disabled      */
173
-#define  USE_HAL_HCD_REGISTER_CALLBACKS         0U /* HCD register callback disabled       */
174
-#define  USE_HAL_I2C_REGISTER_CALLBACKS         0U /* I2C register callback disabled       */
175
-#define  USE_HAL_FMPI2C_REGISTER_CALLBACKS      0U /* FMPI2C register callback disabled    */
176
-#define  USE_HAL_I2S_REGISTER_CALLBACKS         0U /* I2S register callback disabled       */
177
-#define  USE_HAL_IRDA_REGISTER_CALLBACKS        0U /* IRDA register callback disabled      */
178
-#define  USE_HAL_LPTIM_REGISTER_CALLBACKS       0U /* LPTIM register callback disabled     */
179
-#define  USE_HAL_LTDC_REGISTER_CALLBACKS        0U /* LTDC register callback disabled      */
180
-#define  USE_HAL_MMC_REGISTER_CALLBACKS         0U /* MMC register callback disabled       */
181
-#define  USE_HAL_NAND_REGISTER_CALLBACKS        0U /* NAND register callback disabled      */
182
-#define  USE_HAL_NOR_REGISTER_CALLBACKS         0U /* NOR register callback disabled       */
183
-#define  USE_HAL_PCCARD_REGISTER_CALLBACKS      0U /* PCCARD register callback disabled    */
184
-#define  USE_HAL_PCD_REGISTER_CALLBACKS         0U /* PCD register callback disabled       */
185
-#define  USE_HAL_QSPI_REGISTER_CALLBACKS        0U /* QSPI register callback disabled      */
186
-#define  USE_HAL_RNG_REGISTER_CALLBACKS         0U /* RNG register callback disabled       */
187
-#define  USE_HAL_RTC_REGISTER_CALLBACKS         0U /* RTC register callback disabled       */
188
-#define  USE_HAL_SAI_REGISTER_CALLBACKS         0U /* SAI register callback disabled       */
189
-#define  USE_HAL_SD_REGISTER_CALLBACKS          0U /* SD register callback disabled        */
190
-#define  USE_HAL_SMARTCARD_REGISTER_CALLBACKS   0U /* SMARTCARD register callback disabled */
191
-#define  USE_HAL_SDRAM_REGISTER_CALLBACKS       0U /* SDRAM register callback disabled     */
192
-#define  USE_HAL_SRAM_REGISTER_CALLBACKS        0U /* SRAM register callback disabled      */
193
-#define  USE_HAL_SPDIFRX_REGISTER_CALLBACKS     0U /* SPDIFRX register callback disabled   */
194
-#define  USE_HAL_SMBUS_REGISTER_CALLBACKS       0U /* SMBUS register callback disabled     */
195
-#define  USE_HAL_SPI_REGISTER_CALLBACKS         0U /* SPI register callback disabled       */
196
-#define  USE_HAL_TIM_REGISTER_CALLBACKS         0U /* TIM register callback disabled       */
197
-#define  USE_HAL_UART_REGISTER_CALLBACKS        0U /* UART register callback disabled      */
198
-#define  USE_HAL_USART_REGISTER_CALLBACKS       0U /* USART register callback disabled     */
199
-#define  USE_HAL_WWDG_REGISTER_CALLBACKS        0U /* WWDG register callback disabled      */
200
-
201
-/* ########################## Assert Selection ############################## */
202
-/**
203
-  * @brief Uncomment the line below to expanse the "assert_param" macro in the
204
-  *        HAL drivers code
205
-  */
206
-/* #define USE_FULL_ASSERT    1U */
207
-
208
-/* ################## Ethernet peripheral configuration ##################### */
209
-
210
-/* Section 1 : Ethernet peripheral configuration */
211
-
212
-/* MAC ADDRESS: MAC_ADDR0:MAC_ADDR1:MAC_ADDR2:MAC_ADDR3:MAC_ADDR4:MAC_ADDR5 */
213
-#define MAC_ADDR0   2U
214
-#define MAC_ADDR1   0U
215
-#define MAC_ADDR2   0U
216
-#define MAC_ADDR3   0U
217
-#define MAC_ADDR4   0U
218
-#define MAC_ADDR5   0U
219
-
220
-/* Definition of the Ethernet driver buffers size and count */
221
-#define ETH_RX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for receive               */
222
-#define ETH_TX_BUF_SIZE                ETH_MAX_PACKET_SIZE /* buffer size for transmit              */
223
-#define ETH_RXBUFNB                    ((uint32_t)4U)       /* 4 Rx buffers of size ETH_RX_BUF_SIZE  */
224
-#define ETH_TXBUFNB                    ((uint32_t)4U)       /* 4 Tx buffers of size ETH_TX_BUF_SIZE  */
225
-
226
-/* Section 2: PHY configuration section */
227
-
228
-/* DP83848_PHY_ADDRESS Address*/
229
-#define DP83848_PHY_ADDRESS           0x01U
230
-/* PHY Reset delay these values are based on a 1 ms Systick interrupt*/
231
-#define PHY_RESET_DELAY                 0x000000FFU
232
-/* PHY Configuration delay */
233
-#define PHY_CONFIG_DELAY                0x00000FFFU
234
-
235
-#define PHY_READ_TO                     0x0000FFFFU
236
-#define PHY_WRITE_TO                    0x0000FFFFU
237
-
238
-/* Section 3: Common PHY Registers */
239
-
240
-#define PHY_BCR                         ((uint16_t)0x0000)  /*!< Transceiver Basic Control Register   */
241
-#define PHY_BSR                         ((uint16_t)0x0001)  /*!< Transceiver Basic Status Register    */
242
-
243
-#define PHY_RESET                       ((uint16_t)0x8000)  /*!< PHY Reset */
244
-#define PHY_LOOPBACK                    ((uint16_t)0x4000)  /*!< Select loop-back mode */
245
-#define PHY_FULLDUPLEX_100M             ((uint16_t)0x2100)  /*!< Set the full-duplex mode at 100 Mb/s */
246
-#define PHY_HALFDUPLEX_100M             ((uint16_t)0x2000)  /*!< Set the half-duplex mode at 100 Mb/s */
247
-#define PHY_FULLDUPLEX_10M              ((uint16_t)0x0100)  /*!< Set the full-duplex mode at 10 Mb/s  */
248
-#define PHY_HALFDUPLEX_10M              ((uint16_t)0x0000)  /*!< Set the half-duplex mode at 10 Mb/s  */
249
-#define PHY_AUTONEGOTIATION             ((uint16_t)0x1000)  /*!< Enable auto-negotiation function     */
250
-#define PHY_RESTART_AUTONEGOTIATION     ((uint16_t)0x0200)  /*!< Restart auto-negotiation function    */
251
-#define PHY_POWERDOWN                   ((uint16_t)0x0800)  /*!< Select the power down mode           */
252
-#define PHY_ISOLATE                     ((uint16_t)0x0400)  /*!< Isolate PHY from MII                 */
253
-
254
-#define PHY_AUTONEGO_COMPLETE           ((uint16_t)0x0020)  /*!< Auto-Negotiation process completed   */
255
-#define PHY_LINKED_STATUS               ((uint16_t)0x0004)  /*!< Valid link established               */
256
-#define PHY_JABBER_DETECTION            ((uint16_t)0x0002)  /*!< Jabber condition detected            */
257
-
258
-/* Section 4: Extended PHY Registers */
259
-#define PHY_SR                          ((uint16_t)0x10U)    /*!< PHY status register Offset                      */
260
-
261
-#define PHY_SPEED_STATUS                ((uint16_t)0x0002U)  /*!< PHY Speed mask                                  */
262
-#define PHY_DUPLEX_STATUS               ((uint16_t)0x0004U)  /*!< PHY Duplex mask                                 */
263
-
264
-/* ################## SPI peripheral configuration ########################## */
265
-
266
-/* CRC FEATURE: Use to activate CRC feature inside HAL SPI Driver
267
- * Activated: CRC code is present inside driver
268
- * Deactivated: CRC code cleaned from driver
269
- */
270
-#ifndef USE_SPI_CRC
271
-#define USE_SPI_CRC                     0U
272
-#endif
273
-
274
-/* Includes ------------------------------------------------------------------*/
275
-/**
276
-  * @brief Include module's header file
277
-  */
278
-
279
-#ifdef HAL_RCC_MODULE_ENABLED
280
-#include "stm32f4xx_hal_rcc.h"
281
-#endif /* HAL_RCC_MODULE_ENABLED */
282
-
283
-#ifdef HAL_GPIO_MODULE_ENABLED
284
-#include "stm32f4xx_hal_gpio.h"
285
-#endif /* HAL_GPIO_MODULE_ENABLED */
286
-
287
-#ifdef HAL_EXTI_MODULE_ENABLED
288
-#include "stm32f4xx_hal_exti.h"
289
-#endif /* HAL_EXTI_MODULE_ENABLED */
290
-
291
-#ifdef HAL_DMA_MODULE_ENABLED
292
-#include "stm32f4xx_hal_dma.h"
293
-#endif /* HAL_DMA_MODULE_ENABLED */
294
-
295
-#ifdef HAL_CORTEX_MODULE_ENABLED
296
-#include "stm32f4xx_hal_cortex.h"
297
-#endif /* HAL_CORTEX_MODULE_ENABLED */
298
-
299
-#ifdef HAL_ADC_MODULE_ENABLED
300
-#include "stm32f4xx_hal_adc.h"
301
-#endif /* HAL_ADC_MODULE_ENABLED */
302
-
303
-#ifdef HAL_CAN_MODULE_ENABLED
304
-#include "stm32f4xx_hal_can.h"
305
-#endif /* HAL_CAN_MODULE_ENABLED */
306
-
307
-#ifdef HAL_CAN_LEGACY_MODULE_ENABLED
308
-#include "stm32f4xx_hal_can_legacy.h"
309
-#endif /* HAL_CAN_LEGACY_MODULE_ENABLED */
310
-
311
-#ifdef HAL_CRC_MODULE_ENABLED
312
-#include "stm32f4xx_hal_crc.h"
313
-#endif /* HAL_CRC_MODULE_ENABLED */
314
-
315
-#ifdef HAL_CRYP_MODULE_ENABLED
316
-#include "stm32f4xx_hal_cryp.h"
317
-#endif /* HAL_CRYP_MODULE_ENABLED */
318
-
319
-#ifdef HAL_DMA2D_MODULE_ENABLED
320
-#include "stm32f4xx_hal_dma2d.h"
321
-#endif /* HAL_DMA2D_MODULE_ENABLED */
322
-
323
-#ifdef HAL_DAC_MODULE_ENABLED
324
-#include "stm32f4xx_hal_dac.h"
325
-#endif /* HAL_DAC_MODULE_ENABLED */
326
-
327
-#ifdef HAL_DCMI_MODULE_ENABLED
328
-#include "stm32f4xx_hal_dcmi.h"
329
-#endif /* HAL_DCMI_MODULE_ENABLED */
330
-
331
-#ifdef HAL_ETH_MODULE_ENABLED
332
-#include "stm32f4xx_hal_eth.h"
333
-#endif /* HAL_ETH_MODULE_ENABLED */
334
-
335
-#ifdef HAL_FLASH_MODULE_ENABLED
336
-#include "stm32f4xx_hal_flash.h"
337
-#endif /* HAL_FLASH_MODULE_ENABLED */
338
-
339
-#ifdef HAL_SRAM_MODULE_ENABLED
340
-#include "stm32f4xx_hal_sram.h"
341
-#endif /* HAL_SRAM_MODULE_ENABLED */
342
-
343
-#ifdef HAL_NOR_MODULE_ENABLED
344
-#include "stm32f4xx_hal_nor.h"
345
-#endif /* HAL_NOR_MODULE_ENABLED */
346
-
347
-#ifdef HAL_NAND_MODULE_ENABLED
348
-#include "stm32f4xx_hal_nand.h"
349
-#endif /* HAL_NAND_MODULE_ENABLED */
350
-
351
-#ifdef HAL_PCCARD_MODULE_ENABLED
352
-#include "stm32f4xx_hal_pccard.h"
353
-#endif /* HAL_PCCARD_MODULE_ENABLED */
354
-
355
-#ifdef HAL_SDRAM_MODULE_ENABLED
356
-#include "stm32f4xx_hal_sdram.h"
357
-#endif /* HAL_SDRAM_MODULE_ENABLED */
358
-
359
-#ifdef HAL_HASH_MODULE_ENABLED
360
-#include "stm32f4xx_hal_hash.h"
361
-#endif /* HAL_HASH_MODULE_ENABLED */
362
-
363
-#ifdef HAL_I2C_MODULE_ENABLED
364
-#include "stm32f4xx_hal_i2c.h"
365
-#endif /* HAL_I2C_MODULE_ENABLED */
366
-
367
-#ifdef HAL_SMBUS_MODULE_ENABLED
368
-#include "stm32f4xx_hal_smbus.h"
369
-#endif /* HAL_SMBUS_MODULE_ENABLED */
370
-
371
-#ifdef HAL_I2S_MODULE_ENABLED
372
-#include "stm32f4xx_hal_i2s.h"
373
-#endif /* HAL_I2S_MODULE_ENABLED */
374
-
375
-#ifdef HAL_IWDG_MODULE_ENABLED
376
-#include "stm32f4xx_hal_iwdg.h"
377
-#endif /* HAL_IWDG_MODULE_ENABLED */
378
-
379
-#ifdef HAL_LTDC_MODULE_ENABLED
380
-#include "stm32f4xx_hal_ltdc.h"
381
-#endif /* HAL_LTDC_MODULE_ENABLED */
382
-
383
-#ifdef HAL_PWR_MODULE_ENABLED
384
-#include "stm32f4xx_hal_pwr.h"
385
-#endif /* HAL_PWR_MODULE_ENABLED */
386
-
387
-#ifdef HAL_RNG_MODULE_ENABLED
388
-#include "stm32f4xx_hal_rng.h"
389
-#endif /* HAL_RNG_MODULE_ENABLED */
390
-
391
-#ifdef HAL_RTC_MODULE_ENABLED
392
-#include "stm32f4xx_hal_rtc.h"
393
-#endif /* HAL_RTC_MODULE_ENABLED */
394
-
395
-#ifdef HAL_SAI_MODULE_ENABLED
396
-#include "stm32f4xx_hal_sai.h"
397
-#endif /* HAL_SAI_MODULE_ENABLED */
398
-
399
-#ifdef HAL_SD_MODULE_ENABLED
400
-#include "stm32f4xx_hal_sd.h"
401
-#endif /* HAL_SD_MODULE_ENABLED */
402
-
403
-#ifdef HAL_SPI_MODULE_ENABLED
404
-#include "stm32f4xx_hal_spi.h"
405
-#endif /* HAL_SPI_MODULE_ENABLED */
406
-
407
-#ifdef HAL_TIM_MODULE_ENABLED
408
-#include "stm32f4xx_hal_tim.h"
409
-#endif /* HAL_TIM_MODULE_ENABLED */
410
-
411
-#ifdef HAL_UART_MODULE_ENABLED
412
-#include "stm32f4xx_hal_uart.h"
413
-#endif /* HAL_UART_MODULE_ENABLED */
414
-
415
-#ifdef HAL_USART_MODULE_ENABLED
416
-#include "stm32f4xx_hal_usart.h"
417
-#endif /* HAL_USART_MODULE_ENABLED */
418
-
419
-#ifdef HAL_IRDA_MODULE_ENABLED
420
-#include "stm32f4xx_hal_irda.h"
421
-#endif /* HAL_IRDA_MODULE_ENABLED */
422
-
423
-#ifdef HAL_SMARTCARD_MODULE_ENABLED
424
-#include "stm32f4xx_hal_smartcard.h"
425
-#endif /* HAL_SMARTCARD_MODULE_ENABLED */
426
-
427
-#ifdef HAL_WWDG_MODULE_ENABLED
428
-#include "stm32f4xx_hal_wwdg.h"
429
-#endif /* HAL_WWDG_MODULE_ENABLED */
430
-
431
-#ifdef HAL_PCD_MODULE_ENABLED
432
-#include "stm32f4xx_hal_pcd.h"
433
-#endif /* HAL_PCD_MODULE_ENABLED */
434
-
435
-#ifdef HAL_HCD_MODULE_ENABLED
436
-#include "stm32f4xx_hal_hcd.h"
437
-#endif /* HAL_HCD_MODULE_ENABLED */
438
-
439
-#ifdef HAL_DSI_MODULE_ENABLED
440
-#include "stm32f4xx_hal_dsi.h"
441
-#endif /* HAL_DSI_MODULE_ENABLED */
442
-
443
-#ifdef HAL_QSPI_MODULE_ENABLED
444
-#include "stm32f4xx_hal_qspi.h"
445
-#endif /* HAL_QSPI_MODULE_ENABLED */
446
-
447
-#ifdef HAL_CEC_MODULE_ENABLED
448
-#include "stm32f4xx_hal_cec.h"
449
-#endif /* HAL_CEC_MODULE_ENABLED */
450
-
451
-#ifdef HAL_FMPI2C_MODULE_ENABLED
452
-#include "stm32f4xx_hal_fmpi2c.h"
453
-#endif /* HAL_FMPI2C_MODULE_ENABLED */
454
-
455
-#ifdef HAL_SPDIFRX_MODULE_ENABLED
456
-#include "stm32f4xx_hal_spdifrx.h"
457
-#endif /* HAL_SPDIFRX_MODULE_ENABLED */
458
-
459
-#ifdef HAL_DFSDM_MODULE_ENABLED
460
-#include "stm32f4xx_hal_dfsdm.h"
461
-#endif /* HAL_DFSDM_MODULE_ENABLED */
462
-
463
-#ifdef HAL_LPTIM_MODULE_ENABLED
464
-#include "stm32f4xx_hal_lptim.h"
465
-#endif /* HAL_LPTIM_MODULE_ENABLED */
466
-
467
-#ifdef HAL_MMC_MODULE_ENABLED
468
-#include "stm32f4xx_hal_mmc.h"
469
-#endif /* HAL_MMC_MODULE_ENABLED */
470
-
471
-/* Exported macro ------------------------------------------------------------*/
472
-#ifdef USE_FULL_ASSERT
473
-/**
474
-  * @brief  The assert_param macro is used for function's parameters check.
475
-  * @param  expr If expr is false, it calls assert_failed function
476
-  *         which reports the name of the source file and the source
477
-  *         line number of the call that failed.
478
-  *         If expr is true, it returns no value.
479
-  * @retval None
480
-  */
481
-#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
482
-/* Exported functions ------------------------------------------------------- */
483
-void assert_failed(uint8_t *file, uint32_t line);
484
-#else
485
-#define assert_param(expr) ((void)0U)
486
-#endif /* USE_FULL_ASSERT */
487
-
488
-#ifdef __cplusplus
489
-}
490
-#endif
491
-
492
-#endif /* __STM32F4xx_HAL_CONF_CUSTOM_H */
493
-
494
-
495
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/

+ 0
- 187
buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/ldscript.ld View File

@@ -1,187 +0,0 @@
1
-/*
2
-*****************************************************************************
3
-**
4
-**  File        : ldscript.ld
5
-**
6
-**  Abstract    : Linker script for STM32F401RETx Device with
7
-**                512KByte FLASH, 96KByte RAM
8
-**
9
-**                Set heap size, stack size and stack location according
10
-**                to application requirements.
11
-**
12
-**                Set memory bank area and size if external memory is used.
13
-**
14
-**  Target      : STMicroelectronics STM32
15
-**
16
-**
17
-**  Distribution: The file is distributed as is, without any warranty
18
-**                of any kind.
19
-**
20
-*****************************************************************************
21
-** @attention
22
-**
23
-** <h2><center>&copy; COPYRIGHT(c) 2014 Ac6</center></h2>
24
-**
25
-** Redistribution and use in source and binary forms, with or without modification,
26
-** are permitted provided that the following conditions are met:
27
-**   1. Redistributions of source code must retain the above copyright notice,
28
-**      this list of conditions and the following disclaimer.
29
-**   2. Redistributions in binary form must reproduce the above copyright notice,
30
-**      this list of conditions and the following disclaimer in the documentation
31
-**      and/or other materials provided with the distribution.
32
-**   3. Neither the name of Ac6 nor the names of its contributors
33
-**      may be used to endorse or promote products derived from this software
34
-**      without specific prior written permission.
35
-**
36
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
37
-** AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
38
-** IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39
-** DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
40
-** FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
41
-** DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
42
-** SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
43
-** CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
44
-** OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
45
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
46
-**
47
-*****************************************************************************
48
-*/
49
-
50
-/* Entry Point */
51
-ENTRY(Reset_Handler)
52
-
53
-/* Highest address of the user mode stack */
54
-_estack = 0x20018000;    /* end of RAM */
55
-/* Generate a link error if heap and stack don't fit into RAM */
56
-_Min_Heap_Size = 0x200;      /* required amount of heap  */
57
-_Min_Stack_Size = 0x400; /* required amount of stack */
58
-
59
-/* Specify the memory areas */
60
-MEMORY
61
-{
62
-FLASH (rx)      : ORIGIN = 0x08000000, LENGTH = 512K
63
-RAM (xrw)      : ORIGIN = 0x20000000, LENGTH = 96K
64
-}
65
-
66
-/* Define output sections */
67
-SECTIONS
68
-{
69
-  /* The startup code goes first into FLASH */
70
-  .isr_vector :
71
-  {
72
-    . = ALIGN(4);
73
-    KEEP(*(.isr_vector)) /* Startup code */
74
-    . = ALIGN(4);
75
-  } >FLASH
76
-
77
-  /* The program code and other data goes into FLASH */
78
-  .text :
79
-  {
80
-    . = ALIGN(4);
81
-    *(.text)           /* .text sections (code) */
82
-    *(.text*)          /* .text* sections (code) */
83
-    *(.glue_7)         /* glue arm to thumb code */
84
-    *(.glue_7t)        /* glue thumb to arm code */
85
-    *(.eh_frame)
86
-
87
-    KEEP (*(.init))
88
-    KEEP (*(.fini))
89
-
90
-    . = ALIGN(4);
91
-    _etext = .;        /* define a global symbols at end of code */
92
-  } >FLASH
93
-
94
-  /* Constant data goes into FLASH */
95
-  .rodata :
96
-  {
97
-    . = ALIGN(4);
98
-    *(.rodata)         /* .rodata sections (constants, strings, etc.) */
99
-    *(.rodata*)        /* .rodata* sections (constants, strings, etc.) */
100
-    . = ALIGN(4);
101
-  } >FLASH
102
-
103
-  .ARM.extab   : { *(.ARM.extab* .gnu.linkonce.armextab.*) } >FLASH
104
-  .ARM : {
105
-    __exidx_start = .;
106
-    *(.ARM.exidx*)
107
-    __exidx_end = .;
108
-  } >FLASH
109
-
110
-  .preinit_array     :
111
-  {
112
-    PROVIDE_HIDDEN (__preinit_array_start = .);
113
-    KEEP (*(.preinit_array*))
114
-    PROVIDE_HIDDEN (__preinit_array_end = .);
115
-  } >FLASH
116
-  .init_array :
117
-  {
118
-    PROVIDE_HIDDEN (__init_array_start = .);
119
-    KEEP (*(SORT(.init_array.*)))
120
-    KEEP (*(.init_array*))
121
-    PROVIDE_HIDDEN (__init_array_end = .);
122
-  } >FLASH
123
-  .fini_array :
124
-  {
125
-    PROVIDE_HIDDEN (__fini_array_start = .);
126
-    KEEP (*(SORT(.fini_array.*)))
127
-    KEEP (*(.fini_array*))
128
-    PROVIDE_HIDDEN (__fini_array_end = .);
129
-  } >FLASH
130
-
131
-  /* used by the startup to initialize data */
132
-  _sidata = LOADADDR(.data);
133
-
134
-  /* Initialized data sections goes into RAM, load LMA copy after code */
135
-  .data :
136
-  {
137
-    . = ALIGN(4);
138
-    _sdata = .;        /* create a global symbol at data start */
139
-    *(.data)           /* .data sections */
140
-    *(.data*)          /* .data* sections */
141
-
142
-    . = ALIGN(4);
143
-    _edata = .;        /* define a global symbol at data end */
144
-  } >RAM AT> FLASH
145
-
146
-
147
-  /* Uninitialized data section */
148
-  . = ALIGN(4);
149
-  .bss :
150
-  {
151
-    /* This is used by the startup in order to initialize the .bss section */
152
-    _sbss = .;         /* define a global symbol at bss start */
153
-    __bss_start__ = _sbss;
154
-    *(.bss)
155
-    *(.bss*)
156
-    *(COMMON)
157
-
158
-    . = ALIGN(4);
159
-    _ebss = .;         /* define a global symbol at bss end */
160
-    __bss_end__ = _ebss;
161
-  } >RAM
162
-
163
-  /* User_heap_stack section, used to check that there is enough RAM left */
164
-  ._user_heap_stack :
165
-  {
166
-    . = ALIGN(4);
167
-    PROVIDE ( end = . );
168
-    PROVIDE ( _end = . );
169
-    . = . + _Min_Heap_Size;
170
-    . = . + _Min_Stack_Size;
171
-    . = ALIGN(4);
172
-  } >RAM
173
-
174
-
175
-
176
-  /* Remove information from the standard libraries */
177
-  /DISCARD/ :
178
-  {
179
-    libc.a ( * )
180
-    libm.a ( * )
181
-    libgcc.a ( * )
182
-  }
183
-
184
-  .ARM.attributes 0 : { *(.ARM.attributes) }
185
-}
186
-
187
-

+ 0
- 310
buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.cpp View File

@@ -1,310 +0,0 @@
1
-/*
2
- *******************************************************************************
3
- * Copyright (c) 2017, STMicroelectronics
4
- * All rights reserved.
5
- *
6
- * Redistribution and use in source and binary forms, with or without
7
- * modification, are permitted provided that the following conditions are met:
8
- *
9
- * 1. Redistributions of source code must retain the above copyright notice,
10
- *    this list of conditions and the following disclaimer.
11
- * 2. Redistributions in binary form must reproduce the above copyright notice,
12
- *    this list of conditions and the following disclaimer in the documentation
13
- *    and/or other materials provided with the distribution.
14
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
15
- *    may be used to endorse or promote products derived from this software
16
- *    without specific prior written permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *******************************************************************************
29
- */
30
-
31
-#include "pins_arduino.h"
32
-
33
-#ifdef __cplusplus
34
-extern "C" {
35
-#endif
36
-
37
-#ifdef ARDUINO_STEVAL
38
-// Pin number
39
-// This array allows to wrap Arduino pin number(Dx or x)
40
-// to STM32 PinName (PX_n)
41
-const PinName digitalPin[] = {
42
-  PA_9,  // TX
43
-  PA_10, // RX
44
-
45
-  // WIFI
46
-  PD_3,  // CTS
47
-  PD_4,  // RTS
48
-  PD_5,  // TX
49
-  PD_6,  // RX
50
-  PB_5,  // WIFI_WAKEUP
51
-  PE_11, // WIFI_RESET
52
-  PE_12, // WIFI_BOOT
53
-
54
-  // STATUS_LED
55
-  PE_1,  //STATUS_LED
56
-
57
-  // SPI USER
58
-  PB_12, // SPI_CS
59
-  PB_15, // SPI_MOSI
60
-  PB_14, // SPI_MISO
61
-  PB_13, // SPI_SCK
62
-
63
-  // I2C USER
64
-  PB_7,  // SDA
65
-  PB_6,  // SCL
66
-
67
-  // SPI
68
-  PA_4,  // SPI_CS
69
-  PA_5,  // SPI_SCK
70
-  PA_6,  // SPI_MISO
71
-  PA_7,  // SPI_MOSI
72
-
73
-  // JTAG
74
-  PA_13, // JTAG_TMS/SWDIO
75
-  PA_14, // JTAG_TCK/SWCLK
76
-  PB_3,  // JTAG_TDO/SWO
77
-
78
-  // SDCARD
79
-  PC_8,  // SDIO_D0
80
-  PC_9,  // SDIO_D1
81
-  PA_15, // SD_CARD_DETECT
82
-  PC_10, // SDIO_D2
83
-  PC_11, // SDIO_D3
84
-  PC_12, // SDIO_CK
85
-  PD_2,  // SDIO_CMD
86
-
87
-  // OTG
88
-  PA_11, // OTG_DM
89
-  PA_12, // OTG_DP
90
-
91
-  // IR/PROBE
92
-  PD_1,  // IR_OUT
93
-  PC_1,  // IR_ON
94
-
95
-  // USER_PINS
96
-  PD_7,  // USER3
97
-  PB_9,  // USER1
98
-  PE_0,  // USER2
99
-  PB_4,  // USER4
100
-
101
-  // USERKET
102
-  PE_7,  // USER_BUTTON
103
-
104
-  // ENDSTOPS
105
-  PD_8,  // X_STOP
106
-  PD_9,  // Y_STOP
107
-  PD_10, // Z_STOP
108
-  PD_11, // U_STOP
109
-  PA_8,  // V_STOP
110
-  PD_0,  // W_STOP
111
-
112
-  // HEATERS
113
-  PD_13, // BED_HEAT_2
114
-  PD_14, // BED_HEAT_1
115
-  PD_15, // BED_HEAT_3
116
-  PC_7,  // E1_HEAT_PWM
117
-  PB_0,  // E2_HEAT_PWM
118
-  PB_1,  // E3_HEAT_PWM
119
-
120
-  // THERMISTOR
121
-  PC_2,  // BED_THERMISTOR_1
122
-  PC_3,  // BED_THERMISTOR_2
123
-  PA_3,  // BED_THERMISTOR_3
124
-  PA_0,  // E1_THERMISTOR
125
-  PA_1,  // E2_THERMISTOR
126
-  PA_2,  // E3_THERMISTOR
127
-
128
-  // FANS
129
-  PC_4,  // E1_FAN
130
-  PC_5,  // E2_FAN
131
-  PE_8,  // E3_FAN
132
-
133
-  // X_MOTOR
134
-  PE_13, // X_RESET
135
-  PE_14, // X_PWM
136
-  PE_15, // X_DIR
137
-
138
-  // Y_MOTOR
139
-  PE_10, // Y_RESET
140
-  PB_10, // Y_PWM
141
-  PE_9,  // Y_DIR
142
-
143
-  // Z_MOTOR
144
-  PC_15, // Z_RESET
145
-  PC_6,  // Z_PWM
146
-  PC_0,  // Z_DIR
147
-
148
-  // E1_MOTOR
149
-  PC_14, // E1_RESET
150
-  PC_13, // E1_DIR
151
-  PD_12, // E1_PWM
152
-
153
-  // E2_MOTOR
154
-  PE_4,  // E2_RESET
155
-  PE_5,  // E2_PWM
156
-  PE_6,  // E2_DIR
157
-
158
-  // E3_MOTOR
159
-  PE_3,  // E3_RESET
160
-  PE_2,  // E3_DIR
161
-  PB_8   // E3_PWM
162
-};
163
-#endif
164
-
165
-#ifdef __cplusplus
166
-}
167
-#endif
168
-
169
-// ----------------------------------------------------------------------------
170
-
171
-#ifdef __cplusplus
172
-extern "C" {
173
-#endif
174
-/**
175
-  * @brief  System Clock Configuration
176
-  *         The system Clock is configured as follow :
177
-  *            System Clock source            = PLL (HSI)
178
-  *            SYSCLK(Hz)                     = 84000000
179
-  *            HCLK(Hz)                       = 84000000
180
-  *            AHB Prescaler                  = 1
181
-  *            APB1 Prescaler                 = 2
182
-  *            APB2 Prescaler                 = 1
183
-  *            HSI Frequency(Hz)              = 16000000
184
-  *            PLL_M                          = 16
185
-  *            PLL_N                          = 336
186
-  *            PLL_P                          = 4
187
-  *            PLL_Q                          = 7
188
-  *            VDD(V)                         = 3.3
189
-  *            Main regulator output voltage  = Scale2 mode
190
-  *            Flash Latency(WS)              = 2
191
-  * @param  None
192
-  * @retval None
193
-  */
194
-WEAK void SystemClock_Config(void)
195
-{
196
-  RCC_OscInitTypeDef RCC_OscInitStruct = {};
197
-  RCC_ClkInitTypeDef RCC_ClkInitStruct = {};
198
-
199
-  /* Configure the main internal regulator output voltage */
200
-  __HAL_RCC_PWR_CLK_ENABLE();
201
-  __HAL_PWR_VOLTAGESCALING_CONFIG(PWR_REGULATOR_VOLTAGE_SCALE2);
202
-
203
-  /* Initializes the CPU, AHB and APB busses clocks */
204
-  RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
205
-  RCC_OscInitStruct.HSEState = RCC_HSE_ON;
206
-  RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
207
-  RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
208
-  RCC_OscInitStruct.PLL.PLLM = 15;
209
-  RCC_OscInitStruct.PLL.PLLN = 144;
210
-  RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV4;
211
-  RCC_OscInitStruct.PLL.PLLQ = 5;
212
-  if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK) {
213
-    Error_Handler();
214
-  }
215
-  /* Initializes the CPU, AHB and APB busses clocks */
216
-  RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK
217
-                                | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
218
-  RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
219
-  RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
220
-  RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2;
221
-  RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
222
-
223
-  if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
224
-    Error_Handler();
225
-  }
226
-}
227
-
228
-#ifdef __cplusplus
229
-}
230
-#endif
231
-
232
-
233
-// PA_0  54 // E1_THERMISTOR
234
-// PA_1  55 // E2_THERMISTOR
235
-// PA_2  56 // E3_THERMISTOR
236
-// PA_3  53 // BED_THERMISTOR_3
237
-// PA_4  16 // SPI_CS
238
-// PA_5  17 // SPI_SCK
239
-// PA_6  18 // SPI_MISO
240
-// PA_7  19 // SPI_MOSI
241
-// PA_8  43 // V_STOP
242
-// PA_9   0 //TX
243
-// PA_10  1 //RX
244
-// PA_11 30 //OTG_DM
245
-// PA_12 31 //OTG_DP
246
-// PA_13 20 // JTAG_TMS/SWDIO
247
-// PA_14 21 // JTAG_TCK/SWCLK
248
-// PA_15 25 // SD_CARD_DETECT
249
-// PB_0  49 // E2_HEAT_PWM
250
-// PB_1  50 // E3_HEAT_PWM
251
-// PB_3  22 // JTAG_TDO/SWO
252
-// PB_4  37 // USER4
253
-// PB_5   6 // WIFI_WAKEUP
254
-// PB_6  15 // SCL
255
-// PB_7  14 // SDA
256
-// PB_8  77 // E3_PWM
257
-// PB_9  35 // USER1
258
-// PB_10 64 // Y_PWM
259
-// PB_12 10 // SPI_CS
260
-// PB_13 13 // SPI_SCK
261
-// PB_14 12 // SPI_MISO
262
-// PB_15 11 // SPI_MOSI
263
-// PC_0  68 // Z_DIR
264
-// PC_1  33 //IR_ON
265
-// PC_2  51 // BED_THERMISTOR_1
266
-// PC_3  52 // BED_THERMISTOR_2
267
-// PC_4  57 // E1_FAN
268
-// PC_5  58 // E2_FAN
269
-// PC_6  67 // Z_PWM
270
-// PC_7  48 // E1_HEAT_PWM
271
-// PC_8  23 // SDIO_D0
272
-// PC_9  24 // SDIO_D1
273
-// PC_10 26 // SDIO_D2
274
-// PC_11 27 // SDIO_D3
275
-// PC_12 28 // SDIO_CK
276
-// PC_13 70 // E1_DIR
277
-// PC_14 69 // E1_RESET
278
-// PC_15 66 // Z_RESET
279
-// PD_0  44 // W_STOP
280
-// PD_1  32 //IR_OUT
281
-// PD_2  29 // SDIO_CMD
282
-// PD_3   2 // CTS
283
-// PD_4   3 // RTS
284
-// PD_5   4 // TX
285
-// PD_6   5 // RX
286
-// PD_7  34 // USER3
287
-// PD_8  39 // X_STOP
288
-// PD_9  40 // Y_STOP
289
-// PD_10 41 // Z_STOP
290
-// PD_11 42 // U_STOP
291
-// PD_12 71 // E1_PWM
292
-// PD_13 45 // BED_HEAT_2
293
-// PD_14 46 // BED_HEAT_1
294
-// PD_15 47 // BED_HEAT_3
295
-// PE_0  36 // USER2
296
-// PE_1   9 // STATUS_LED
297
-// PE_2  76 // E3_DIR
298
-// PE_3  75 // E3_RESET
299
-// PE_4  72 // E2_RESET
300
-// PE_5  73 // E2_PWM
301
-// PE_6  74 // E2_DIR
302
-// PE_7  38 // USER_BUTTON
303
-// PE_8  59 // E3_FAN
304
-// PE_9  65 // Y_DIR
305
-// PE_10 63 // Y_RESET
306
-// PE_11  7 // WIFI_RESET
307
-// PE_12  8 // WIFI_BOOT
308
-// PE_13 60 // X_RESET
309
-// PE_14 61 // X_PWM
310
-// PE_15 62 // X_DIR

+ 0
- 327
buildroot/share/PlatformIO/variants/MARLIN_STEVAL_F401VE/variant.h View File

@@ -1,327 +0,0 @@
1
-/*
2
- *******************************************************************************
3
- * Copyright (c) 2017, STMicroelectronics
4
- * All rights reserved.
5
- *
6
- * Redistribution and use in source and binary forms, with or without
7
- * modification, are permitted provided that the following conditions are met:
8
- *
9
- * 1. Redistributions of source code must retain the above copyright notice,
10
- *    this list of conditions and the following disclaimer.
11
- * 2. Redistributions in binary form must reproduce the above copyright notice,
12
- *    this list of conditions and the following disclaimer in the documentation
13
- *    and/or other materials provided with the distribution.
14
- * 3. Neither the name of STMicroelectronics nor the names of its contributors
15
- *    may be used to endorse or promote products derived from this software
16
- *    without specific prior written permission.
17
- *
18
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
22
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24
- * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25
- * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
- *******************************************************************************
29
- */
30
-
31
-#ifndef _VARIANT_ARDUINO_STM32_
32
-#define _VARIANT_ARDUINO_STM32_
33
-/*----------------------------------------------------------------------------
34
- *        Headers
35
- *----------------------------------------------------------------------------*/
36
-
37
-#ifdef __cplusplus
38
-extern "C" {
39
-#endif // __cplusplus
40
-
41
-/*----------------------------------------------------------------------------
42
- *        Pins
43
- *----------------------------------------------------------------------------*/
44
-#ifdef ARDUINO_STEVAL
45
-
46
-
47
-/*----------------------------------------------------------------------------
48
- *        Pins
49
- *----------------------------------------------------------------------------*/
50
-// USART1_MAIN
51
-#define PA9  0 //TX
52
-#define PA10 1 //RX
53
-
54
-// WIFI (USART2)
55
-#define PD3   2 // CTS
56
-#define PD4   3 // RTS
57
-#define PD5   4 // TX
58
-#define PD6   5 // RX
59
-#define PB5   6 // WIFI_WAKEUP
60
-#define PE11  7 // WIFI_RESET
61
-#define PE12  8 // WIFI_BOOT
62
-
63
-// STATUS_LED
64
-#define PE1   9 // STATUS_LED
65
-
66
-// SPI USER
67
-#define PB12 10 // SPI_CS
68
-#define PB15 11 // SPI_MOSI
69
-#define PB14 12 // SPI_MISO
70
-#define PB13 13 // SPI_SCK
71
-
72
-// I2C USER
73
-#define PB7  14 // SDA
74
-#define PB6  15 // SCL
75
-
76
-// SPI
77
-#define PA4  16 // SPI_CS
78
-#define PA5  17 // SPI_SCK
79
-#define PA6  18 // SPI_MISO
80
-#define PA7  19 // SPI_MOSI
81
-
82
-// JTAG
83
-#define PA13 20 // JTAG_TMS/SWDIO
84
-#define PA14 21 // JTAG_TCK/SWCLK
85
-#define PB3  22 // JTAG_TDO/SWO
86
-
87
-// SDCARD
88
-#define PC8  23 // SDIO_D0
89
-#define PC9  24 // SDIO_D1
90
-#define PA15 25 // SD_CARD_DETECT
91
-#define PC10 26 // SDIO_D2
92
-#define PC11 27 // SDIO_D3
93
-#define PC12 28 // SDIO_CK
94
-#define PD2  29 // SDIO_CMD
95
-
96
-// OTG
97
-#define PA11 30 //OTG_DM
98
-#define PA12 31 //OTG_DP
99
-
100
-// IR/PROBE
101
-#define PD1  32 //IR_OUT
102
-#define PC1  33 //IR_ON
103
-
104
-// USER_PINS
105
-#define PD7  34 // USER3
106
-#define PB9  35 // USER1
107
-#define PE0  36 // USER2
108
-#define PB4  37 // USER4
109
-
110
-// USERKET
111
-#define PE7  38 // USER_BUTTON
112
-
113
-// ENDSTOPS
114
-#define PD8  39 // X_STOP
115
-#define PD9  40 // Y_STOP
116
-#define PD10 41 // Z_STOP
117
-#define PD11 42 // U_STOP
118
-#define PA8  43 // V_STOP
119
-#define PD0  44 // W_STOP
120
-
121
-// HEATERS
122
-#define PD13 45 // BED_HEAT_2
123
-#define PD14 46 // BED_HEAT_1
124
-#define PD15 47 // BED_HEAT_3
125
-#define PC7  48 // E1_HEAT_PWM
126
-#define PB0  49 // E2_HEAT_PWM
127
-#define PB1  50 // E3_HEAT_PWM
128
-
129
-// THERMISTOR
130
-#define PC2  51 // BED_THERMISTOR_1
131
-#define PC3  52 // BED_THERMISTOR_2
132
-#define PA3  53 // BED_THERMISTOR_3
133
-#define PA0  54 // E1_THERMISTOR
134
-#define PA1  55 // E2_THERMISTOR
135
-#define PA2  56 // E3_THERMISTOR
136
-
137
-// FANS
138
-#define PC4  57 // E1_FAN
139
-#define PC5  58 // E2_FAN
140
-#define PE8  59 // E3_FAN
141
-
142
-// X_MOTOR
143
-#define PE13 60 // X_RESET
144
-#define PE14 61 // X_PWM
145
-#define PE15 62 // X_DIR
146
-
147
-// Y_MOTOR
148
-#define PE10 63 // Y_RESET
149
-#define PB10 64 // Y_PWM
150
-#define PE9  65 // Y_DIR
151
-
152
-// Z_MOTOR
153
-#define PC15 66 // Z_RESET
154
-#define PC6  67 // Z_PWM
155
-#define PC0  68 // Z_DIR
156
-
157
-// E1_MOTOR
158
-#define PC14 69 // E1_RESET
159
-#define PC13 70 // E1_DIR
160
-#define PD12 71 // E1_PWM
161
-
162
-// E2_MOTOR
163
-#define PE4  72 // E2_RESET
164
-#define PE5  73 // E2_PWM
165
-#define PE6  74 // E2_DIR
166
-
167
-// E3_MOTOR
168
-#define PE3  75 // E3_RESET
169
-#define PE2  76 // E3_DIR
170
-#define PB8  77 // E3_PWM
171
-
172
-// This must be a literal
173
-#define NUM_DIGITAL_PINS        78
174
-// This must be a literal with a value less than or equal to to MAX_ANALOG_INPUTS
175
-#define NUM_ANALOG_INPUTS       6
176
-#define NUM_ANALOG_FIRST        51
177
-
178
-// On-board LED pin number
179
-#define LED_BUILTIN             PE1
180
-#define LED_GREEN               LED_BUILTIN
181
-
182
-// On-board user button
183
-#define USER_BTN                PE7
184
-
185
-// UART Definitions
186
-#define SERIAL_UART_INSTANCE    1 // Connected to ST-Link
187
-//#define SERIAL_UART_INSTANCE    2 // Connected to WIFI
188
-
189
-// Default pin used for 'Serial' instance (ex: ST-Link)
190
-// Mandatory for Firmata
191
-#if SERIAL_UART_INSTANCE == 1             // ST-Link & J23
192
-  #define PIN_SERIAL_RX         PA10
193
-  #define PIN_SERIAL_TX         PA9
194
-#elif SERIAL_UART_INSTANCE == 2         // WIFI interface
195
-  #define PIN_SERIAL2_RX        PD6
196
-  #define PIN_SERIAL2_TX        PD5
197
-#else
198
-  #error "Invalid setting for SERIAL_UART_INSTANCE."
199
-#endif
200
-
201
-// Timer Definitions
202
-#define TIMER_SERVO             TIM4  // TIMER_SERVO must be defined in this file
203
-#define TIMER_TONE              TIM5  // TIMER_TONE must be defined in this file
204
-
205
-/* SD detect signal */
206
-/*
207
- * By default, R67 is not provided, so SD card detect is not used.
208
- * Note: SD CD (pin 16 of expansion connector J23) can be connected
209
- * to GND in order to be able to use SD_DETECT_PIN
210
- */
211
-/*#define SD_DETECT_PIN           PA15*/
212
-
213
-/* HAL configuration */
214
-#define HSE_VALUE               25000000U
215
-
216
-/* Extra HAL modules */
217
-#define HAL_SD_MODULE_ENABLED
218
-
219
-#endif
220
-
221
-#ifdef __cplusplus
222
-} // extern "C"
223
-#endif
224
-/*----------------------------------------------------------------------------
225
- *        Arduino objects - C++ only
226
- *----------------------------------------------------------------------------*/
227
-
228
-#ifdef __cplusplus
229
-// These serial port names are intended to allow libraries and architecture-neutral
230
-// sketches to automatically default to the correct port name for a particular type
231
-// of use.  For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN,
232
-// the first hardware serial port whose RX/TX pins are not dedicated to another use.
233
-//
234
-// SERIAL_PORT_MONITOR        Port which normally prints to the Arduino Serial Monitor
235
-//
236
-// SERIAL_PORT_USBVIRTUAL     Port which is USB virtual serial
237
-//
238
-// SERIAL_PORT_LINUXBRIDGE    Port which connects to a Linux system via Bridge library
239
-//
240
-// SERIAL_PORT_HARDWARE       Hardware serial port, physical RX & TX pins.
241
-//
242
-// SERIAL_PORT_HARDWARE_OPEN  Hardware serial ports which are open for use.  Their RX & TX
243
-//                            pins are NOT connected to anything by default.
244
-#define SERIAL_PORT_MONITOR     Serial
245
-#define SERIAL_PORT_HARDWARE    Serial1
246
-#endif
247
-
248
-#endif // _VARIANT_ARDUINO_STM32_
249
-
250
-// PA0  54 // E1_THERMISTOR
251
-// PA1  55 // E2_THERMISTOR
252
-// PA2  56 // E3_THERMISTOR
253
-// PA3  53 // BED_THERMISTOR_3
254
-// PA4  16 // SPI_CS
255
-// PA5  17 // SPI_SCK
256
-// PA6  18 // SPI_MISO
257
-// PA7  19 // SPI_MOSI
258
-// PA8  43 // V_STOP
259
-// PA9   0 //TX
260
-// PA10  1 //RX
261
-// PA11 30 //OTG_DM
262
-// PA12 31 //OTG_DP
263
-// PA13 20 // JTAG_TMS/SWDIO
264
-// PA14 21 // JTAG_TCK/SWCLK
265
-// PA15 25 // SD_CARD_DETECT
266
-// PB0  49 // E2_HEAT_PWM
267
-// PB1  50 // E3_HEAT_PWM
268
-// PB3  22 // JTAG_TDO/SWO
269
-// PB4  37 // USER4
270
-// PB5   6 // WIFI_WAKEUP
271
-// PB6  15 // SCL
272
-// PB7  14 // SDA
273
-// PB8  77 // E3_PWM
274
-// PB9  35 // USER1
275
-// PB10 64 // Y_PWM
276
-// PB12 10 // SPI_CS
277
-// PB13 13 // SPI_SCK
278
-// PB14 12 // SPI_MISO
279
-// PB15 11 // SPI_MOSI
280
-// PC0  68 // Z_DIR
281
-// PC1  33 //IR_ON
282
-// PC2  51 // BED_THERMISTOR_1
283
-// PC3  52 // BED_THERMISTOR_2
284
-// PC4  57 // E1_FAN
285
-// PC5  58 // E2_FAN
286
-// PC6  67 // Z_PWM
287
-// PC7  48 // E1_HEAT_PWM
288
-// PC8  23 // SDIO_D0
289
-// PC9  24 // SDIO_D1
290
-// PC10 26 // SDIO_D2
291
-// PC11 27 // SDIO_D3
292
-// PC12 28 // SDIO_CK
293
-// PC13 70 // E1_DIR
294
-// PC14 69 // E1_RESET
295
-// PC15 66 // Z_RESET
296
-// PD0  44 // W_STOP
297
-// PD1  32 //IR_OUT
298
-// PD2  29 // SDIO_CMD
299
-// PD3   2 // CTS
300
-// PD4   3 // RTS
301
-// PD5   4 // TX
302
-// PD6   5 // RX
303
-// PD7  34 // USER3
304
-// PD8  39 // X_STOP
305
-// PD9  40 // Y_STOP
306
-// PD10 41 // Z_STOP
307
-// PD11 42 // U_STOP
308
-// PD12 71 // E1_PWM
309
-// PD13 45 // BED_HEAT_2
310
-// PD14 46 // BED_HEAT_1
311
-// PD15 47 // BED_HEAT_3
312
-// PE0  36 // USER2
313
-// PE1   9 // STATUS_LED
314
-// PE2  76 // E3_DIR
315
-// PE3  75 // E3_RESET
316
-// PE4  72 // E2_RESET
317
-// PE5  73 // E2_PWM
318
-// PE6  74 // E2_DIR
319
-// PE7  38 // USER_BUTTON
320
-// PE8  59 // E3_FAN
321
-// PE9  65 // Y_DIR
322
-// PE10 63 // Y_RESET
323
-// PE11  7 // WIFI_RESET
324
-// PE12  8 // WIFI_BOOT
325
-// PE13 60 // X_RESET
326
-// PE14 61 // X_PWM
327
-// PE15 62 // X_DIR

+ 2
- 6
buildroot/tests/FYSETC_F6 View File

@@ -18,15 +18,11 @@ exec_test $1 $2 "FYSETC F6 1.3 with DGUS" "$3"
18 18
 # Delta Config (generic) + UBL + ALLEN_KEY + EEPROM_SETTINGS + OLED_PANEL_TINYBOY2
19 19
 #
20 20
 use_example_configs delta/generic
21
-opt_set MOTHERBOARD BOARD_FYSETC_F6_13 \
22
-        LCD_LANGUAGE ko_KR \
23
-        X_DRIVER_TYPE L6470 Y_DRIVER_TYPE L6470 Z_DRIVER_TYPE L6470 \
24
-        L6470_CHAIN_SCK_PIN 53 L6470_CHAIN_MISO_PIN 49 L6470_CHAIN_MOSI_PIN 40 L6470_CHAIN_SS_PIN 42 \
25
-        'ENABLE_RESET_L64XX_CHIPS(V)' NOOP
21
+opt_set MOTHERBOARD BOARD_FYSETC_F6_13 LCD_LANGUAGE ko_KR
26 22
 opt_enable RESTORE_LEVELING_AFTER_G28 EEPROM_SETTINGS EEPROM_CHITCHAT \
27 23
            Z_PROBE_ALLEN_KEY AUTO_BED_LEVELING_UBL UBL_MESH_WIZARD \
28 24
            OLED_PANEL_TINYBOY2 MESH_EDIT_GFX_OVERLAY DELTA_CALIBRATION_MENU
29
-exec_test $1 $2 "DELTA, RAMPS, L6470, UBL, Allen Key, EEPROM, OLED_PANEL_TINYBOY2..." "$3"
25
+exec_test $1 $2 "DELTA, FYSETC F6 1.3, UBL, Allen Key, EEPROM, OLED_PANEL_TINYBOY2..." "$3"
30 26
 
31 27
 #
32 28
 # Test mixed TMC config

+ 0
- 15
buildroot/tests/STM32F401VE_STEVAL View File

@@ -1,15 +0,0 @@
1
-#!/usr/bin/env bash
2
-#
3
-# Build tests for STM32F401VE_STEVAL
4
-#
5
-
6
-# exit on first failure
7
-set -e
8
-
9
-# Build examples
10
-restore_configs
11
-opt_set MOTHERBOARD BOARD_STEVAL_3DP001V1 SERIAL_PORT -1
12
-exec_test $1 $2 "STM32F401VE_STEVAL Default Config" "$3"
13
-
14
-# cleanup
15
-restore_configs

+ 0
- 2
ini/features.ini View File

@@ -26,8 +26,6 @@ HAS_MOTOR_CURRENT_I2C                  = SlowSoftI2CMaster
26 26
                                          src_filter=+<src/feature/digipot>
27 27
 HAS_TMC26X                             = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/master.zip
28 28
                                          src_filter=+<src/module/stepper/TMC26X.cpp>
29
-HAS_L64XX                              = Arduino-L6470@0.8.0
30
-                                         src_filter=+<src/libs/L64XX> +<src/module/stepper/L64xx.cpp> +<src/gcode/feature/L6470> +<src/HAL/shared/HAL_spi_L6470.cpp>
31 29
 LIB_INTERNAL_MAX31865                  = src_filter=+<src/libs/MAX31865.cpp>
32 30
 NEOPIXEL_LED                           = adafruit/Adafruit NeoPixel@~1.8.0
33 31
                                          src_filter=+<src/feature/leds/neopixel.cpp>

+ 0
- 11
ini/stm32f4.ini View File

@@ -29,17 +29,6 @@ build_flags   = ${common_stm32.build_flags}
29 29
                 -O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing
30 30
 
31 31
 #
32
-# STM32F401VE
33
-# 'STEVAL-3DP001V1' STM32F401VE board - https://www.st.com/en/evaluation-tools/steval-3dp001v1.html
34
-#
35
-[env:STM32F401VE_STEVAL]
36
-extends           = stm32_variant
37
-board             = marlin_STEVAL_STM32F401VE
38
-build_flags       = ${stm32_variant.build_flags}
39
-                    -DSTM32F401xE -DDISABLE_GENERIC_SERIALUSB
40
-                    -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
41
-
42
-#
43 32
 # STM32F401RC
44 33
 #
45 34
 [env:FYSETC_CHEETAH_V20]

Loading…
Cancel
Save