Split up STM32 pins files (#17212)

This commit is contained in:
Scott Lahteine
2020-03-20 23:45:00 -05:00
committed by GitHub
parent 3151856e98
commit 04cea864bc
45 changed files with 42 additions and 42 deletions

View File

@ -0,0 +1,233 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#ifndef TARGET_STM32F1
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "BIGTREE SKR E3 DIP V1.0"
// Release PB3/PB4 (TMC_SW Pins) from JTAG pins
#define DISABLE_JTAG
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
#define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
#undef E2END
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
//
// Servos
//
#define SERVO0_PIN PA1 // SERVOS
//
// Limit Switches
//
#define X_STOP_PIN PC1 // X-STOP
#define Y_STOP_PIN PC0 // Y-STOP
#define Z_STOP_PIN PC15 // Z-STOP
//
// Z Probe must be this pin
//
#define Z_MIN_PROBE_PIN PC14 // PROBE
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC2 // E0-STOP
#endif
//
// Steppers
//
#define X_ENABLE_PIN PC7
#define X_STEP_PIN PC6
#define X_DIR_PIN PB15
#ifndef X_CS_PIN
#define X_CS_PIN PC10
#endif
#define Y_ENABLE_PIN PB14
#define Y_STEP_PIN PB13
#define Y_DIR_PIN PB12
#ifndef Y_CS_PIN
#define Y_CS_PIN PC11
#endif
#define Z_ENABLE_PIN PB11
#define Z_STEP_PIN PB10
#define Z_DIR_PIN PB2
#ifndef Z_CS_PIN
#define Z_CS_PIN PC12
#endif
#define E0_ENABLE_PIN PB1
#define E0_STEP_PIN PB0
#define E0_DIR_PIN PC5
#ifndef E0_CS_PIN
#define E0_CS_PIN PD2
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PB5
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PB4
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PB3
#endif
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN PC10
#define X_SERIAL_RX_PIN PC10
#define Y_SERIAL_TX_PIN PC11
#define Y_SERIAL_RX_PIN PC11
#define Z_SERIAL_TX_PIN PC12
#define Z_SERIAL_RX_PIN PC12
#define E0_SERIAL_TX_PIN PD2
#define E0_SERIAL_RX_PIN PD2
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PA0 // Analog Input "TH0"
#define TEMP_BED_PIN PC3 // Analog Input "TB0"
//
// Heaters / Fans
//
#define HEATER_0_PIN PC8 // HE
#define HEATER_BED_PIN PC9 // HB
#define FAN_PIN PA8 // FAN0
//
// USB connect control
//
#define USB_CONNECT_PIN PC13
#define USB_CONNECT_INVERTING false
#define SD_DETECT_PIN PC4
/**
* _____
* 5V | 1 2 | GND
* (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS)
* (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2)
* RESET | 7 8 | PA9 (BTN_EN1)
* (BTN_ENC) PB6 | 9 10| PA15 (BEEPER)
* -----
* EXP1
*/
#define EXPA1_03_PIN PB7
#define EXPA1_04_PIN PB8
#define EXPA1_05_PIN PB9
#define EXPA1_06_PIN PA10
#define EXPA1_07_PIN -1
#define EXPA1_08_PIN PA9
#define EXPA1_09_PIN PB6
#define EXPA1_10_PIN PA15
#if HAS_SPI_LCD
#define BTN_ENC EXPA1_09_PIN
#define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN EXPA1_10_PIN
#define LCD_PINS_RS EXPA1_04_PIN
#define LCD_PINS_ENABLE EXPA1_03_PIN
#define LCD_PINS_D4 EXPA1_05_PIN
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
/** Creality Ender-2 display pinout
* _____
* 5V | 1 2 | GND
* (MOSI) PB7 | 3 4 | PB8 (LCD_RS)
* (LCD_A0) PB9 | 5 6 PA10 (BTN_EN2)
* RESET | 7 8 | PA9 (BTN_EN1)
* (BTN_ENC) PB6 | 9 10| PA15 (SCK)
* -----
* EXP1
*/
#define DOGLCD_CS EXPA1_04_PIN
#define DOGLCD_A0 EXPA1_05_PIN
#define DOGLCD_SCK EXPA1_10_PIN
#define DOGLCD_MOSI EXPA1_03_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#else
#error "Only CR10_STOCKDISPLAY, ENDER2_STOCKDISPLAY, and MKS_MINI_12864 are currently supported on the BIGTREE_SKR_E3_DIP."
#endif
#endif // HAS_SPI_LCD
//
// SD Support
//
#define HAS_ONBOARD_SD
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#define ON_BOARD_SPI_DEVICE 1 //SPI1
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card

View File

@ -0,0 +1,191 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#ifndef TARGET_STM32F1
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
// Release PB3/PB4 (E0 STP/DIR) from JTAG pins
#define DISABLE_JTAG
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
#define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
#undef E2END
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
//
// Servos
//
#define SERVO0_PIN PA1
//
// Limit Switches
//
#define X_STOP_PIN PC0
#define Y_STOP_PIN PC1
#define Z_STOP_PIN PC2
//
// Z Probe must be this pins
//
#define Z_MIN_PROBE_PIN PC14
//
// Filament Runout Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC15 // "E0-STOP"
#endif
//
// Steppers
//
#define X_ENABLE_PIN PB14
#define X_STEP_PIN PB13
#define X_DIR_PIN PB12
#define Y_ENABLE_PIN PB11
#define Y_STEP_PIN PB10
#define Y_DIR_PIN PB2
#define Z_ENABLE_PIN PB1
#define Z_STEP_PIN PB0
#define Z_DIR_PIN PC5
#define E0_ENABLE_PIN PD2
#define E0_STEP_PIN PB3
#define E0_DIR_PIN PB4
//
// Temperature Sensors
//
#define TEMP_0_PIN PA0 // Analog Input
#define TEMP_BED_PIN PC3 // Analog Input
//
// Heaters / Fans
//
#define HEATER_0_PIN PC8 // EXTRUDER
#define HEATER_BED_PIN PC9 // BED
#define FAN_PIN PA8
//
// USB connect control
//
#define USB_CONNECT_PIN PC13
#define USB_CONNECT_INVERTING false
#define SD_DETECT_PIN PC4
/**
* _____
* 5V | 1 2 | GND
* (LCD_EN) PB7 | 3 4 | PB8 (LCD_RS)
* (LCD_D4) PB9 | 5 6 PA10 (BTN_EN2)
* RESET | 7 8 | PA9 (BTN_EN1)
* (BTN_ENC) PB6 | 9 10| PB5 (BEEPER)
* -----
* EXP1
*/
#define EXPA1_03_PIN PB7
#define EXPA1_04_PIN PB8
#define EXPA1_05_PIN PB9
#define EXPA1_06_PIN PA10
#define EXPA1_07_PIN -1
#define EXPA1_08_PIN PA9
#define EXPA1_09_PIN PB6
#define EXPA1_10_PIN PB5
#if HAS_SPI_LCD
#if ENABLED(CR10_STOCKDISPLAY)
#define BEEPER_PIN EXPA1_10_PIN
#define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN
#define BTN_ENC EXPA1_09_PIN
#define LCD_PINS_RS EXPA1_04_PIN
#define LCD_PINS_ENABLE EXPA1_03_PIN
#define LCD_PINS_D4 EXPA1_05_PIN
#elif ENABLED(ZONESTAR_LCD) // ANET A8 LCD Controller - Must convert to 3.3V - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#error "CAUTION! ZONESTAR_LCD requires wiring modifications. See 'pins_BTT_SKR_MINI_E3.h' for details. Comment out this line to continue."
#define LCD_PINS_RS EXPA1_05_PIN
#define LCD_PINS_ENABLE EXPA1_09_PIN
#define LCD_PINS_D4 EXPA1_04_PIN
#define LCD_PINS_D5 EXPA1_06_PIN
#define LCD_PINS_D6 EXPA1_08_PIN
#define LCD_PINS_D7 EXPA1_10_PIN
#define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
/** Creality Ender-2 display pinout
* _____
* 5V | 1 2 | GND
* (MOSI) PB7 | 3 4 | PB8 (LCD_RS)
* (LCD_A0) PB9 | 5 6 PA10 (BTN_EN2)
* RESET | 7 8 | PA9 (BTN_EN1)
* (BTN_ENC) PB6 | 9 10| PB5 (SCK)
* -----
* EXP1
*/
#define BTN_EN1 EXPA1_08_PIN
#define BTN_EN2 EXPA1_06_PIN
#define BTN_ENC EXPA1_09_PIN
#define DOGLCD_CS EXPA1_04_PIN
#define DOGLCD_A0 EXPA1_05_PIN
#define DOGLCD_SCK EXPA1_10_PIN
#define DOGLCD_MOSI EXPA1_03_PIN
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#else
#error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BIGTREE_SKR_MINI_E3."
#endif
#endif // HAS_SPI_LCD
//
// SD Support
//
#define HAS_ONBOARD_SD
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#define ON_BOARD_SPI_DEVICE 1 // SPI1
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card

View File

@ -0,0 +1,37 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#include "pins_BTT_SKR_MINI_E3.h"
#define BOARD_INFO_NAME "BIGTREE SKR Mini E3"
/**
* TMC220x stepper drivers
* Hardware serial communication ports.
*/
#if HAS_TMC_UART
#define X_HARDWARE_SERIAL Serial4
#define Y_HARDWARE_SERIAL Serial4
#define Z_HARDWARE_SERIAL Serial4
#define E0_HARDWARE_SERIAL Serial4
#endif

View File

@ -0,0 +1,51 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#include "pins_BTT_SKR_MINI_E3.h"
#define BOARD_INFO_NAME "BIGTREE SKR Mini E3 V1.2"
#define NEOPIXEL_PIN PC7 // LED driving pin
/**
* TMC2208/TMC2209 stepper drivers
*/
#if HAS_TMC_UART
//
// Software serial
//
#define X_SERIAL_TX_PIN PB15
#define X_SERIAL_RX_PIN PB15
#define Y_SERIAL_TX_PIN PC6
#define Y_SERIAL_RX_PIN PC6
#define Z_SERIAL_TX_PIN PC10
#define Z_SERIAL_RX_PIN PC10
#define E0_SERIAL_TX_PIN PC11
#define E0_SERIAL_RX_PIN PC11
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif

View File

@ -0,0 +1,210 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#ifndef TARGET_STM32F1
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "BIGTREE SKR Mini 1.1"
//#define DISABLE_DEBUG
#define DISABLE_JTAG
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE (0x800) // 2KB
#define EEPROM_START_ADDRESS uint32(0x8000000 + (STM32_FLASH_SIZE) * 1024 - 2 * EEPROM_PAGE_SIZE)
#define E2END (EEPROM_PAGE_SIZE - 1)
//
// Limit Switches
//
#define X_MIN_PIN PC2
#define X_MAX_PIN PA2
#define Y_MIN_PIN PC1
#define Y_MAX_PIN PA1
#define Z_MIN_PIN PC0
#define Z_MAX_PIN PC3
//
// Steppers
//
#define X_STEP_PIN PC6
#define X_DIR_PIN PC7
#define X_ENABLE_PIN PB15
#define Y_STEP_PIN PB13
#define Y_DIR_PIN PB14
#define Y_ENABLE_PIN PB12
#define Z_STEP_PIN PB10
#define Z_DIR_PIN PB11
#define Z_ENABLE_PIN PB2
#define E0_STEP_PIN PC5
#define E0_DIR_PIN PB0
#define E0_ENABLE_PIN PC4
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PB3
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PB4
#endif
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PB5
#endif
#endif
//
// Heaters / Fans
//
#define HEATER_0_PIN PA8
#define FAN_PIN PC8
#define HEATER_BED_PIN PC9
//
// Temperature Sensors
//
#define TEMP_BED_PIN PB1 // Analog Input
#define TEMP_0_PIN PA0 // Analog Input
//
// LCD Pins
//
/**
* _____ _____
* NC | · · | GND 5V | · · | GND
* RESET | · · | PB9 (SD_DETECT) (LCD_D7) PC14 | · · | PC15 (LCD_D6)
* (MOSI) PB5 | · · | PB8 (BTN_EN2) (LCD_D5) PB7 | · · | PC13 (LCD_D4)
* (SD_SS) PA15 | · · | PD2 (BTN_EN1) (LCD_RS) PC12 | · · | PB6 (LCD_EN)
* (SCK) PB3 | · · | PB4 (MISO) (BTN_ENC) PC11 | · · | PC10 (BEEPER)
* ----- -----
* EXP2 EXP1
*/
#if HAS_SPI_LCD
#define BEEPER_PIN PC10
#define BTN_ENC PC11
#if ENABLED(CR10_STOCKDISPLAY)
#define LCD_PINS_RS PC15
#define BTN_EN1 PB6
#define BTN_EN2 PC13
#define LCD_PINS_ENABLE PC14
#define LCD_PINS_D4 PB7
#else
#define LCD_PINS_RS PC12
#define BTN_EN1 PD2
#define BTN_EN2 PB8
#define LCD_PINS_ENABLE PB6
#if ENABLED(FYSETC_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN PC13
#define DOGLCD_A0 PC12
#define DOGLCD_CS PB6
#define DOGLCD_SCK PB3
#define DOGLCD_MOSI PB5
#define FORCE_SOFT_SPI // SPI MODE3
#define LED_PIN PB7 // red pwm
//#define LED_PIN PC15 // green
//#define LED_PIN PC14 // blue
//#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
// #ifndef RGB_LED_R_PIN
// #define RGB_LED_R_PIN PB7
// #endif
// #ifndef RGB_LED_G_PIN
// #define RGB_LED_G_PIN PC15
// #endif
// #ifndef RGB_LED_B_PIN
// #define RGB_LED_B_PIN PC14
// #endif
//#elif ENABLED(FYSETC_MINI_12864_2_1)
// #define NEOPIXEL_PIN PB7
//#endif
#else // !FYSETC_MINI_12864
#define LCD_PINS_D4 PC13
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PB7
#define LCD_PINS_D6 PC15
#define LCD_PINS_D7 PC14
#endif
#endif // !FYSETC_MINI_12864
#endif
#endif // HAS_SPI_LCD
//
// SD Card
//
// By default the onboard SD is enabled.
// set SDCARD_CONNECTION form 'ONBOARD' to 'LCD' and use an external SD (connected to LCD)
#define HAS_ONBOARD_SD
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD)
#define ENABLE_SPI3
#define SD_DETECT_PIN PB9
#define SCK_PIN PB3
#define MISO_PIN PB4
#define MOSI_PIN PB5
#define SS_PIN PA15
#elif SD_CONNECTION_IS(ONBOARD)
#define ENABLE_SPI1
#define SD_DETECT_PIN PA3
#define SCK_PIN PA5
#define MISO_PIN PA6
#define MOSI_PIN PA7
#define SS_PIN PA4
#endif
#define ON_BOARD_SPI_DEVICE 1 //SPI1
#define ONBOARD_SD_CS_PIN PA4 // Chip select for "System" SD card
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif

