Prusa MINI Firmware overview
pins_A3IDES_2209_02.h
Go to the documentation of this file.
1 /**
2  * Marlin 3D Printer Firmware
3  * Copyright (C) 2019 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 <http://www.gnu.org/licenses/>.
20  *
21  */
22 
23 #if !defined(STM32F4) && !defined(STM32F4xx)
24  #error "Oops! Select an A3ides board in 'Tools > Board.'"
25 #endif
26 
27 #define DEFAULT_MACHINE_NAME "Prusa-mini"
28 #define BOARD_NAME "A3ides Board"
29 
30 #define I2C_EEPROM
31 
32 #define E2END 0x03ff // EEPROM end address (1kB)
33 
34 
35 #if HOTENDS > 1 || E_STEPPERS > 2
36  #error "A3ides supports up to 1 hotends / E-steppers."
37 #endif
38 
39 //
40 // Limit Switches
41 //
42 #define X_MIN_PIN PE2
43 #define X_MAX_PIN PE2
44 #define Y_MIN_PIN PE1
45 #define Y_MAX_PIN PE1
46 #define Z_MIN_PIN PA8
47 #define Z_MAX_PIN PE3
48 
49 //
50 // Z Probe (when not Z_MIN_PIN)
51 //
52 
53 //#ifndef Z_MIN_PROBE_PIN
54 // #define Z_MIN_PROBE_PIN PA4
55 //#endif
56 
57 //
58 // Steppers
59 //
60 
61 #define X_STEP_PIN PD1
62 #define X_DIR_PIN PD0
63 #define X_ENABLE_PIN PD3
64 
65 #define Y_STEP_PIN PD13
66 #define Y_DIR_PIN PD12
67 #define Y_ENABLE_PIN PD14
68 
69 #define Z_STEP_PIN PD4
70 #define Z_DIR_PIN PD15
71 #define Z_ENABLE_PIN PD2
72 
73 #define E0_STEP_PIN PD9
74 #define E0_DIR_PIN PD8
75 #define E0_ENABLE_PIN PD10
76 
77 
78 #if HAS_DRIVER(TMC2208)
79  /**
80  * TMC2208 stepper drivers
81  *
82  * Hardware serial communication ports.
83  * If undefined software serial is used according to the pins below
84  */
85  #define TMC2208_SERIAL Serial3
86  #define X_HARDWARE_SERIAL TMC2208_SERIAL
87  #define Y_HARDWARE_SERIAL TMC2208_SERIAL
88  #define Z_HARDWARE_SERIAL TMC2208_SERIAL
89  #define E0_HARDWARE_SERIAL TMC2208_SERIAL
90 #elif HAS_DRIVER(TMC2209)
91  #define TMC2209_SERIAL Serial3
92 
93  #define X_HARDWARE_SERIAL TMC2209_SERIAL
94  #define Y_HARDWARE_SERIAL TMC2209_SERIAL
95  #define Z_HARDWARE_SERIAL TMC2209_SERIAL
96  #define E0_HARDWARE_SERIAL TMC2209_SERIAL
97 
98  #define X_SLAVE_ADDRESS 1
99  #define Y_SLAVE_ADDRESS 3
100  #define Z_SLAVE_ADDRESS 0
101  #define E0_SLAVE_ADDRESS 2
102 #else
103  #error Unknown stepper driver
104 #endif
105 
106 //
107 // Temperature Sensors
108 //
109 
110 #define TEMP_0_PIN PC0 // Analog Input
111 #define TEMP_BED_PIN PA4 // Analog Input
112 
113 #define TEMP_PINDA_PIN PA6 // Analog Input
114 
115 
116 //
117 // Heaters / Fans
118 //
119 
120 #define HEATER_0_PIN PB1
121 #define HEATER_BED_PIN PB0
122 
123 #define FAN_PIN PE11
124 
125 //#define FAN1_PIN PE9
126 #undef E0_AUTO_FAN_PIN
127 #define E0_AUTO_FAN_PIN PE9
128 
129 //#define ORIG_E0_AUTO_FAN_PIN PE9 // Use this by NOT overriding E0_AUTO_FAN_PIN
130 
131 
132 #define SDSS 80 //it means "NC"
133 #define SD_DETECT_PIN 80 //it means "NC"
134 
135 //#define LED_PIN PC13 //Alive
136 
137 //#define PWR_LOSS PA4 //Power loss / nAC_FAULT
138 
139 #define BEEPER_PIN PA0
140 
141 #define BTN_ENC PE12
142 #define BTN_EN1 PE15
143 #define BTN_EN2 PE13
144 
145 #define FIL_RUNOUT_PIN PB4