|
| 1 | +/** |
| 2 | + * Marlin 3D Printer Firmware |
| 3 | + * Copyright (c) 2023 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 | +#if NOT_TARGET(STM32F4) |
| 25 | + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" |
| 26 | +#elif HOTENDS > 1 || E_STEPPERS > 1 |
| 27 | + #error "STM32F401CCU6 boards support one hotend / E-steppers only." |
| 28 | +#endif |
| 29 | + |
| 30 | +#include "env_validate.h" |
| 31 | + |
| 32 | +#ifndef DEFAULT_MACHINE_NAME |
| 33 | + #define DEFAULT_MACHINE_NAME "I3DBEE BP_01" |
| 34 | +#endif |
| 35 | + |
| 36 | +#define TEMP_TIMER 5 |
| 37 | + |
| 38 | +//#define DISABLE_DEBUG // DISABLE_(DEBUG|JTAG) is not supported for STM32F4. |
| 39 | +//#define DISABLE_JTAG |
| 40 | +//#define ALLOW_STM32F4 |
| 41 | +//#define BOARD_NO_NATIVE_USB |
| 42 | + |
| 43 | +// |
| 44 | +// EEPROM |
| 45 | +// |
| 46 | +#if NO_EEPROM_SELECTED |
| 47 | + #define FLASH_EEPROM_EMULATION |
| 48 | + #define FLASH_EEPROM_LEVELING |
| 49 | + #define FLASH_SECTOR (FLASH_SECTOR_TOTAL - 1) |
| 50 | + #define FLASH_UNIT_SIZE 0x4000 // 16kB |
| 51 | + #define MARLIN_EEPROM_SIZE FLASH_UNIT_SIZE |
| 52 | + #undef NO_EEPROM_SELECTED |
| 53 | +#endif |
| 54 | + |
| 55 | +/* |
| 56 | +#if NO_EEPROM_SELECTED |
| 57 | + #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0 |
| 58 | + #define SDCARD_EEPROM_EMULATION |
| 59 | +#endif |
| 60 | +*/ |
| 61 | + |
| 62 | +// |
| 63 | +// Limit Switches |
| 64 | +// |
| 65 | +#define X_STOP_PIN PB9 |
| 66 | +#define Y_STOP_PIN PB3 |
| 67 | +#define Z_STOP_PIN PA9 |
| 68 | + |
| 69 | +// |
| 70 | +// Steppers |
| 71 | +// |
| 72 | +#define X_STEP_PIN PB7 |
| 73 | +#define X_DIR_PIN PB6 |
| 74 | +#define X_ENABLE_PIN PB8 |
| 75 | + |
| 76 | +#define Y_STEP_PIN PB5 |
| 77 | +#define Y_DIR_PIN PB4 |
| 78 | +#define Y_ENABLE_PIN X_ENABLE_PIN |
| 79 | + |
| 80 | +#define Z_STEP_PIN PA15 |
| 81 | +#define Z_DIR_PIN PA10 |
| 82 | +#define Z_ENABLE_PIN X_ENABLE_PIN |
| 83 | + |
| 84 | +#define E0_STEP_PIN PA8 |
| 85 | +#define E0_DIR_PIN PB15 |
| 86 | +#define E0_ENABLE_PIN X_ENABLE_PIN |
| 87 | + |
| 88 | +// |
| 89 | +// Temperature Sensors |
| 90 | +// |
| 91 | +#define TEMP_0_PIN PB1 // Analog Input (HOTEND thermistor) |
| 92 | +#define TEMP_BED_PIN PB0 // Analog Input (BED thermistor) |
| 93 | + |
| 94 | +// |
| 95 | +// Heaters / Fans |
| 96 | +// |
| 97 | +#define HEATER_0_PIN PA2 // HOTEND MOSFET |
| 98 | +#define HEATER_BED_PIN PA0 // BED MOSFET |
| 99 | + |
| 100 | +#define FAN1_PIN PA1 // FAN1 header on board - PRINT FAN |
| 101 | + |
| 102 | +// |
| 103 | +// SD Card |
| 104 | +// |
| 105 | +#define SDSS PA4 |
| 106 | +#define SD_DETECT_PIN -1 |
| 107 | +#define SD_SCK_PIN PA5 |
| 108 | +#define SD_MISO_PIN PA6 |
| 109 | +#define SD_MOSI_PIN PA7 |
| 110 | + |
| 111 | +/** |
| 112 | + * ------ ------ |
| 113 | + * (BEEPER) PB10 | 1 2 | PC13 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) |
| 114 | + * (LCD_EN) PB13 | 3 4 | PB12 (LCD_RS) (BTN_EN1) PC15 | 3 4 | PA4 (SD_SS) |
| 115 | + * (LCD_D4) PB14 5 6 | PA3 (LCD_D5) (BTN_EN2) PC14 5 6 | PA7 (MOSI) |
| 116 | + * (LCD_D6) - | 7 8 | - (LCD_D7) (SD_DET) - | 7 8 | RESET |
| 117 | + * GND | 9 10 | 5V GND | 9 10 | - |
| 118 | + * ------ ------ |
| 119 | + * EXP1 EXP2 |
| 120 | + */ |
| 121 | +#define EXP1_01_PIN PB10 // BEEPER |
| 122 | +#define EXP1_02_PIN PC13 // ENC |
| 123 | +#define EXP1_03_PIN PB13 // EN |
| 124 | +#define EXP1_04_PIN PB12 // RS |
| 125 | +#define EXP1_05_PIN PB14 // D4 |
| 126 | +#define EXP1_06_PIN PA3 // D5 |
| 127 | +#define EXP1_07_PIN -1 |
| 128 | +#define EXP1_08_PIN -1 |
| 129 | + |
| 130 | +#define EXP2_01_PIN PA6 // MISO |
| 131 | +#define EXP2_02_PIN PA5 // SCK |
| 132 | +#define EXP2_03_PIN PC15 // EN1 |
| 133 | +#define EXP2_04_PIN PA4 // SS |
| 134 | +#define EXP2_05_PIN PC14 // EN2 |
| 135 | +#define EXP2_06_PIN PA7 // MOSI |
| 136 | +#define EXP2_07_PIN -1 |
| 137 | +#define EXP2_08_PIN -1 // RESET |
| 138 | +#define EXP2_10_PIN -1 |
| 139 | + |
| 140 | +// |
| 141 | +// LCD / Controller |
| 142 | +// |
| 143 | +#if HAS_WIRED_LCD |
| 144 | + #define BEEPER_PIN EXP1_01_PIN |
| 145 | + |
| 146 | + #define BTN_EN1 EXP2_03_PIN |
| 147 | + #define BTN_EN2 EXP2_05_PIN |
| 148 | + #define BTN_ENC EXP1_02_PIN |
| 149 | + |
| 150 | + #define LCD_PINS_RS EXP1_04_PIN |
| 151 | + #define LCD_PINS_EN EXP1_03_PIN |
| 152 | + #define LCD_PINS_D4 EXP1_05_PIN |
| 153 | + #define LCD_PINS_D5 EXP1_06_PIN |
| 154 | + |
| 155 | + #if ENABLED(FYSETC_MINI_12864) |
| 156 | + #define DOGLCD_CS EXP1_03_PIN |
| 157 | + #define DOGLCD_A0 EXP1_04_PIN |
| 158 | + //#define LCD_BACKLIGHT_PIN -1 |
| 159 | + #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally. |
| 160 | + #if ENABLED(FYSETC_MINI_12864_2_1) |
| 161 | + #define NEOPIXEL_PIN EXP1_06_PIN |
| 162 | + #endif |
| 163 | + #endif |
| 164 | + |
| 165 | + // |
| 166 | + // GLCD features |
| 167 | + // |
| 168 | + //#define LCD_CONTRAST 190 |
| 169 | + |
| 170 | + // |
| 171 | + // Dcreen orientation |
| 172 | + // |
| 173 | + //#define LCD_SCREEN_ROT_90 |
| 174 | + //#define LCD_SCREEN_ROT_180 |
| 175 | + //#define LCD_SCREEN_ROT_270 |
| 176 | +#endif |
0 commit comments