View File

@ -0,0 +1,283 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#if !defined(__STM32F1__) && !defined(__STM32F4__)
#error "Oops! Select an STM32F1/4 board in 'Tools > Board.'"
#endif
/**
* 2017 Victor Perez Marlin for stm32f1 test
*/
#define BOARD_INFO_NAME "Chitu3D"
#define DEFAULT_MACHINE_NAME "STM32F103RET6"
// Enable I2C_EEPROM for testing
//#define I2C_EEPROM
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Steppers
//
#define X_STEP_PIN PE5
#define X_DIR_PIN PE6
#define X_ENABLE_PIN PC13
#define X_MIN_PIN PG10
#define X_MAX_PIN -1
#define Y_STEP_PIN PE2
#define Y_DIR_PIN PE3
#define Y_ENABLE_PIN PE4
#define Y_MIN_PIN PA12
#define Y_MAX_PIN
#define Z_STEP_PIN PB9
#define Z_DIR_PIN PE0
#define Z_ENABLE_PIN PE1
#define Z_MIN_PIN PA14
#define Z_MAX_PIN -1
#define Y2_STEP_PIN -1
#define Y2_DIR_PIN -1
#define Y2_ENABLE_PIN -1
#define Z2_STEP_PIN -1
#define Z2_DIR_PIN -1
#define Z2_ENABLE_PIN -1
#define E0_STEP_PIN PB4
#define E0_DIR_PIN PB5
#define E0_ENABLE_PIN PB8
#define E1_STEP_PIN -1
#define E1_DIR_PIN -1
#define E1_ENABLE_PIN -1
#define E2_STEP_PIN -1
#define E2_DIR_PIN -1
#define E2_ENABLE_PIN -1
//
// Misc. Functions
//
#define SDSS -1
#define LED_PIN -1
#define CASE_LIGHT_PIN 8
#define PS_ON_PIN -1
#define KILL_PIN PD6 // LED strip 24v
//
// Heaters / Fans
//
#define HEATER_0_PIN PD12 // HOT-END
#define HEATER_1_PIN -1
#define HEATER_2_PIN -1
#define HEATER_BED_PIN PG11 // HOT-BED
#define HEATER_BED2_PIN -1 // BED2
#define HEATER_BED3_PIN -1 // BED3
#ifndef FAN_PIN
#define FAN_PIN PG14 // MAIN BOARD FAN
#endif
#define FAN_SOFT_PWM
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA0 // Analog Input
#define TEMP_0_PIN PA1 // Analog Input
#define TEMP_1_PIN -1 // Analog Input
#define TEMP_2_PIN -1 // Analog Input
//
// LCD Pins
//
#if HAS_SPI_LCD
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#elif BOTH(NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#else
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if DISABLED(NEWPANEL)
#define BEEPER_PIN 33
// Buttons attached to a shift register
// Not wired yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#endif
#endif
#if ENABLED(NEWPANEL)
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 39
#endif
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SD_DETECT_PIN 42
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ANY(VIKI2, miniVIKI)
#define BEEPER_PIN 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 45
#define LCD_SCREEN_ROT_180
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define SDSS 53
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
#define KILL_PIN 31
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_BACKLIGHT_PIN 33
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define SDSS 53
#define KILL_PIN 64
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
// The encoder and click button
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
// not connected to a pin
#define SD_DETECT_PIN 49
#else
// Beeper on AUX-4
#define BEEPER_PIN 33
// Buttons directly attached to AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SHIFT_OUT 40
#define SHIFT_CLK 44
#define SHIFT_LD 42
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#else
//#define SD_DETECT_PIN -1 // Ramps doesn't use this
#endif
#endif
#endif // NEWPANEL
#endif // HAS_SPI_LCD

View File

@ -0,0 +1,189 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "FYSETC AIO II"
#define BOARD_WEBSITE_URL "fysetc.com"
#define DISABLE_JTAG
#define pins_v2_20190128 // geo-f:add for new pins define
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Flash EEPROM Emulation
//
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
#define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)
#undef E2END
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
//
// Limit Switches
//
#define X_STOP_PIN PA1
#define Y_STOP_PIN PA0
#define Z_STOP_PIN PB14
//
// Filament runout
//
#ifdef pins_v2_20190128
#define FIL_RUNOUT_PIN PB15
#else
#define FIL_RUNOUT_PIN PB5
#endif
//
// Steppers
//
#define X_STEP_PIN PB8
#define X_DIR_PIN PB9
#define X_ENABLE_PIN PA8
#define Y_STEP_PIN PB2
#ifdef pins_v2_20190128
#define Y_DIR_PIN PB3
#else
#define Y_DIR_PIN PB0
#endif
#define Y_ENABLE_PIN PB1
#define Z_STEP_PIN PC0
#define Z_DIR_PIN PC1
#define Z_ENABLE_PIN PC2
#define E0_STEP_PIN PC15
#define E0_DIR_PIN PC14
#define E0_ENABLE_PIN PC13
//
// Stepper current PWM
//
// X:PA2 Y:PA3 Z:PB12 E:PB13 // changed for test
//#define MOTOR_CURRENT_PWM_XY_PIN PA3
//#define MOTOR_CURRENT_PWM_Z_PIN PA2 // PB12
//#define MOTOR_CURRENT_PWM_XY_PIN PB6
//#define MOTOR_CURRENT_PWM_Z_PIN PB7 // PB12
//#define MOTOR_CURRENT_PWM_E_PIN -1 // PB13
// Motor current PWM conversion, PWM value = MotorCurrentSetting * 255 / range
#ifndef MOTOR_CURRENT_PWM_RANGE
#define MOTOR_CURRENT_PWM_RANGE 1500 // geo-f:old 2000
#endif
#define DEFAULT_PWM_MOTOR_CURRENT {500, 500, 400} // geo-f:old 1300 1300 1250
// 采用 SDIO PCB从左到右数
// 1:PC10 - SDIO_D2
// 2:PC11 - SDIO_D3
// 3:PD2 - SDIO_CMD
// 4:VCC
// 5:PC12 - SDIO_CK
// 6:VDD
// 7:PC8 - SDIO_D0
// 8:PC9 - SDIO_D1
// 9:PA15 - SD_DETECT_PIN
//
// Heaters / Fans
//
#define HEATER_0_PIN PC7
#define HEATER_BED_PIN PC6
#ifndef FAN_PIN
#define FAN_PIN PC8
#endif
//
// Temperature Sensors
//
#define TEMP_BED_PIN PC5 // Analog Input
#define TEMP_0_PIN PC4 // Analog Input
//
// Misc. Functions
//
#define SDSS PA4
//
// LCD Pins
//
#if HAS_SPI_LCD
#define BEEPER_PIN PC9
#if HAS_GRAPHICAL_LCD
#define DOGLCD_A0 PA15
#ifdef pins_v2_20190128
#define DOGLCD_CS PB5
#else
#define DOGLCD_CS PB7
#endif
//#define LCD_CONTRAST_INIT 190
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#endif
// not connected to a pin
#define SD_DETECT_PIN PC3
#if ENABLED(NEWPANEL)
// The encoder and click button
#define BTN_EN1 PC10
#define BTN_EN2 PC11
#define BTN_ENC PC12
#endif
#ifdef pins_v2_20190128
#define LCD_RESET_PIN PB4
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PB0
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PB6
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PB7
#endif
#else
#define LCD_RESET_PIN PB6
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PB3
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PB4
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PB5
#endif
#endif
#endif

View File

