Marlin_Firmware/Marlin/src/pins/stm32f4/pins_GENERIC_STM32F4.h

192 lines
5.2 KiB
C
Raw Normal View History

2018-04-17 17:33:29 -05:00
/**
* Marlin 3D Printer Firmware
2020-02-03 08:00:57 -06:00
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
2018-04-17 17:33:29 -05:00
*
* Based on Sprinter and grbl.
2019-06-27 23:57:50 -05:00
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
2018-04-17 17:33:29 -05:00
*
* 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/>.
*
*/
2019-07-04 22:44:12 -05:00
#pragma once
2018-04-17 17:33:29 -05:00
2019-09-02 19:49:58 -05:00
/**
* To build with Arduino IDE use "Discovery F407VG"
* To build with PlatformIO use environment "STM32F4"
*/
#if !defined(STM32F4) && !defined(STM32F4xx)
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
2019-07-14 15:34:01 -05:00
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "STM32F4 supports up to 2 hotends / E-steppers."
2018-04-17 17:33:29 -05:00
#endif
2019-08-20 19:08:58 -05:00
#define BOARD_INFO_NAME "Misc. STM32F4"
2018-04-17 17:33:29 -05:00
#define DEFAULT_MACHINE_NAME "STM32F407VET6"
2018-06-03 19:01:15 -05:00
//#define I2C_EEPROM
2018-04-17 17:33:29 -05:00
2019-08-28 21:21:38 -05:00
#ifndef E2END
2020-03-21 21:13:19 -05:00
#define E2END 0xFFF // 4KB
2019-08-28 21:21:38 -05:00
#endif
2018-04-17 17:33:29 -05:00
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
2018-04-17 17:33:29 -05:00
//
// Limit Switches
//
2020-03-21 21:13:19 -05:00
#define X_MIN_PIN PE0
#define X_MAX_PIN -1
#define Y_MIN_PIN PE1
#define Y_MAX_PIN -1
#define Z_MIN_PIN PE14
#define Z_MAX_PIN -1
2018-04-17 17:33:29 -05:00
//
// Z Probe (when not Z_MIN_PIN)
//
2018-06-03 19:01:15 -05:00
//#ifndef Z_MIN_PROBE_PIN
// #define Z_MIN_PROBE_PIN PA4
//#endif
2018-04-17 17:33:29 -05:00
//
// Steppers
//
2020-03-21 21:13:19 -05:00
#define X_STEP_PIN PD3
#define X_DIR_PIN PD2
#define X_ENABLE_PIN PD0
2018-06-03 19:01:15 -05:00
//#ifndef X_CS_PIN
// #define X_CS_PIN PD1
//#endif
2018-04-17 17:33:29 -05:00
2020-03-21 21:13:19 -05:00
#define Y_STEP_PIN PE11
#define Y_DIR_PIN PE10
#define Y_ENABLE_PIN PE13
2018-06-03 19:01:15 -05:00
//#ifndef Y_CS_PIN
// #define Y_CS_PIN PE12
//#endif
2018-04-17 17:33:29 -05:00
2020-03-21 21:13:19 -05:00
#define Z_STEP_PIN PD6
#define Z_DIR_PIN PD7
#define Z_ENABLE_PIN PD4
2018-06-03 19:01:15 -05:00
//#ifndef Z_CS_PIN
// #define Z_CS_PIN PD5
//#endif
2018-04-17 17:33:29 -05:00
2020-03-21 21:13:19 -05:00
#define E0_STEP_PIN PB5
#define E0_DIR_PIN PB6
#define E0_ENABLE_PIN PB3
2018-06-03 19:01:15 -05:00
//#ifndef E0_CS_PIN
// #define E0_CS_PIN PB4
//#endif
2018-04-17 17:33:29 -05:00
2020-03-21 21:13:19 -05:00
#define E1_STEP_PIN PE4
#define E1_DIR_PIN PE2
#define E1_ENABLE_PIN PE3
2018-06-03 19:01:15 -05:00
//#ifndef E1_CS_PIN
// #define E1_CS_PIN PE5
//#endif
2018-04-17 17:33:29 -05:00
2020-03-21 21:13:19 -05:00
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
2018-04-17 17:33:29 -05:00
//
// Temperature Sensors
//
2020-03-21 21:13:19 -05:00
#define TEMP_0_PIN PC0 // Analog Input
#define TEMP_1_PIN PC1 // Analog Input
#define TEMP_BED_PIN PC2 // Analog Input
2018-04-17 17:33:29 -05:00
//
// Heaters / Fans
//
2020-03-21 21:13:19 -05:00
#define HEATER_0_PIN PA1
#define HEATER_1_PIN PA2
#define HEATER_BED_PIN PA0
2018-04-17 17:33:29 -05:00
#ifndef FAN_PIN
2020-03-21 21:13:19 -05:00
#define FAN_PIN PC6
#endif
2020-03-21 21:13:19 -05:00
#define FAN1_PIN PC7
#define FAN2_PIN PC8
2018-04-17 17:33:29 -05:00
#ifndef E0_AUTO_FAN_PIN
#define E0_AUTO_FAN_PIN PC7
#endif
2018-04-17 17:33:29 -05:00
//
// Misc. Functions
//
2020-03-21 21:13:19 -05:00
//#define CASE_LIGHT_PIN_CI PF13
//#define CASE_LIGHT_PIN_DO PF14
//#define NEOPIXEL_PIN PF13
2018-04-17 17:33:29 -05:00
//
2019-01-23 20:17:21 -06:00
// Průša i3 MK2 Multi Material Multiplexer Support
2018-04-17 17:33:29 -05:00
//
2020-03-21 21:13:19 -05:00
//#define E_MUX0_PIN PG3
//#define E_MUX1_PIN PG4
2018-04-17 17:33:29 -05:00
//
// Servos
//
2020-03-21 21:13:19 -05:00
//#define SERVO0_PIN PE13
//#define SERVO1_PIN PE14
2018-04-17 17:33:29 -05:00
2020-03-21 21:13:19 -05:00
#define SDSS PE7
#define SS_PIN PE7
#define LED_PIN PB7 //Alive
#define PS_ON_PIN PA10
#define KILL_PIN PA8
#define PWR_LOSS PA4 //Power loss / nAC_FAULT
2018-04-17 17:33:29 -05:00
//
// LCD / Controller
//
2020-03-21 21:13:19 -05:00
#define SD_DETECT_PIN PA15
#define BEEPER_PIN PC9
#define LCD_PINS_RS PE9
#define LCD_PINS_ENABLE PE8
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#define BTN_EN1 PC4
#define BTN_EN2 PC5
#define BTN_ENC PC3
2018-04-17 17:33:29 -05:00
//
// Filament runout
//
2020-03-21 21:13:19 -05:00
#define FIL_RUNOUT_PIN PA3
2018-04-17 17:33:29 -05:00
//
// ST7920 Delays
//
2019-11-09 22:33:25 -06:00
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
2018-04-17 17:33:29 -05:00
#endif