Newer
Older
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
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 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 <http://www.gnu.org/licenses/>.
*
*/
/**
* CREALITY (STM32F103) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#if HOTENDS > 1 || E_STEPPERS > 1
#error "CREALITY supports up to 1 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "CREALITY V4"
#define DEFAULT_MACHINE_NAME "Ender 3 V2"
//
// EEPROM
//
#if NO_EEPROM_SELECTED
// FLASH
//#define FLASH_EEPROM_EMULATION
// I2C
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 used only for display settings
#if ENABLED(IIC_BL24CXX_EEPROM)
#define IIC_EEPROM_SDA PA11
#define IIC_EEPROM_SCL PA12
//#define MARLIN_EEPROM_SIZE 0x4000 // 16Kb (24c16)
#define SDCARD_EEPROM_EMULATION // SD EEPROM until all EEPROM is BL24CXX
#define MARLIN_EEPROM_SIZE 0x1000 // 4Kb
// SPI
//#define SPI_EEPROM // EEPROM on SPI-0
//#define SPI_CHAN_EEPROM1 ?
//#define SPI_EEPROM1_CS ?
// 2K EEPROM
//#define SPI_EEPROM2_CS ?
// 32Mb FLASH
//#define SPI_FLASH_CS ?
#endif
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
//
// Servos
//
#define SERVO0_PIN PB0 // BLTouch OUT
//
// Limit Switches
//
#define X_STOP_PIN PA5
#define Y_STOP_PIN PA6
#define Z_STOP_PIN PA7
#define Z_PROBE_PIN PB1 // BLTouch IN
//
// Steppers
//
#define X_ENABLE_PIN PC3
#define X_STEP_PIN PC2
#define X_DIR_PIN PB9
#define Y_ENABLE_PIN PC3
#define Y_STEP_PIN PB8
#define Y_DIR_PIN PB7
#define Z_ENABLE_PIN PC3
#define Z_STEP_PIN PB6
#define Z_DIR_PIN PB5
#define E0_ENABLE_PIN PC3
#define E0_STEP_PIN PB4
#define E0_DIR_PIN PB3
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_DEBUG
//
// Temperature Sensors
//
#define TEMP_0_PIN PC5 // TH1
#define TEMP_BED_PIN PC4 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PA1 // HEATER1
#define HEATER_BED_PIN PA2 // HOT BED
#define FAN_PIN PA0 // FAN
#define FAN_SOFT_PWM
//
// SD Card
//
#define SD_DETECT_PIN PC7
#define SDCARD_CONNECTION ONBOARD
#define ON_BOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PA4 // SDSS
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
164
165
166
167
168
169
170
171
172
#define SDIO_SUPPORT
#if ENABLED(RET6_12864_LCD)
/* RET6 12864 LCD */
#define LCD_PINS_RS PB12
#define LCD_PINS_ENABLE PB15
#define LCD_PINS_D4 PB13
#define BTN_ENC PB2
#define BTN_EN1 PB10
#define BTN_EN2 PB14
#define BEEPER_PIN PC6
#elif ENABLED(VET6_12864_LCD)
/* VET6 12864 LCD */
#define LCD_PINS_RS PA4
#define LCD_PINS_ENABLE PA7
#define LCD_PINS_D4 PA5
#define BTN_ENC PC5
#define BTN_EN1 PB10
#define BTN_EN2 PA6
#elif ENABLED(DWIN_CREALITY_LCD)
/* RET6 DWIN ENCODER LCD */
#define BTN_ENC PB14
#define BTN_EN1 PB15
#define BTN_EN2 PB12
//#define LCD_LED_PIN PB2
#define BEEPER_PIN PB13
#elif ENABLED(DWIN_VET6_CREALITY_LCD)
/* VET6 DWIN ENCODER LCD */
#define BTN_ENC PA6
#define BTN_EN1 PA7
#define BTN_EN2 PA4
#define BEEPER_PIN PA5
#endif