@ -0,0 +1,151 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define DEFAULT_MACHINE_NAME "3D Printer"
#define BOARD_INFO_NAME "FYSETC Cheetah"
#define BOARD_WEBSITE_URL "fysetc.com"
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
#define DISABLE_JTAG
#define FLASH_EEPROM_EMULATION
#define EEPROM_PAGE_SIZE uint16(0x800) // 2KB
#define EEPROM_START_ADDRESS uint32(0x8000000 + 256 * 1024 - 2 * EEPROM_PAGE_SIZE)
#undef E2END
#define E2END (EEPROM_PAGE_SIZE - 1) // 2KB
//
// Servos
//
#define SERVO0_PIN PA0
//
// Limit Switches
//
#define X_STOP_PIN PA1
#define Y_STOP_PIN PB4
#define Z_STOP_PIN PA15
//
// Filament runout
//
#define FIL_RUNOUT_PIN PB5
//
// Steppers
//
#define X_STEP_PIN PB8
#define X_DIR_PIN PB9
#define X_ENABLE_PIN PA8
#define Y_STEP_PIN PB2
#define Y_DIR_PIN PB3
#define Y_ENABLE_PIN PB1
#define Z_STEP_PIN PC0
#define Z_DIR_PIN PC1
#define Z_ENABLE_PIN PC2
#define E0_STEP_PIN PC15
#define E0_DIR_PIN PC14
#define E0_ENABLE_PIN PC13
#define X_HARDWARE_SERIAL MSerial2
#define Y_HARDWARE_SERIAL MSerial2
#define Z_HARDWARE_SERIAL MSerial2
#define E0_HARDWARE_SERIAL MSerial2
//
// Heaters / Fans
//
#define HEATER_0_PIN PC6
#define HEATER_BED_PIN PC7
#ifndef FAN_PIN
#define FAN_PIN PC8
#endif
//
// Temperature Sensors
//
#define TEMP_BED_PIN PC5 // Analog Input
#define TEMP_0_PIN PC4 // Analog Input
//
// Misc. Functions
//
#define SDSS PA4
//
// LCD Pins
//
#if HAS_SPI_LCD
#define BEEPER_PIN PC9
#if HAS_GRAPHICAL_LCD
#define DOGLCD_A0 PB14
#define DOGLCD_CS PB12
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
#if EITHER(FYSETC_MINI_12864, U8GLIB_ST7920)
#define FORCE_SOFT_SPI
#endif
#endif
#define LCD_PINS_RS PB12 // CS -- SOFT SPI for ENDER3 LCD
#define LCD_PINS_D4 PB13 // SCLK
#define LCD_PINS_ENABLE PB15 // DATA MOSI
// not connected to a pin
#define SD_DETECT_PIN PC3
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN PB0
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN PB7
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN PB6
#endif
//#define LCD_CONTRAST_INIT 190
#if ENABLED(NEWPANEL)
#define BTN_EN1 PC11
#define BTN_EN2 PC10
#define BTN_ENC PC12
#endif
#endif

View File

@ -0,0 +1,64 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#include "pins_FYSETC_CHEETAH.h"
#undef X_HARDWARE_SERIAL
#undef Y_HARDWARE_SERIAL
#undef Z_HARDWARE_SERIAL
#undef E0_HARDWARE_SERIAL
#undef RGB_LED_R_PIN
#undef RGB_LED_G_PIN
#undef RGB_LED_B_PIN
#define FAN1_PIN PB0 // Fan1
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*/
//
// Software serial
//
#define X_SERIAL_TX_PIN PA11
#define X_SERIAL_RX_PIN PA12
#define Y_SERIAL_TX_PIN PB6
#define Y_SERIAL_RX_PIN PB7
#define Z_SERIAL_TX_PIN PB10
#define Z_SERIAL_RX_PIN PB11
#define E0_SERIAL_TX_PIN PA2
#define E0_SERIAL_RX_PIN PA3
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif

View File

@ -0,0 +1,230 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* 24 May 2018 - @chepo for STM32F103VET6
* Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "GTM32 Pro VB"
#define DEFAULT_MACHINE_NAME "STM32F103VET6"
//#define DISABLE_DEBUG
//
// It is required to disable JTAG function because its pins are
// used as GPIO to drive the Y axis stepper.
// DO NOT ENABLE!
//
#define DISABLE_JTAG
//
// If you don't need the SWDIO functionality (any more), you may
// disable SWD here to regain PA13/PA14 pins for other use.
//
//#define DISABLE_JTAGSWD
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
// Enable EEPROM Emulation for this board as it doesn't have EEPROM
#define FLASH_EEPROM_EMULATION
#define E2END 0xFFF // 4KB
//
// Limit Switches
//
#define X_MIN_PIN PE5 // ENDSTOPS 15,17
#define X_MAX_PIN PE4 // ENDSTOPS 16,18
#define Y_MIN_PIN PE3 // ENDSTOPS 9,11
#define Y_MAX_PIN PE2 // ENDSTOPS 10,12
#define Z_MIN_PIN PE1 // ENDSTOPS 3,5
#define Z_MAX_PIN PE0 // ENDSTOPS 4,6
//
// Steppers
//
#define X_STEP_PIN PC6
#define X_DIR_PIN PD13
#define X_ENABLE_PIN PA8
#define Y_STEP_PIN PA12
#define Y_DIR_PIN PA11
#define Y_ENABLE_PIN PA15
#define Z_STEP_PIN PD6
#define Z_DIR_PIN PD3
#define Z_ENABLE_PIN PB3
// Extruder stepper pins
// NOTE: Numbering here is made according to EXT connector numbers,
// the FANx_PWM line numbering in the schematics is reverse.
// That is, E0_*_PIN are the E2_* lines connected to E2_A1 step
// stick that drives the EXT0 output on the board.
//
#define E0_STEP_PIN PC14
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PC15
#define E1_STEP_PIN PA0
#define E1_DIR_PIN PB6
#define E1_ENABLE_PIN PA1
#define E2_STEP_PIN PB2
#define E2_DIR_PIN PB11
#define E2_ENABLE_PIN PC4
//
// Heaters / Fans
//
#define HEATER_0_PIN PB0 // EXT0 port
#define HEATER_1_PIN PB5 // EXT1 port
#define HEATER_2_PIN PB4 // EXT2 port
#define HEATER_BED_PIN PB1 // CON2X3 hotbed port
//
// These are FAN PWM pins on EXT0..EXT2 connectors.
//
//#define FAN_PIN PB9 // EXT0 port
#define ORIG_E0_AUTO_FAN_PIN PB9 // EXT0 port, used as main extruder fan
#define FAN1_PIN PB8 // EXT1 port
#define FAN2_PIN PB7 // EXT2 port
//
// Temperature Sensors
//
#define TEMP_0_PIN PC2 // EXT0 port
#define TEMP_1_PIN PC1 // EXT1 port
#define TEMP_2_PIN PC0 // EXT2 port
#define TEMP_BED_PIN PC3 // CON2X3 hotbed port
//
// Misc. Functions
//
#define LED_PWM PD12 // External LED, pin 2 on LED labeled connector
//
// LCD / Controller
//
#if HAS_SPI_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
//
// LCD display on J2 FFC40
// Geeetech's LCD2004A Control Panel is very much like
// RepRapDiscount Smart Controller, but adds an FFC40 connector
//
#define LCD_PINS_RS PE6 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE PE14 // SID (MOSI)
#define LCD_PINS_D4 PD8 // SCK (CLK) clock
#define LCD_PINS_D5 PD9
#define LCD_PINS_D6 PD10
#define LCD_PINS_D7 PE15
#else
//
// Serial LCDs can be implemented in ExtUI
//
//#define LCD_UART_TX PD8
//#define LCD_UART_RX PD9
#endif
#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)
#endif
#endif // HAS_SPI_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
//
// Geeetech's LCD2004A Control Panel is very much like
// RepRapDiscount Smart Controller, but adds an FFC40 connector
// connected with a flat wire to J2 connector on the board.
//
#define BTN_EN1 PE8
#define BTN_EN2 PE9
#define BTN_ENC PE13
#define GTM32_PRO_VB_USE_LCD_BEEPER
#define GTM32_PRO_VB_USE_EXT_SDCARD
#endif
//
// Beeper
//
#ifdef GTM32_PRO_VB_USE_LCD_BEEPER
// This is pin 32 on J2 FFC40 and pin, goes to the beeper
// on Geeetech's version of RepRapDiscount Smart Controller
// (e.g. on Rostock 301)
#define BEEPER_PIN PE12
#else
// This is the beeper on the board itself
#define BEEPER_PIN PB10
#endif
/**
* The on-board TF_CARD_SOCKET microSD card socket has no SD Detect pin wired.
*
* The FFC10 (SD_CARD) connector has the same pins as those routed to the FFC40 (J2)
* connector, which usually go to the SD Card slot on the Geeetech version of the
* RepRapDiscount Smart Controller. Both connectors have the card detect signal.
*
* The on-board SD card and the external card (on either SD_CARD or J2) are two
* separate devices and can work simultaneously. Unfortunately, Marlin only supports
* a single SPI Flash device (as of 2019-07-05) so only one is enabled here.
*/
#if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
//
// SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
//
#define SS_PIN PC11
#define SCK_PIN PC12
#define MOSI_PIN PD2
#define MISO_PIN PC8
#define SD_DETECT_PIN PC7
#else
//
// Use the on-board card socket labeled TF_CARD_SOCKET
//
#define SS_PIN PA4
#define SCK_PIN PA5
#define MOSI_PIN PA7
#define MISO_PIN PA6
#define SD_DETECT_PIN -1 // Card detect is not connected
#endif
#define SDSS SS_PIN
//
// ESP WiFi can be soldered to J9 connector which is wired to USART2.
// Must define WIFISUPPORT in Configuration.h for the printer.
//
#define ESP_WIFI_MODULE_COM 2
#define ESP_WIFI_MODULE_BAUDRATE 115200
#define ESP_WIFI_MODULE_RESET_PIN -1

View File

