2019-11-26 10:00:59 +00:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
2020-02-03 14:00:57 +00:00
|
|
|
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
2019-11-26 10:00:59 +00:00
|
|
|
*
|
|
|
|
* 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
|
2020-07-23 03:20:14 +00:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
2019-11-26 10:00:59 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#if !defined(STM32F4) && !defined(STM32F4xx)
|
|
|
|
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
|
|
|
|
#elif HOTENDS > 2 || E_STEPPERS > 2
|
|
|
|
#error "STM32F4 supports up to 2 hotends / E-steppers."
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define DEFAULT_MACHINE_NAME "STM32F446VET6"
|
2020-05-16 11:02:02 +00:00
|
|
|
#define BOARD_INFO_NAME "STM32F4 VAkE"
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//#define I2C_EEPROM
|
2020-08-22 06:22:14 +00:00
|
|
|
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Servos
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
//#define SERVO0_PIN PE13
|
|
|
|
//#define SERVO1_PIN PE14
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Limit Switches
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
#define X_STOP_PIN PE10
|
|
|
|
#define Y_STOP_PIN PE9
|
|
|
|
#define Z_STOP_PIN PE8
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Z Probe (when not Z_MIN_PIN)
|
|
|
|
//
|
|
|
|
#ifndef Z_MIN_PROBE_PIN
|
2020-03-22 02:13:19 +00:00
|
|
|
#define Z_MIN_PROBE_PIN PA4
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// Filament runout
|
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
#define FIL_RUNOUT_PIN PA3
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Steppers
|
|
|
|
//
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define STEPPER_ENABLE_PIN PB2
|
2019-11-26 10:00:59 +00:00
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define X_STEP_PIN PC6 // X_STEP
|
|
|
|
#define X_DIR_PIN PC7 // X_DIR
|
|
|
|
#define X_ENABLE_PIN PB2 //
|
2019-11-26 10:00:59 +00:00
|
|
|
#ifndef X_CS_PIN
|
2020-03-22 02:13:19 +00:00
|
|
|
#define X_CS_PIN PC8 // X_CS
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define Y_STEP_PIN PD9 // Y_STEP
|
|
|
|
#define Y_DIR_PIN PD10 // Y_DIR
|
|
|
|
#define Y_ENABLE_PIN PB2 //
|
2019-11-26 10:00:59 +00:00
|
|
|
#ifndef Y_CS_PIN
|
2020-03-22 02:13:19 +00:00
|
|
|
#define Y_CS_PIN PD11 // Y_CS
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define Z_STEP_PIN PE15 // Z_STEP
|
|
|
|
#define Z_DIR_PIN PB10 // Z_DIR
|
|
|
|
#define Z_ENABLE_PIN PB2
|
2019-11-26 10:00:59 +00:00
|
|
|
#ifndef Z_CS_PIN
|
2020-03-22 02:13:19 +00:00
|
|
|
#define Z_CS_PIN PD8
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define E0_STEP_PIN PB1
|
|
|
|
#define E0_DIR_PIN PB13
|
|
|
|
#define E0_ENABLE_PIN PB2
|
2019-11-26 10:00:59 +00:00
|
|
|
#ifndef E0_CS_PIN
|
2020-03-22 02:13:19 +00:00
|
|
|
#define E0_CS_PIN PE11
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define E1_STEP_PIN PC4
|
|
|
|
#define E1_DIR_PIN PC5
|
|
|
|
#define E1_ENABLE_PIN PB2
|
2019-11-26 10:00:59 +00:00
|
|
|
#ifndef E1_CS_PIN
|
2020-03-22 02:13:19 +00:00
|
|
|
#define E1_CS_PIN PB0
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define SCK_PIN PE12 // PA5 // SPI1 for SD card
|
|
|
|
#define MISO_PIN PE13 // PA6
|
|
|
|
#define MOSI_PIN PE14 // PA7
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
// added for SD card : optional or not ???
|
2020-03-22 02:13:19 +00:00
|
|
|
//#define SD_CHIP_SELECT_PIN SDSS // The default chip select pin for the SD card is SS.
|
2019-11-26 10:00:59 +00:00
|
|
|
// The following three pins must not be redefined for hardware SPI.
|
2020-03-22 02:13:19 +00:00
|
|
|
//#define SPI_MOSI_PIN MOSI_PIN // SPI Master Out Slave In pin
|
|
|
|
//#define SPI_MISO_PIN MISO_PIN // SPI Master In Slave Out pin
|
|
|
|
//#define SPI_SCK_PIN SCK_PIN // SPI Clock pin
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Temperature Sensors (Analog inputs)
|
|
|
|
//
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define TEMP_0_PIN PC0 // Analog Input
|
|
|
|
#define TEMP_1_PIN PC1 // Analog Input
|
|
|
|
#define TEMP_2_PIN PC2 // Analog Input
|
|
|
|
#define TEMP_3_PIN PC3 // Analog Input
|
|
|
|
#define TEMP_BED_PIN PC3 // Analog Input
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Heaters / Fans
|
|
|
|
//
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define HEATER_0_PIN PD15
|
|
|
|
#define HEATER_1_PIN PD14
|
|
|
|
#define HEATER_BED_PIN PD12
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
#ifndef FAN_PIN
|
2020-03-22 02:13:19 +00:00
|
|
|
#define FAN_PIN PD13
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
2020-03-22 02:13:19 +00:00
|
|
|
#define FAN1_PIN PB5 // PA0
|
|
|
|
#define FAN2_PIN PB4 // PA1
|
2019-11-26 10:00:59 +00:00
|
|
|
|
2020-04-16 08:24:41 +00:00
|
|
|
#ifndef E0_AUTO_FAN_PIN
|
|
|
|
#define E0_AUTO_FAN_PIN PD13
|
|
|
|
#endif
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// Misc. Functions
|
|
|
|
//
|
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
//#define CASE_LIGHT_PIN_CI PF13
|
|
|
|
//#define CASE_LIGHT_PIN_DO PF14
|
|
|
|
//#define NEOPIXEL_PIN PF13
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
//
|
2020-08-26 07:15:43 +00:00
|
|
|
// Průša i3 MK2 Multi Material Multiplexer Support
|
2019-11-26 10:00:59 +00:00
|
|
|
//
|
2020-03-22 02:13:19 +00:00
|
|
|
//#define E_MUX0_PIN PG3
|
|
|
|
//#define E_MUX1_PIN PG4
|
2019-11-26 10:00:59 +00:00
|
|
|
|
2020-03-22 02:13:19 +00:00
|
|
|
#define LED_PIN PB14 // Alive
|
|
|
|
#define PS_ON_PIN PE0
|
|
|
|
#define KILL_PIN PD5
|
|
|
|
#define POWER_LOSS_PIN PA4 // ?? Power loss / nAC_FAULT
|
2019-11-26 10:00:59 +00:00
|
|
|
|
|
|
|
#if ENABLED(SDSUPPORT)
|
2020-03-22 02:13:19 +00:00
|
|
|
#define SD_DETECT_PIN PB7
|
|
|
|
#define SS_PIN PB_15 // USD_CS -> CS for onboard SD
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// LCD / Controller
|
|
|
|
//
|
|
|
|
#if HAS_SPI_LCD
|
|
|
|
#if ENABLED(SDSUPPORT)
|
2020-03-22 02:13:19 +00:00
|
|
|
#define SDSS PB6 // CS for SD card in LCD
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
2020-03-22 02:13:19 +00:00
|
|
|
#define BEEPER_PIN PC9
|
|
|
|
#define LCD_PINS_RS PC12
|
|
|
|
#define LCD_PINS_ENABLE PD7
|
|
|
|
#define LCD_PINS_D4 PD1
|
|
|
|
#define LCD_PINS_D5 PD2
|
|
|
|
#define LCD_PINS_D6 PD3
|
|
|
|
#define LCD_PINS_D7 PD4
|
|
|
|
#define BTN_EN1 PD6
|
|
|
|
#define BTN_EN2 PD0
|
|
|
|
#define BTN_ENC PB12
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
//
|
|
|
|
// ST7920 Delays
|
|
|
|
//
|
2020-06-24 01:37:19 +00:00
|
|
|
#ifndef BOARD_ST7920_DELAY_1
|
|
|
|
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
2020-06-24 01:37:19 +00:00
|
|
|
#ifndef BOARD_ST7920_DELAY_2
|
|
|
|
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|
2020-06-24 01:37:19 +00:00
|
|
|
#ifndef BOARD_ST7920_DELAY_3
|
|
|
|
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
|
2019-11-26 10:00:59 +00:00
|
|
|
#endif
|