aboutsummaryrefslogtreecommitdiff
path: root/Marlin/src/pins/stm32f4/pins_BLACK_STM32F407VE.h
blob: c2ad907e0470dc09fca0f9fbf054b819c6b6f34d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/**
 * Marlin 3D Printer Firmware
 * Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
 *
 * Based on Sprinter and grbl.
 * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 */
#pragma once

/**
 * STM32F407VET6 with RAMPS-like shield
 * 'Black' STM32F407VET6 board - https://www.stm32duino.com/viewtopic.php?t=485
 * Shield - https://github.com/jmz52/Hardware
 */

#if NOT_TARGET(STM32F4, STM32F4xx)
  #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
  #error "Black STM32F4VET6 supports up to 2 hotends / E-steppers."
#endif

#ifndef BOARD_INFO_NAME
  #define BOARD_INFO_NAME "Black STM32F4VET6"
#endif

#define DEFAULT_MACHINE_NAME "STM32F407VET6"

//#define I2C_EEPROM
#define SRAM_EEPROM_EMULATION
#define MARLIN_EEPROM_SIZE                0x2000  // 8KB

//
// Servos
//
#define SERVO0_PIN                          PC6
#define SERVO1_PIN                          PC7

//
// Limit Switches
//
#define X_MIN_PIN                           PC13
#define X_MAX_PIN                           PA15
#define Y_MIN_PIN                           PA5
#define Y_MAX_PIN                           PD12
#define Z_MIN_PIN                           PD14
#define Z_MAX_PIN                           PD15

//
// Steppers
//
#define X_STEP_PIN                          PC4
#define X_DIR_PIN                           PA4
#define X_ENABLE_PIN                        PE7

#define Y_STEP_PIN                          PE5
#define Y_DIR_PIN                           PE2
#define Y_ENABLE_PIN                        PE6

#define Z_STEP_PIN                          PD5
#define Z_DIR_PIN                           PD3
#define Z_ENABLE_PIN                        PD6

#define E0_STEP_PIN                         PD7
#define E0_DIR_PIN                          PD0
#define E0_ENABLE_PIN                       PB9

#define E1_STEP_PIN                         PE0
#define E1_DIR_PIN                          PE1
#define E1_ENABLE_PIN                       PB8

//
// Temperature Sensors
//
#define TEMP_0_PIN                          PC0   // T0
#define TEMP_1_PIN                          PC1   // T1
#define TEMP_BED_PIN                        PC2   // TB

#ifndef TEMP_CHAMBER_PIN
  #define TEMP_CHAMBER_PIN                  PC3   // TC
#endif

//
// Heaters / Fans
//
#define HEATER_0_PIN                        PA2   // Heater0
#define HEATER_1_PIN                        PA3   // Heater1
#define HEATER_BED_PIN                      PA1   // Hotbed

#define FAN_PIN                             PE9   // Fan0
#define FAN1_PIN                            PE11  // Fan1
#define FAN2_PIN                            PE13  // Fan2
#define FAN3_PIN                            PE14  // Fan3

//
// Misc. Functions
//
#define LED_PIN                             PA6
//#define LED_PIN                           PA7
#define KILL_PIN                            PB1

//
// LCD / Controller
//
//#define SD_DETECT_PIN                     PC5
//#define SD_DETECT_PIN                     PA8   // SDIO SD_DETECT_PIN, external SDIO card reader only

#define BEEPER_PIN                          PD10
#define LCD_PINS_RS                         PE15
#define LCD_PINS_ENABLE                     PD8
#define LCD_PINS_D4                         PE10
#define LCD_PINS_D5                         PE12
#define LCD_PINS_D6                         PD1
#define LCD_PINS_D7                         PE8
#define BTN_ENC                             PD9
#define BTN_EN1                             PD4
#define BTN_EN2                             PD13

#define DOGLCD_CS                    LCD_PINS_D5
#define DOGLCD_A0                    LCD_PINS_D6

#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
  #define BTN_ENC_EN                 LCD_PINS_D7  // Detect the presence of the encoder
#endif

//
// Onboard SD support
//
#define SDIO_D0_PIN                         PC8
#define SDIO_D1_PIN                         PC9
#define SDIO_D2_PIN                         PC10
#define SDIO_D3_PIN                         PC11
#define SDIO_CK_PIN                         PC12
#define SDIO_CMD_PIN                        PD2

#ifndef SDCARD_CONNECTION
  #define SDCARD_CONNECTION              ONBOARD
#endif

#if SD_CONNECTION_IS(ONBOARD)
  #define SDIO_SUPPORT                            // Use SDIO for onboard SD

  #ifndef SDIO_SUPPORT
    #define SOFTWARE_SPI                          // Use soft SPI for onboard SD
    #define SDSS                     SDIO_D3_PIN
    #define SD_SCK_PIN               SDIO_CK_PIN
    #define SD_MISO_PIN              SDIO_D0_PIN
    #define SD_MOSI_PIN             SDIO_CMD_PIN
  #endif
#endif