@ -0,0 +1,230 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* 24 May 2018 - @chepo for STM32F103VET6
* Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "GTM32 Pro VB"
#define DEFAULT_MACHINE_NAME "STM32F103VET6"
//#define DISABLE_DEBUG
//
// It is required to disable JTAG function because its pins are
// used as GPIO to drive the Y axis stepper.
// DO NOT ENABLE!
//
#define DISABLE_JTAG
//
// If you don't need the SWDIO functionality (any more), you may
// disable SWD here to regain PA13/PA14 pins for other use.
//
//#define DISABLE_JTAGSWD
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
// Enable EEPROM Emulation for this board as it doesn't have EEPROM
#define FLASH_EEPROM_EMULATION
#define E2END 0xFFF // 4KB
//
// Limit Switches
//
#define X_MIN_PIN PE5 // ENDSTOPS 15,17
#define X_MAX_PIN PE4 // ENDSTOPS 16,18
#define Y_MIN_PIN PE3 // ENDSTOPS 9,11
#define Y_MAX_PIN PE2 // ENDSTOPS 10,12
#define Z_MIN_PIN PE0 // ENDSTOPS 3,5
#define Z_MAX_PIN PE1 // ENDSTOPS 4,6
//
// Steppers
//
#define X_STEP_PIN PC6
#define X_DIR_PIN PD13
#define X_ENABLE_PIN PA8
#define Y_STEP_PIN PA12
#define Y_DIR_PIN PA11
#define Y_ENABLE_PIN PA15
#define Z_STEP_PIN PD6
#define Z_DIR_PIN PD3
#define Z_ENABLE_PIN PB3
// Extruder stepper pins
// NOTE: Numbering here is made according to EXT connector numbers,
// the FANx_PWM line numbering in the schematics is reverse.
// That is, E0_*_PIN are the E2_* lines connected to E2_A1 step
// stick that drives the EXT0 output on the board.
//
#define E0_STEP_PIN PC14
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PC15
#define E1_STEP_PIN PA0
#define E1_DIR_PIN PB6
#define E1_ENABLE_PIN PA1
#define E2_STEP_PIN PB2
#define E2_DIR_PIN PB11
#define E2_ENABLE_PIN PC4
//
// Heaters / Fans
//
#define HEATER_0_PIN PB0 // EXT0 port
#define HEATER_1_PIN PB5 // EXT1 port
#define HEATER_2_PIN PB4 // EXT2 port
#define HEATER_BED_PIN PB1 // CON2X3 hotbed port
//
// These are FAN PWM pins on EXT0..EXT2 connectors.
//
//#define FAN_PIN PB9 // EXT0 port
#define ORIG_E0_AUTO_FAN_PIN PB9 // EXT0 port, used as main extruder fan
#define FAN1_PIN PB8 // EXT1 port
#define FAN2_PIN PB7 // EXT2 port
//
// Temperature Sensors
//
#define TEMP_0_PIN PC2 // EXT0 port
#define TEMP_1_PIN PC1 // EXT1 port
#define TEMP_2_PIN PC0 // EXT2 port
#define TEMP_BED_PIN PC3 // CON2X3 hotbed port
//
// Misc. Functions
//
#define LED_PWM PD12 // External LED, pin 2 on LED labeled connector
//
// LCD / Controller
//
#if HAS_SPI_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
//
// LCD display on J2 FFC40
// Geeetech's LCD2004A Control Panel is very much like
// RepRapDiscount Smart Controller, but adds an FFC40 connector
// connected with a flat wire to J2 connector on the board.
//
#define LCD_PINS_RS PE6 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE PE14 // SID (MOSI)
#define LCD_PINS_D4 PD8 // SCK (CLK) clock
#define LCD_PINS_D5 PD9
#define LCD_PINS_D6 PD10
#define LCD_PINS_D7 PE15
#define BTN_EN1 PE8
#define BTN_EN2 PE9
#define BTN_ENC PE13
#define GTM32_PRO_VB_USE_LCD_BEEPER
#define GTM32_PRO_VB_USE_EXT_SDCARD
#else
//
// Serial LCDs can be implemented in ExtUI
//
//#define LCD_UART_TX PD8
//#define LCD_UART_RX PD9
#endif
#if HAS_GRAPHICAL_LCD
#ifndef BOARD_ST7920_DELAY_1
#define BOARD_ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef BOARD_ST7920_DELAY_2
#define BOARD_ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef BOARD_ST7920_DELAY_3
#define BOARD_ST7920_DELAY_3 DELAY_NS(715)
#endif
#endif
#endif // HAS_SPI_LCD
//
// Beeper
//
#ifdef GTM32_PRO_VB_USE_LCD_BEEPER
// This is pin 32 on J2 FFC40 and pin, goes to the beeper
// on Geeetech's version of RepRapDiscount Smart Controller
// (e.g. on Rostock 301)
#define BEEPER_PIN PE12
#else
// This is the beeper on the board itself
#define BEEPER_PIN PB10
#endif
/**
* The on-board TF_CARD_SOCKET microSD card socket has no SD Detect pin wired.
*
* The FFC10 (SD_CARD) connector has the same pins as those routed to the FFC40 (J2)
* connector, which usually go to the SD Card slot on the Geeetech version of the
* RepRapDiscount Smart Controller. Both connectors have the card detect signal.
*
* The on-board SD card and the external card (on either SD_CARD or J2) are two
* separate devices and can work simultaneously. Unfortunately, Marlin only supports
* a single SPI Flash device (as of 2019-07-05) so only one is enabled here.
*/
#if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
//
// SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
//
#define SS_PIN PC11
#define SCK_PIN PC12
#define MOSI_PIN PD2
#define MISO_PIN PC8
#define SD_DETECT_PIN PC7
#else
//
// Use the on-board card socket labeled TF_CARD_SOCKET
//
#define SS_PIN PA4
#define SCK_PIN PA5
#define MOSI_PIN PA7
#define MISO_PIN PA6
#define SD_DETECT_PIN -1 // Card detect is not connected
#endif
#define SDSS SS_PIN
//
// ESP WiFi can be soldered to J9 connector which is wired to USART2.
// Must define WIFISUPPORT in Configuration.h for the printer.
//
#define ESP_WIFI_MODULE_COM 2
#define ESP_WIFI_MODULE_BAUDRATE 115200
#define ESP_WIFI_MODULE_RESET_PIN -1

View File

@ -0,0 +1,230 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* 24 May 2018 - @chepo for STM32F103VET6
* Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "GTM32 Pro VB"
#define DEFAULT_MACHINE_NAME "STM32F103VET6"
//#define DISABLE_DEBUG
//
// It is required to disable JTAG function because its pins are
// used as GPIO to drive the Y axis stepper.
// DO NOT ENABLE!
//
#define DISABLE_JTAG
//
// If you don't need the SWDIO functionality (any more), you may
// disable SWD here to regain PA13/PA14 pins for other use.
//
//#define DISABLE_JTAGSWD
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
// Enable EEPROM Emulation for this board as it doesn't have EEPROM
#define FLASH_EEPROM_EMULATION
#define E2END 0xFFF // 4KB
//
// Limit Switches
//
#define X_MIN_PIN PE5 // ENDSTOPS 15,17
#define X_MAX_PIN PE4 // ENDSTOPS 16,18
#define Y_MIN_PIN PE3 // ENDSTOPS 9,11
#define Y_MAX_PIN PE2 // ENDSTOPS 10,12
#define Z_MIN_PIN PE1 // ENDSTOPS 3,5
#define Z_MAX_PIN PE0 // ENDSTOPS 4,6
//
// Steppers
//
#define X_STEP_PIN PC6
#define X_DIR_PIN PD13
#define X_ENABLE_PIN PA8
#define Y_STEP_PIN PA12
#define Y_DIR_PIN PA11
#define Y_ENABLE_PIN PA15
#define Z_STEP_PIN PD6
#define Z_DIR_PIN PD3
#define Z_ENABLE_PIN PB3
// Extruder stepper pins
// NOTE: Numbering here is made according to EXT connector numbers,
// the FANx_PWM line numbering in the schematics is reverse.
// That is, E0_*_PIN are the E2_* lines connected to E2_A1 step
// stick that drives the EXT0 output on the board.
//
#define E0_STEP_PIN PC14
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PC15
#define E1_STEP_PIN PA0
#define E1_DIR_PIN PB6
#define E1_ENABLE_PIN PA1
#define E2_STEP_PIN PB2
#define E2_DIR_PIN PB11
#define E2_ENABLE_PIN PC4
//
// Heaters / Fans
//
#define HEATER_0_PIN PB0 // EXT0 port
#define HEATER_1_PIN PB5 // EXT1 port
#define HEATER_2_PIN PB4 // EXT2 port
#define HEATER_BED_PIN PB1 // CON2X3 hotbed port
//
// These are FAN PWM pins on EXT0..EXT2 connectors.
//
//#define FAN_PIN PB9 // EXT0 port
#define ORIG_E0_AUTO_FAN_PIN PB9 // EXT0 port, used as main extruder fan
#define FAN1_PIN PB8 // EXT1 port
#define FAN2_PIN PB7 // EXT2 port
//
// Temperature Sensors
//
#define TEMP_0_PIN PC2 // EXT0 port
#define TEMP_1_PIN PC1 // EXT1 port
#define TEMP_2_PIN PC0 // EXT2 port
#define TEMP_BED_PIN PC3 // CON2X3 hotbed port
//
// Misc. Functions
//
#define LED_PWM PD12 // External LED, pin 2 on LED labeled connector
//
// LCD / Controller
//
#if HAS_SPI_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
//
// LCD display on J2 FFC40
// Geeetech's LCD2004A Control Panel is very much like
// RepRapDiscount Smart Controller, but adds an FFC40 connector
//
#define LCD_PINS_RS PE6 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE PE14 // SID (MOSI)
#define LCD_PINS_D4 PD8 // SCK (CLK) clock
#define LCD_PINS_D5 PD9
#define LCD_PINS_D6 PD10
#define LCD_PINS_D7 PE15
#else
//
// Serial LCDs can be implemented in ExtUI
//
//#define LCD_UART_TX PD8
//#define LCD_UART_RX PD9
#endif
#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)
#endif
#endif // HAS_SPI_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
//
// Geeetech's LCD2004A Control Panel is very much like
// RepRapDiscount Smart Controller, but adds an FFC40 connector
// connected with a flat wire to J2 connector on the board.
//
#define BTN_EN1 PE8
#define BTN_EN2 PE9
#define BTN_ENC PE13
#define GTM32_PRO_VB_USE_LCD_BEEPER
#define GTM32_PRO_VB_USE_EXT_SDCARD
#endif
//
// Beeper
//
#ifdef GTM32_PRO_VB_USE_LCD_BEEPER
// This is pin 32 on J2 FFC40 and pin, goes to the beeper
// on Geeetech's version of RepRapDiscount Smart Controller
// (e.g. on Rostock 301)
#define BEEPER_PIN PE12
#else
// This is the beeper on the board itself
#define BEEPER_PIN PB10
#endif
/**
* The on-board TF_CARD_SOCKET microSD card socket has no SD Detect pin wired.
*
* The FFC10 (SD_CARD) connector has the same pins as those routed to the FFC40 (J2)
* connector, which usually go to the SD Card slot on the Geeetech version of the
* RepRapDiscount Smart Controller. Both connectors have the card detect signal.
*
* The on-board SD card and the external card (on either SD_CARD or J2) are two
* separate devices and can work simultaneously. Unfortunately, Marlin only supports
* a single SPI Flash device (as of 2019-07-05) so only one is enabled here.
*/
#if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
//
// SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
//
#define SS_PIN PC11
#define SCK_PIN PC12
#define MOSI_PIN PD2
#define MISO_PIN PC8
#define SD_DETECT_PIN PC7
#else
//
// Use the on-board card socket labeled TF_CARD_SOCKET
//
#define SS_PIN PA4
#define SCK_PIN PA5
#define MOSI_PIN PA7
#define MISO_PIN PA6
#define SD_DETECT_PIN -1 // Card detect is not connected
#endif
#define SDSS SS_PIN
//
// ESP WiFi can be soldered to J9 connector which is wired to USART2.
// Must define WIFISUPPORT in Configuration.h for the printer.
//
#define ESP_WIFI_MODULE_COM 2
#define ESP_WIFI_MODULE_BAUDRATE 115200
#define ESP_WIFI_MODULE_RESET_PIN -1

View File

@ -0,0 +1,232 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* 24 May 2018 - @chepo for STM32F103VET6
* Schematic: https://github.com/chepo92/Smartto/blob/master/circuit_diagram/Rostock301/Hardware_GTM32_PRO_VB.pdf
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define BOARD_NAME "GTM32 Pro VB"
#define DEFAULT_MACHINE_NAME "M201"
//#define DISABLE_DEBUG
//
// It is required to disable JTAG function because its pins are
// used as GPIO to drive the Y axis stepper.
// DO NOT ENABLE!
//
#define DISABLE_JTAG
//
// If you don't need the SWDIO functionality (any more), you may
// disable SWD here to regain PA13/PA14 pins for other use.
//
//#define DISABLE_JTAGSWD
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
// Enable EEPROM Emulation for this board as it doesn't have EEPROM
#define FLASH_EEPROM_EMULATION
#define E2END 0xFFF // 4KB
//
// Limit Switches
//
#define X_MIN_PIN PE5 // ENDSTOPS 15,17
#define X_MAX_PIN PE4 // ENDSTOPS 16,18
#define Y_MIN_PIN PE3 // ENDSTOPS 9,11
#define Y_MAX_PIN PE2 // ENDSTOPS 10,12
#define Z_MIN_PIN PE1 // ENDSTOPS 3,5
#define Z_MAX_PIN PE0 // ENDSTOPS 4,6
//
// Steppers
//
#define X_STEP_PIN PC6
#define X_DIR_PIN PD13
#define X_ENABLE_PIN PA8
#define Y_STEP_PIN PA12
#define Y_DIR_PIN PA11
#define Y_ENABLE_PIN PA15
#define Z_STEP_PIN PD6
#define Z_DIR_PIN PD3
#define Z_ENABLE_PIN PB3
// Extruder stepper pins
// NOTE: Numbering here is made according to EXT connector numbers,
// the FANx_PWM line numbering in the schematics is reverse.
// That is, E0_*_PIN are the E2_* lines connected to E2_A1 step
// stick that drives the EXT0 output on the board.
//
#define E0_STEP_PIN PC14
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PC15
#define E1_STEP_PIN PA0
#define E1_DIR_PIN PB6
#define E1_ENABLE_PIN PA1
#define E2_STEP_PIN PB2
#define E2_DIR_PIN PB11
#define E2_ENABLE_PIN PC4
//
// Heaters / Fans - INFO: Extruders ports are in reverse order. Pin numbers here differ from schematic. Original firmware assumes heater, fan and temp sensor on port EXT0 PB0, PB9, PC2.
//
#define HEATER_0_PIN PB0 // EXT0 port.
#define HEATER_1_PIN PB5 // EXT1 port
#define HEATER_2_PIN PB4 // EXT2 port
#define HEATER_BED_PIN PB1 // CON2X3 hotbed port
//
// These are FAN PWM pins on EXT0..EXT2 connectors.
//
//#define FAN_PIN PB9 // EXT0 port
#define FAN1_PIN PB8 // EXT1 port
#define FAN2_PIN PB7 // EXT2 port
#define ORIG_E0_AUTO_FAN_PIN PB9 // EXT0 port, used as main extruder fan
//
// Temperature Sensors
//
#define TEMP_0_PIN PC2 // EXT0 port
#define TEMP_1_PIN PC1 // EXT1 port
#define TEMP_2_PIN PC0 // EXT2 port
#define TEMP_BED_PIN PC3 // CON2X3 hotbed port
//
// Misc. Functions
//
#define LED_PWM PD12 // External LED, pin 2 on LED labeled connector
//
// LCD / Controller
//
#if HAS_SPI_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
//
// LCD display on J2 FFC40
// Geeetech's LCD2004A Control Panel is very much like
// RepRapDiscount Smart Controller, but adds an FFC40 connector
// connected with a flat wire to J2 connector on the board.
//
#define LCD_PINS_RS PE6 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE PE14 // SID (MOSI)
#define LCD_PINS_D4 PD8 // SCK (CLK) clock
#define LCD_PINS_D5 PD9
#define LCD_PINS_D6 PD10
#define LCD_PINS_D7 PE15
#define BTN_EN1 PE8
#define BTN_EN2 PE9
#define BTN_ENC PE13
//#define GTM32_PRO_VB_USE_LCD_BEEPER
#define GTM32_PRO_VB_USE_EXT_SDCARD
#else
//
// Serial LCDs can be implemented in ExtUI
//
//#define LCD_UART_TX PD8
//#define LCD_UART_RX PD9
#endif
#if HAS_GRAPHICAL_LCD
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(96)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(48)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(715)
#endif
#endif
#endif // HAS_SPI_LCD
//
// Beeper
//
#ifdef GTM32_PRO_VB_USE_LCD_BEEPER
// This is pin 32 on J2 FFC40 and pin, goes to the beeper
// on Geeetech's version of RepRapDiscount Smart Controller
// (e.g. on Rostock 301)
#define BEEPER_PIN PE12
#else
// This is the beeper on the board itself
#define BEEPER_PIN PB10
#endif
/**
* The on-board TF_CARD_SOCKET microSD card socket has no SD Detect pin wired.
*
* The FFC10 (SD_CARD) connector has the same pins as those routed to the FFC40 (J2)
* connector, which usually go to the SD Card slot on the Geeetech version of the
* RepRapDiscount Smart Controller. Both connectors have the card detect signal.
*
* The on-board SD card and the external card (on either SD_CARD or J2) are two
* separate devices and can work simultaneously. Unfortunately, Marlin only supports
* a single SPI Flash device (as of 2019-07-05) so only one is enabled here.
*/
#if ENABLED(GTM32_PRO_VB_USE_EXT_SDCARD)
//
// SD Card on RepRapDiscount Smart Controller (J2) or on SD_CARD connector
//
#define SS_PIN PB12 // PC11
#define SCK_PIN PB13 // PC12 // PC1
#define MOSI_PIN PB15 // PD2 // PD2
#define MISO_PIN PB14 // PC8
#define SD_DETECT_PIN PC7
#else
//
// Use the on-board card socket labeled TF_CARD_SOCKET
//
#define SS_PIN PA4
#define SCK_PIN PA5
#define MOSI_PIN PA7
#define MISO_PIN PA6 // PA6
#define SD_DETECT_PIN -1 // Card detect is not connected
#endif
#define SDSS SS_PIN
//
// ESP WiFi can be soldered to J9 connector which is wired to USART2.
// Must define WIFISUPPORT in Configuration.h for the printer.
//
#define ESP_WIFI_MODULE_COM 2
#define ESP_WIFI_MODULE_BAUDRATE 115200
#define ESP_WIFI_MODULE_RESET_PIN -1

View File

@ -0,0 +1,130 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* ╦╔═╗╔═╗┬ ┬┬─┐┌─┐┬─┐┌─┐╔═╗┌─┐┬─┐┬ ┬┌┬┐ ┌─┐┌─┐┌┬┐
* ║║ ╦╠═╣│ │├┬┘│ │├┬┘├─┤╠╣ │ │├┬┘│ ││││ │ │ ││││
* ╚╝╚═╝╩ ╩└─┘┴└─└─┘┴└─┴ ┴╚ └─┘┴└─└─┘┴ ┴o└─┘└─┘┴ ┴
* Pin assignments for 32-bit JGAurora A5S & A1
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 1 || E_STEPPERS > 1
#error "JGAurora 32-bit board only supports 1 hotend / E-stepper. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "JGAurora A5S A1 board"
#ifndef STM32_XL_DENSITY
#define STM32_XL_DENSITY
#endif
// #define MCU_STM32F103ZE // not yet required
// Enable EEPROM Emulation for this board, so that we don't overwrite factory data
//#define I2C_EEPROM // AT24C64
//#define E2END 0x7FFF // 64KB
//#define FLASH_EEPROM_EMULATION
//#define E2END 0xFFF // 4KB
//#define E2END uint32(EEPROM_START_ADDRESS + (EEPROM_PAGE_SIZE * 2) - 1)
//#define EEPROM_CHITCHAT
//#define DEBUG_EEPROM_READWRITE
//
// Limit Switches
//
#define X_STOP_PIN PC6
#define Y_STOP_PIN PG8
#define Z_STOP_PIN PG7
//#define X_MAX_PIN PC5
//#define Y_MAX_PIN PC4
//#define Z_MAX_PIN PB0
//
// Steppers
//
#define X_STEP_PIN PD6
#define X_DIR_PIN PD3
#define X_ENABLE_PIN PG9
#define Y_STEP_PIN PG12
#define Y_DIR_PIN PG11
#define Y_ENABLE_PIN PG13
#define Z_STEP_PIN PG15
#define Z_DIR_PIN PG14
#define Z_ENABLE_PIN PB8
#define E0_STEP_PIN PE2
#define E0_DIR_PIN PB9
#define E0_ENABLE_PIN PE3
#define E1_STEP_PIN PE5
#define E1_DIR_PIN PE4
#define E1_ENABLE_PIN PE6
//
// Temperature Sensors
//
#define TEMP_0_PIN PC2
#define TEMP_BED_PIN PC1
//
// Heaters / Fans
//
#define HEATER_0_PIN PA2
#define HEATER_BED_PIN PA3
#define FAN_PIN PA1
#define FIL_RUNOUT_PIN PC7
//
// LCD
//
#define LCD_BACKLIGHT_PIN PF11
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PG0
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
//
// SD Card
//
#define SD_DETECT_PIN PF10
//
// Misc.
//
#define BEEPER_PIN PC3 // use PB7 to shut up if desired
#define LED_PIN PC13
//
// Touch support
//
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PA4
#define TOUCH_INT_PIN PC4
#endif

View File

@ -0,0 +1,170 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* 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/>.
*
*/
#pragma once
/**
* Longer3D LK1/LK2 & Alfawise U20/U30 (STM32F103VET6) board pin assignments
*/
#if !defined(__STM32F1__) && !defined(STM32F1xx)
#error "Oops! Select a STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 1 || E_STEPPERS > 1
#error "Longer3D board only supports 1 hotend / E-stepper. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "Longer3D"
#define ALFAWISE_UX0 // Common to all Longer3D STM32F1 boards (used for Open drain mosfets)
//#define DISABLE_DEBUG // We still want to debug with STLINK...
#define DISABLE_JTAG // We free the jtag pins (PA15) but keep STLINK
// Release PB4 (STEP_X_PIN) from JTAG NRST role.
//
// Limit Switches
//
#define X_MIN_PIN PC1 // pin 16
#define X_MAX_PIN PC0 // pin 15 (Filament sensor on Alfawise setup)
#define Y_MIN_PIN PC15 // pin 9
#define Y_MAX_PIN PC14 // pin 8 (Unused in stock Alfawise setup)
#define Z_MIN_PIN PE6 // pin 5 Standard Endstop or Z_Probe endstop function
#define Z_MAX_PIN PE5 // pin 4 (Unused in stock Alfawise setup)
// May be used for BLTouch Servo function on older variants (<= V08)
#define ONBOARD_ENDSTOPPULLUPS
//
// Filament Sensor
//
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PC0 // XMAX plug on PCB used as filament runout sensor on Alfawise boards (inverting true)
#endif
//
// Steppers
//
#define X_ENABLE_PIN PB5 // pin 91
#define X_STEP_PIN PB4 // pin 90
#define X_DIR_PIN PB3 // pin 89
#define Y_ENABLE_PIN PB8 // pin 95
#define Y_STEP_PIN PB7 // pin 93
#define Y_DIR_PIN PB6 // pin 92
#define Z_ENABLE_PIN PE1 // pin 98
#define Z_STEP_PIN PE0 // pin 97
#define Z_DIR_PIN PB9 // pin 96
#define E0_ENABLE_PIN PE4 // pin 3
#define E0_STEP_PIN PE3 // pin 2
#define E0_DIR_PIN PE2 // pin 1
//
// Temperature Sensors
//
#define TEMP_0_PIN PA0 // pin 23 (Nozzle 100K/3950 thermistor)
#define TEMP_BED_PIN PA1 // pin 24 (Hot Bed 100K/3950 thermistor)
//
// Heaters / Fans
//
#define HEATER_0_PIN PD3 // pin 84 (Nozzle Heat Mosfet)
#define HEATER_BED_PIN PA8 // pin 67 (Hot Bed Mosfet)
#define FAN_PIN PA15 // pin 77 (4cm Fan)
#define FAN_SOFT_PWM // Required to avoid issues with heating or STLink
#define FAN_MIN_PWM 35 // Fan will not start in 1-30 range
#define FAN_MAX_PWM 255
//#define BEEPER_PIN PD13 // pin 60 (Servo PWM output 5V/GND on Board V0G+) made for BL-Touch sensor
// Can drive a PC Buzzer, if connected between PWM and 5V pins
#define LED_PIN PC2 // pin 17
//
// PWM for a servo probe
// Other servo devices are not supported on this board!
//
#if HAS_Z_SERVO_PROBE
#define SERVO0_PIN PD13 // Open drain PWM pin on the V0G (GND or floating 5V)
#define SERVO0_PWM_OD // Comment this if using PE5
//#define SERVO0_PIN PE5 // Pulled up PWM pin on the V08 (3.3V or 0)
//#undef Z_MAX_PIN // Uncomment if using ZMAX connector (PE5)
#endif
/**
* Note: Alfawise screens use various TFT controllers. Supported screens
* are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
* other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader
* init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define LCD_RESET_PIN PC4 // pin 33
#define LCD_BACKLIGHT_PIN PD12 // pin 59
#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1
/**
* Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer
* mixed up MOSI and MISO pins. SPI is managed in SW, and needs pins
* declared below.
*/
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PB12 // pin 51 SPI2_NSS
#define TOUCH_SCK_PIN PB13 // pin 52
#define TOUCH_MOSI_PIN PB14 // pin 53
#define TOUCH_MISO_PIN PB15 // pin 54
#define TOUCH_INT_PIN PC6 // pin 63 (PenIRQ coming from ADS7843)
#endif
//
// Persistent Storage
// If no option is selected below the SD Card will be used
//
//#define SPI_EEPROM
#define FLASH_EEPROM_EMULATION
#undef E2END
#if ENABLED(SPI_EEPROM)
// SPI1 EEPROM Winbond W25Q64 (8MB/64Mbits)
#define SPI_CHAN_EEPROM1 1
#define SPI_EEPROM1_CS PC5 // pin 34
#define EEPROM_SCK BOARD_SPI1_SCK_PIN // PA5 pin 30
#define EEPROM_MISO BOARD_SPI1_MISO_PIN // PA6 pin 31
#define EEPROM_MOSI BOARD_SPI1_MOSI_PIN // PA7 pin 32
#define EEPROM_PAGE_SIZE 0x1000U // 4KB (from datasheet)
#define E2END ((16 * EEPROM_PAGE_SIZE)-1) // Limit to 64KB for now...
#elif ENABLED(FLASH_EEPROM_EMULATION)
// SoC Flash (framework-arduinoststm32-maple/STM32F1/libraries/EEPROM/EEPROM.h)
#define EEPROM_START_ADDRESS (0x8000000UL + (512 * 1024) - 2 * EEPROM_PAGE_SIZE)
#define EEPROM_PAGE_SIZE (0x800U) // 2KB, but will use 2x more (4KB)
#define E2END (EEPROM_PAGE_SIZE - 1)
#else
#define E2END (0x7FFU) // On SD, Limit to 2KB, require this amount of RAM
#endif

View File

@ -0,0 +1,92 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* MALYAN M200 pin assignments
*/
#if NONE(__STM32F1__, STM32F1xx, STM32F0xx)
#error "Oops! Select an STM32 board in your IDE."
#endif
#define BOARD_INFO_NAME "Malyan M200"
// Enable EEPROM Emulation for this board
// This setting should probably be in configuration.h
// but it is literally the only board which uses it.
#define FLASH_EEPROM_EMULATION
#define SDSS SS_PIN
// Based on PWM timer usage, we have to use these timers and soft PWM for the fans
// On STM32F103:
// PB3, PB6, PB7, and PB8 can be used with pwm, which rules out TIM2 and TIM4.
// On STM32F070, 16 and 17 are in use, but 1 and 3 are available.
#undef STEP_TIMER
#undef TEMP_TIMER
#define STEP_TIMER 1
#define TEMP_TIMER 3
//
// Limit Switches
//
#define X_MIN_PIN PB4
#define Y_MIN_PIN PA15
#define Z_MIN_PIN PB5
//
// Steppers
//
// X & Y enable are the same
#define X_STEP_PIN PB14
#define X_DIR_PIN PB15
#define X_ENABLE_PIN PA8
#define Y_STEP_PIN PB12
#define Y_DIR_PIN PB13
#define Y_ENABLE_PIN PA8
#define Z_STEP_PIN PB10
#define Z_DIR_PIN PB2
#define Z_ENABLE_PIN PB11
#define E0_STEP_PIN PB0
#define E0_DIR_PIN PC13
#define E0_ENABLE_PIN PB1
//
// Temperature Sensors
//
#define TEMP_0_PIN PA0 // Analog Input (HOTEND0 thermistor)
#define TEMP_BED_PIN PA1 // Analog Input (BED thermistor)
//
// Heaters / Fans
//
#define HEATER_0_PIN PB6 // HOTEND0 MOSFET
#define HEATER_BED_PIN PB7 // BED MOSFET
#define MALYAN_FAN1_PIN PB8 // FAN1 header on board - PRINT FAN
#define MALYAN_FAN2_PIN PB3 // FAN2 header on board - CONTROLLER FAN
#define FAN1_PIN MALYAN_FAN2_PIN

View File

@ -0,0 +1,159 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* MKS Robin (STM32F130ZET6) board pin assignments
*
* https://github.com/makerbase-mks/MKS-Robin/tree/master/MKS%20Robin/Hardware
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "MKS Robin supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "MKS Robin"
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_JTAG
//
// Servos
//
#define SERVO0_PIN PC3 // XS1 - 5
#define SERVO1_PIN PA1 // XS1 - 6
#define SERVO2_PIN PF9 // XS2 - 5
#define SERVO3_PIN PF8 // XS2 - 6
//
// Limit Switches
//
#define X_MIN_PIN PB12
#define X_MAX_PIN PB0
#define Y_MIN_PIN PC5
#define Y_MAX_PIN PC4
#define Z_MIN_PIN PA4
#define Z_MAX_PIN PF7
//
// Steppers
//
#define X_ENABLE_PIN PB9
#define X_STEP_PIN PB8
#define X_DIR_PIN PB5
#define Y_ENABLE_PIN PB4
#define Y_STEP_PIN PG15
#define Y_DIR_PIN PG10
#define Z_ENABLE_PIN PD7
#define Z_STEP_PIN PD3
#define Z_DIR_PIN PG14
#define E0_ENABLE_PIN PG13
#define E0_STEP_PIN PG8
#define E0_DIR_PIN PA15
#define E1_ENABLE_PIN PA12
#define E1_STEP_PIN PA11
#define E1_DIR_PIN PA8
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_1_PIN PC2 // TH2
#define TEMP_BED_PIN PC0 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PC7 // HEATER1
#define HEATER_1_PIN PA6 // HEATER2
#define HEATER_BED_PIN PC6 // HOT BED
#define FAN_PIN PA7 // FAN
/**
* Note: MKS Robin board is using SPI2 interface. Make sure your stm32duino library is configured accordingly
*/
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
//#define MAX6675_SS_PIN PE6 // TC2 - CS2
#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PA3 // PW_OFF
#define FIL_RUNOUT_PIN PF11 // MT_DET
#define BEEPER_PIN PC13
#define LED_PIN PB2
/**
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
//#define LCD_RESET_PIN PF6
#define LCD_BACKLIGHT_PIN PG11
#define FSMC_CS_PIN PG12 // NE4
#define FSMC_RS_PIN PF0 // A0
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PB1 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif
// SPI1(PA7) & SPI3(PB5) not available
#define ENABLE_SPI2
#if ENABLED(SDIO_SUPPORT)
#define SCK_PIN PB13 // SPI2
#define MISO_PIN PB14 // SPI2
#define MOSI_PIN PB15 // SPI2
#define SS_PIN -1 // PB12 is X-
#define SD_DETECT_PIN PF12 // SD_CD
#else
// SD as custom software SPI (SDIO pins)
#define SCK_PIN PC12
#define MISO_PIN PC8
#define MOSI_PIN PD2
#define SS_PIN -1
#define ONBOARD_SD_CS_PIN PC11
#define SDSS PD2
#define SD_DETECT_PIN -1
#endif

View File

@ -0,0 +1,137 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 1 || E_STEPPERS > 1
#error "MKS Robin Lite supports only 1 hotend / E-stepper. Comment out this line to continue."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "MKS Robin Lite"
#endif
#define BOARD_WEBSITE_URL "github.com/makerbase-mks"
//#define DISABLE_DEBUG
#define DISABLE_JTAG
#define ENABLE_SPI2
//
// Limit Switches
//
#define X_STOP_PIN PC13
#define Y_STOP_PIN PC0
#define Z_MIN_PIN PC12
#define Z_MAX_PIN PB9
//
// Steppers
//
#define X_STEP_PIN PC6
#define X_DIR_PIN PB12
#define X_ENABLE_PIN PB10
#define Y_STEP_PIN PB11
#define Y_DIR_PIN PB2
#define Y_ENABLE_PIN PB10
#define Z_STEP_PIN PB1
#define Z_DIR_PIN PC5
#define Z_ENABLE_PIN PB10
#define E0_STEP_PIN PC4
#define E0_DIR_PIN PA5
#define E0_ENABLE_PIN PA4
//
// Heaters / Fans
//
#define HEATER_0_PIN PC9
#define FAN_PIN PA8
#define HEATER_BED_PIN PC8
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA1
#define TEMP_0_PIN PA0
#define FIL_RUNOUT_PIN PB8 // MT_DET
//
// LCD Pins
//
#if HAS_SPI_LCD
#define BEEPER_PIN PD2
#define BTN_ENC PB3
#define LCD_PINS_RS PC3
#define BTN_EN1 PB5
#define BTN_EN2 PB4
#define LCD_PINS_ENABLE PC2
#if ENABLED(MKS_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN -1
#define DOGLCD_A0 PC1
#define DOGLCD_CS PC2
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
#else // !MKS_MINI_12864
#define LCD_PINS_D4 PC1
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1
#endif
#endif // !MKS_MINI_12864
#endif // HAS_SPI_LCD
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_XY_PIN PB0
#define MOTOR_CURRENT_PWM_Z_PIN PA7
#define MOTOR_CURRENT_PWM_E_PIN PA6
#define MOTOR_CURRENT_PWM_RANGE (65535/10/3.3) // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
#define DEFAULT_PWM_MOTOR_CURRENT { 1000, 1000, 1000 } // 1.05Amp per driver, here is XY, Z and E. This values determined empirically.
//
// SD Card
//
#define ENABLE_SPI2
#define SD_DETECT_PIN PC10
#define SCK_PIN PB13
#define MISO_PIN P1B4
#define MOSI_PIN P1B5
#define SS_PIN PA15
#if HAS_GRAPHICAL_LCD
#define BOARD_ST7920_DELAY_1 DELAY_NS(125)
#define BOARD_ST7920_DELAY_2 DELAY_NS(125)
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif

View File

@ -0,0 +1,153 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* MKS Robin Lite 3 (STM32F103RCT6) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "MKS Robin Lite3 supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "MKS Robin Lite3"
#endif
#define BOARD_WEBSITE_URL "github.com/makerbase-mks"
//#define DISABLE_DEBUG
#define DISABLE_JTAG
#define ENABLE_SPI2
//
// Servos
//
#define SERVO0_PIN PA3
//
// Limit Switches
//
#define X_STOP_PIN PA12
#define Y_STOP_PIN PA11
#define Z_MIN_PIN PC6
#define Z_MAX_PIN PB1
//
// Steppers
//
#define X_STEP_PIN PC0
#define X_DIR_PIN PB2
#define X_ENABLE_PIN PC13
#define Y_STEP_PIN PC2
#define Y_DIR_PIN PB9
#define Y_ENABLE_PIN PB12
#define Z_STEP_PIN PB7
#define Z_DIR_PIN PB6
#define Z_ENABLE_PIN PB8
#define E0_STEP_PIN PB4
#define E0_DIR_PIN PB3
#define E0_ENABLE_PIN PB5
#define E1_STEP_PIN PC12
#define E1_DIR_PIN PC11
#define E1_ENABLE_PIN PD2
//
// Heaters 0,1 / Fans / Bed
//
#define HEATER_0_PIN PC9
#define HEATER_1_PIN PC7
#define FAN_PIN PA8
#define HEATER_BED_PIN PC8
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA1 //TB
#define TEMP_0_PIN PA0 //TH1
#define TEMP_1_PIN PA2 //TH2
#define FIL_RUNOUT_PIN PB10 // MT_DET
//
// LCD Pins
//
#if HAS_SPI_LCD
#define BEEPER_PIN PC1
#define BTN_ENC PC3
#define LCD_PINS_ENABLE PA4
#define LCD_PINS_RS PA5
#define BTN_EN1 PB11
#define BTN_EN2 PB0
// MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
#if ENABLED(MKS_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN -1
#define DOGLCD_A0 PC4
#define DOGLCD_CS PA7
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
// Required for MKS_MINI_12864 with this board
#define MKS_LCD12864B
#undef SHOW_BOOTSCREEN
#else // !MKS_MINI_12864
#define LCD_PINS_D4 PA6
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PA7
#define LCD_PINS_D6 PC4
#define LCD_PINS_D7 PC5
#endif
#endif // !MKS_MINI_12864
#endif // HAS_SPI_LCD
//
// SD Card
//
#define ENABLE_SPI2
#define SD_DETECT_PIN PC10
#define SCK_PIN PB13
#define MISO_PIN PB14
#define MOSI_PIN PB15
#define SS_PIN PA15
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif

View File

@ -0,0 +1,154 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* MKS Robin MINI (STM32F130VET6) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 1 || E_STEPPERS > 1
#error "MKS Robin mini supports up to 1 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "MKS Robin mini"
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_DEBUG
#define FLASH_EEPROM_EMULATION
// 2K in a AT24C16N
#define EEPROM_PAGE_SIZE (uint16)0x800 // 2048
#define EEPROM_START_ADDRESS ((uint32)(0x8000000 + 512 * 1024 - 2 * EEPROM_PAGE_SIZE))
#define E2END (EEPROM_PAGE_SIZE - 1)
//
// Note: MKS Robin mini board is using SPI2 interface.
//
#define SPI_MODULE 2
//
// Limit Switches
//
#define X_STOP_PIN PA15
#define Y_STOP_PIN PA12
#define Z_MIN_PIN PA11
#define Z_MAX_PIN PC4
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA4 // MT_DET
#endif
//
// Steppers
//
#define X_ENABLE_PIN PE4
#define X_STEP_PIN PE3
#define X_DIR_PIN PE2
#define Y_ENABLE_PIN PE1
#define Y_STEP_PIN PE0
#define Y_DIR_PIN PB9
#define Z_ENABLE_PIN PB8
#define Z_STEP_PIN PB5
#define Z_DIR_PIN PB4
#define E0_ENABLE_PIN PB3
#define E0_STEP_PIN PD6
#define E0_DIR_PIN PD3
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_BED_PIN PC0 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PC3 // HEATER1
#define HEATER_BED_PIN PA0 // HOT BED
#define FAN_PIN PB1 // FAN
//
// Thermocouples
//
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
//#define MAX6675_SS_PIN PE6 // TC2 - CS2
//
// Misc. Functions
//
#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PA3 // PW_OFF
//#define LED_PIN PB2
//
// LCD / Controller
//
#define BEEPER_PIN PC5
#define SD_DETECT_PIN PD12
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define LCD_RESET_PIN PC6
#define NO_LCD_REINIT // Suppress LCD re-initialization
#define LCD_BACKLIGHT_PIN PD13
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PC2
#define TOUCH_SCK_PIN PB13
#define TOUCH_MOSI_PIN PB15
#define TOUCH_MISO_PIN PB14
#endif
#endif
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_XY_PIN PA6
#define MOTOR_CURRENT_PWM_Z_PIN PA7
#define MOTOR_CURRENT_PWM_E_PIN PB0
#define MOTOR_CURRENT_PWM_RANGE 1500 // (255 * (1000mA / 65535)) * 257 = 1000 is equal 1.6v Vref in turn equal 1Amp
#define DEFAULT_PWM_MOTOR_CURRENT { 1030, 1030, 1030 } // 1.05Amp per driver, here is XY, Z and E. This values determined empirically.
// This is a kind of workaround in case native marlin "digipot" interface won't work.
// Required to enable related code in STM32F1/HAL.cpp
//#ifndef MKS_ROBIN_MINI_VREF_PWM
// #define MKS_ROBIN_MINI_VREF_PWM
//#endif
//#define VREF_XY_PIN PA6
//#define VREF_Z_PIN PA7
//#define VREF_E1_PIN PB0

View File

@ -0,0 +1,137 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* MKS Robin nano (STM32F130VET6) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 2 || E_STEPPERS > 2
#error "MKS Robin nano supports up to 2 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "MKS Robin nano"
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_DEBUG
//
// Limit Switches
//
#define X_STOP_PIN PA15
#define Y_STOP_PIN PA12
#define Z_MIN_PIN PA11
#define Z_MAX_PIN PC4
#ifndef FIL_RUNOUT_PIN
#define FIL_RUNOUT_PIN PA4 // MT_DET
#endif
//
// Steppers
//
#define X_ENABLE_PIN PE4
#define X_STEP_PIN PE3
#define X_DIR_PIN PE2
#define Y_ENABLE_PIN PE1
#define Y_STEP_PIN PE0
#define Y_DIR_PIN PB9
#define Z_ENABLE_PIN PB8
#define Z_STEP_PIN PB5
#define Z_DIR_PIN PB4
#define E0_ENABLE_PIN PB3
#define E0_STEP_PIN PD6
#define E0_DIR_PIN PD3
#define E1_ENABLE_PIN PA3
#define E1_STEP_PIN PA6
#define E1_DIR_PIN PA1
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_1_PIN PC2 // TH2
#define TEMP_BED_PIN PC0 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PC3 // HEATER1
#define HEATER_1_PIN PB0 // HEATER2
#define HEATER_BED_PIN PA0 // HOT BED
#define FAN_PIN PB1 // FAN
//
// Thermocouples
//
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
//#define MAX6675_SS_PIN PE6 // TC2 - CS2
//
// Misc. Functions
//
#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PA3 // PW_OFF
#define LED_PIN PB2
//
// SD Card
//
#define SDIO_SUPPORT
#define SD_DETECT_PIN PD12
//
// LCD / Controller
//
#define BEEPER_PIN PC5
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define LCD_RESET_PIN PC6 // FSMC_RST
#define NO_LCD_REINIT // Suppress LCD re-initialization
#define LCD_BACKLIGHT_PIN PD13
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PA7 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif
#endif

View File

@ -0,0 +1,274 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* MKS Robin pro (STM32F103ZET6) board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif HOTENDS > 3 || E_STEPPERS > 3
#error "MKS Robin pro supports up to 3 hotends / E-steppers. Comment out this line to continue."
#endif
#define BOARD_INFO_NAME "MKS Robin pro"
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_DEBUG
//
// Note: MKS Robin board is using SPI2 interface.
//
//#define SPI_MODULE 2
#define ENABLE_SPI2
//
// Servos
//
#define SERVO0_PIN PA8 // BLTOUCH
//
// Limit Switches
//
#define X_MIN_PIN PA15
#define X_MAX_PIN PG7
#define Y_MIN_PIN PA12
#define Y_MAX_PIN PG8
#define Z_MIN_PIN PA11
#define Z_MAX_PIN PC4
//
// Steppers
//
#define X_ENABLE_PIN PE4
#define X_STEP_PIN PE3
#define X_DIR_PIN PE2
#ifndef X_CS_PIN
#define X_CS_PIN PF8
#endif
#define Y_ENABLE_PIN PE1
#define Y_STEP_PIN PE0
#define Y_DIR_PIN PB9
#ifndef Y_CS_PIN
#define Y_CS_PIN PF3
#endif
#define Z_ENABLE_PIN PB8
#define Z_STEP_PIN PB5
#define Z_DIR_PIN PB4
#ifndef Z_CS_PIN
#define Z_CS_PIN PF6
#endif
#define E0_ENABLE_PIN PB3
#define E0_STEP_PIN PD6
#define E0_DIR_PIN PD3
#ifndef E0_CS_PIN
#define E0_CS_PIN PG15
#endif
#define E1_ENABLE_PIN PA3
#define E1_STEP_PIN PA6
#define E1_DIR_PIN PA1
#ifndef E1_CS_PIN
#define E1_CS_PIN PG10
#endif
#define E2_ENABLE_PIN PF0
#define E2_STEP_PIN PF2
#define E2_DIR_PIN PF1
#ifndef E2_CS_PIN
#define E2_CS_PIN PG9
#endif
//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PB15
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PB14
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PB13
#endif
#endif
#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
*
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*/
//#define X_HARDWARE_SERIAL Serial
//#define X2_HARDWARE_SERIAL Serial1
//#define Y_HARDWARE_SERIAL Serial1
//#define Y2_HARDWARE_SERIAL Serial1
//#define Z_HARDWARE_SERIAL Serial1
//#define Z2_HARDWARE_SERIAL Serial1
//#define E0_HARDWARE_SERIAL Serial1
//#define E1_HARDWARE_SERIAL Serial1
//#define E2_HARDWARE_SERIAL Serial1
//#define E3_HARDWARE_SERIAL Serial1
//#define E4_HARDWARE_SERIAL Serial1
//
// Software serial
//
#define X_SERIAL_TX_PIN PF7
#define X_SERIAL_RX_PIN PF8
#define Y_SERIAL_TX_PIN PF4
#define Y_SERIAL_RX_PIN PF3
#define Z_SERIAL_TX_PIN PF5
#define Z_SERIAL_RX_PIN PF6
#define E0_SERIAL_TX_PIN PG13
#define E0_SERIAL_RX_PIN PG15
#define E1_SERIAL_TX_PIN PG12
#define E1_SERIAL_RX_PIN PG10
#define E2_SERIAL_TX_PIN PC13
#define E2_SERIAL_RX_PIN PG9
#endif
//
// Temperature Sensors
//
#define TEMP_0_PIN PC1 // TH1
#define TEMP_1_PIN PC2 // TH2
#define TEMP_2_PIN PC3 // TH3
#define TEMP_BED_PIN PC0 // TB1
//
// Heaters / Fans
//
#define HEATER_0_PIN PF10 // +HE0-
#define HEATER_1_PIN PB0 // +HE1-
#define HEATER_2_PIN PF9 // +HE2-
#define HEATER_BED_PIN PA0 // +HOT-BED-
#define FAN_PIN PB1 // +FAN-
/**
* Note: MKS Robin Pro board is using SPI2 interface. Make sure your stm32duino library is configured accordingly
*/
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
//#define MAX6675_SS_PIN PF11 // TC2 - CS2
#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PG11 // PW_OFF
#define FIL_RUNOUT_PIN PA4 // MT_DET1
//#define FIL_RUNOUT_PIN PE6 // MT_DET2
//#define FIL_RUNOUT_PIN PG14 // MT_DET3
//
// SD Card
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#endif
#if SD_CONNECTION_IS(LCD)
#define ENABLE_SPI2
#define SD_DETECT_PIN PG3
#define SCK_PIN PB13
#define MISO_PIN PB14
#define MOSI_PIN PB15
#define SS_PIN PG6
#elif SD_CONNECTION_IS(ONBOARD)
#define SDIO_SUPPORT
#define SD_DETECT_PIN PD12
#elif SD_CONNECTION_IS(CUSTOM_CABLE)
#error "No custom SD drive cable defined for this board."
#endif
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define LCD_RESET_PIN PF6
#define NO_LCD_REINIT // Suppress LCD re-initialization
#define LCD_BACKLIGHT_PIN PD13
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PA7
#else
#define BEEPER_PIN PC5
#define BTN_ENC PG2
#define BTN_EN1 PG5
#define BTN_EN2 PG4
#endif
#elif HAS_SPI_LCD
#define BEEPER_PIN PC5
#define BTN_ENC PG2
#define LCD_PINS_ENABLE PG0
#define LCD_PINS_RS PG1
#define BTN_EN1 PG5
#define BTN_EN2 PG4
// MKS MINI12864 and MKS LCD12864B. If using MKS LCD12864A (Need to remove RPK2 resistor)
#if ENABLED(MKS_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN -1
#define DOGLCD_A0 PF12
#define DOGLCD_CS PF15
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15
#else // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
#define LCD_PINS_D4 PF14
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 PF15
#define LCD_PINS_D6 PF12
#define LCD_PINS_D7 PF13
#endif
#endif // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
#endif
#ifndef ST7920_DELAY_1
#define ST7920_DELAY_1 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_2
#define ST7920_DELAY_2 DELAY_NS(125)
#endif
#ifndef ST7920_DELAY_3
#define ST7920_DELAY_3 DELAY_NS(125)
#endif

View File

@ -0,0 +1,91 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
/**
* 2017 Victor Perez Marlin for stm32f1 test
* 2018 Modified by Pablo Crespo for Morpheus Board (https://github.com/pscrespo/Morpheus-STM32)
*/
/**
* MORPHEUS Board pin assignments
*/
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
#define BOARD_INFO_NAME "Bluepill based board"
//
// Limit Switches
//
#define X_MIN_PIN PB14
#define Y_MIN_PIN PB13
#define Z_MIN_PIN PB12
//
// Z Probe (when not Z_MIN_PIN)
//
#ifndef Z_MIN_PROBE_PIN
#define Z_MIN_PROBE_PIN PB9
#endif
//
// Steppers
//
// X & Y enable are the same
#define X_STEP_PIN PB7
#define X_DIR_PIN PB6
#define X_ENABLE_PIN PB8
#define Y_STEP_PIN PB5
#define Y_DIR_PIN PB4
#define Y_ENABLE_PIN PB8
#define Z_STEP_PIN PA15
#define Z_DIR_PIN PA10
#define Z_ENABLE_PIN PB3
#define E0_STEP_PIN PA8
#define E0_DIR_PIN PB15
#define E0_ENABLE_PIN PA9
//
// Temperature Sensors
//
#define TEMP_0_PIN PB1 // Analog Input (HOTEND thermistor)
#define TEMP_BED_PIN PB0 // Analog Input (BED thermistor)
//
// Heaters / Fans
//
#define HEATER_0_PIN PA2 // HOTEND MOSFET
#define HEATER_BED_PIN PA0 // BED MOSFET
#define FAN_PIN PA1 // FAN1 header on board - PRINT FAN
//
// Misc.
//
#define LED_PIN PC13
#define SDSS PA3

View File

@ -0,0 +1,261 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#ifndef __STM32F1__
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
/**
* 21017 Victor Perez Marlin for stm32f1 test
*/
#define BOARD_INFO_NAME "Misc. STM32F1R"
#define DEFAULT_MACHINE_NAME "STM32F103RET6"
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Limit Switches
//
#define X_STOP_PIN PB3
#define Y_STOP_PIN PB4
#define Z_STOP_PIN PB5
//
// Steppers
//
#define X_STEP_PIN PC0
#define X_DIR_PIN PC1
#define X_ENABLE_PIN PA8
#define Y_STEP_PIN PC2
#define Y_DIR_PIN PC3
#define Y_ENABLE_PIN PA8
#define Z_STEP_PIN PC4
#define Z_DIR_PIN PC5
#define Z_ENABLE_PIN PA8
#define E0_STEP_PIN PC6
#define E0_DIR_PIN PC7
#define E0_ENABLE_PIN PA8
/**
* TODO: Currently using same Enable pin to all steppers.
*/
#define E1_STEP_PIN PC8
#define E1_DIR_PIN PC9
#define E1_ENABLE_PIN PA8
#define E2_STEP_PIN PC10
#define E2_DIR_PIN PC11
#define E2_ENABLE_PIN PA8
//
// Misc. Functions
//
#define SDSS PA4
#define LED_PIN PD2
//
// Heaters / Fans
//
#define HEATER_0_PIN PB0 // EXTRUDER 1
#define HEATER_1_PIN PB1
#define HEATER_BED_PIN PA3 // BED
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA0 // Analog Input
#define TEMP_0_PIN PA1 // Analog Input
#define TEMP_1_PIN PA2 // Analog Input
//
// LCD Pins
//
#if HAS_SPI_LCD
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#elif BOTH(NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#else
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if DISABLED(NEWPANEL)
#define BEEPER_PIN 33
// Buttons attached to a shift register
// Not wired yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#endif
#endif
#if ENABLED(NEWPANEL)
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 39
#endif
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SD_DETECT_PIN 42
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ANY(VIKI2, miniVIKI)
#define BEEPER_PIN 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 45
#define LCD_SCREEN_ROT_180
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define SDSS 53
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
#define KILL_PIN 31
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_BACKLIGHT_PIN 33
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define SDSS 53
#define KILL_PIN 64
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
// The encoder and click button
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
// not connected to a pin
#define SD_DETECT_PIN 49
#else
// Beeper on AUX-4
#define BEEPER_PIN 33
// Buttons directly attached to AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SHIFT_OUT 40
#define SHIFT_CLK 44
#define SHIFT_LD 42
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#else
//#define SD_DETECT_PIN -1 // Ramps doesn't use this
#endif
#endif
#endif // NEWPANEL
#endif // HAS_SPI_LCD

View File

@ -0,0 +1,285 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2020 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/>.
*
*/
#pragma once
#if !defined(__STM32F1__) && !defined(__STM32F4__)
#error "Oops! Select an STM32F1/4 board in 'Tools > Board.'"
#endif
/**
* 21017 Victor Perez Marlin for stm32f1 test
*/
#define BOARD_INFO_NAME "STM3R Mini"
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
// Enable I2C_EEPROM for testing
#define I2C_EEPROM
// Ignore temp readings during development.
//#define BOGUS_TEMPERATURE_GRACE_PERIOD 2000
//
// Limit Switches
//
#define X_STOP_PIN PD0
#define Y_STOP_PIN PD1
#define Z_STOP_PIN PD4
//
// Steppers
//
#define X_STEP_PIN PE1
#define X_DIR_PIN PE0
#define X_ENABLE_PIN PC0
#define Y_STEP_PIN PE3
#define Y_DIR_PIN PE2
#define Y_ENABLE_PIN PC1
#define Z_STEP_PIN PE5
#define Z_DIR_PIN PE4
#define Z_ENABLE_PIN PC2
#define E0_STEP_PIN PE7
#define E0_DIR_PIN PE6
#define E0_ENABLE_PIN PC3
#define E1_STEP_PIN PE9
#define E1_DIR_PIN PE8
#define E1_ENABLE_PIN PC4
#define E2_STEP_PIN PE11
#define E2_DIR_PIN PE10
#define E2_ENABLE_PIN PC5
//
// Misc. Functions
//
#define SDSS PA15
#define LED_PIN PB2
//
// Heaters / Fans
//
#define HEATER_0_PIN PD12 // EXTRUDER 1
//#define HEATER_1_PIN PD13
#define HEATER_BED_PIN PB9 // BED
//#define HEATER_BED2_PIN -1 // BED2
//#define HEATER_BED3_PIN -1 // BED3
#ifndef FAN_PIN
#define FAN_PIN PD14
#endif
#define FAN1_PIN PD13
#define FAN_SOFT_PWM
//
// Temperature Sensors
//
#define TEMP_BED_PIN PA0
#define TEMP_0_PIN PA1
#define TEMP_1_PIN PA2
#define TEMP_2_PIN PA3
// Laser control
#if HAS_CUTTER
#define SPINDLE_LASER_PWM_PIN PB8
#define SPINDLE_LASER_ENA_PIN PD5
#endif
//
// LCD Pins
//
#if HAS_SPI_LCD
#if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#elif BOTH(NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#else
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if DISABLED(NEWPANEL)
#define BEEPER_PIN 33
// Buttons attached to a shift register
// Not wired yet
//#define SHIFT_CLK 38
//#define SHIFT_LD 42
//#define SHIFT_OUT 40
//#define SHIFT_EN 17
#endif
#endif
#if ENABLED(TOUCH_BUTTONS)
#define TOUCH_CS_PIN PB12 // SPI2_NSS
#define TOUCH_SCK_PIN PB13
#define TOUCH_MOSI_PIN PB14
#define TOUCH_MISO_PIN PB15
#define TOUCH_INT_PIN PC6 // (PenIRQ coming from ADS7843)
#elif ENABLED(NEWPANEL)
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#define BEEPER_PIN 37
#define BTN_EN1 31
#define BTN_EN2 33
#define BTN_ENC 35
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#if ENABLED(BQ_LCD_SMART_CONTROLLER)
#define LCD_BACKLIGHT_PIN 39
#endif
#elif ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SD_DETECT_PIN 42
#elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 47
#define BTN_EN2 43
#define BTN_ENC 32
#define LCD_SDSS 53
#define SD_DETECT_PIN -1
#define KILL_PIN 41
#elif ENABLED(LCD_I2C_VIKI)
#define BTN_EN1 22 // http://files.panucatt.com/datasheets/viki_wiring_diagram.pdf explains 40/42.
#define BTN_EN2 7 // 22/7 are unused on RAMPS_14. 22 is unused and 7 the SERVO0_PIN on RAMPS_13.
#define BTN_ENC -1
#define LCD_SDSS 53
#define SD_DETECT_PIN 49
#elif ANY(VIKI2, miniVIKI)
#define BEEPER_PIN 33
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 45
#define LCD_SCREEN_ROT_180
#define BTN_EN1 22
#define BTN_EN2 7
#define BTN_ENC 39
#define SDSS 53
#define SD_DETECT_PIN -1 // Pin 49 for display sd interface, 72 for easy adapter board
#define KILL_PIN 31
#define STAT_LED_RED_PIN 32
#define STAT_LED_BLUE_PIN 35
#elif ENABLED(ELB_FULL_GRAPHIC_CONTROLLER)
#define BTN_EN1 35
#define BTN_EN2 37
#define BTN_ENC 31
#define SD_DETECT_PIN 49
#define LCD_SDSS 53
#define KILL_PIN 41
#define BEEPER_PIN 23
#define DOGLCD_CS 29
#define DOGLCD_A0 27
#define LCD_BACKLIGHT_PIN 33
#elif ENABLED(MINIPANEL)
#define BEEPER_PIN 42
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 44
#define DOGLCD_CS 66
#define LCD_BACKLIGHT_PIN 65 // backlight LED on A11/D65
#define SDSS 53
#define KILL_PIN 64
// GLCD features
// Uncomment screen orientation
//#define LCD_SCREEN_ROT_90
//#define LCD_SCREEN_ROT_180
//#define LCD_SCREEN_ROT_270
// The encoder and click button
#define BTN_EN1 40
#define BTN_EN2 63
#define BTN_ENC 59
// not connected to a pin
#define SD_DETECT_PIN 49
#else
// Beeper on AUX-4
#define BEEPER_PIN 33
// Buttons directly attached to AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
#define SHIFT_OUT 40
#define SHIFT_CLK 44
#define SHIFT_LD 42
#elif ENABLED(PANEL_ONE)
#define BTN_EN1 59 // AUX2 PIN 3
#define BTN_EN2 63 // AUX2 PIN 4
#define BTN_ENC 49 // AUX3 PIN 7
#else
#define BTN_EN1 37
#define BTN_EN2 35
#define BTN_ENC 31
#endif
#if ENABLED(G3D_PANEL)
#define SD_DETECT_PIN 49
#define KILL_PIN 41
#else
//#define SD_DETECT_PIN -1 // Ramps doesn't use this
#endif
#endif
#endif // NEWPANEL
#endif // HAS_SPI_LCD