Add BOARD_CREALITY_V24S1_301F4

Co-Authored-By: Miguel Risco-Castillo <mriscoc@users.noreply.github.com>
This commit is contained in:
Scott Lahteine
2022-05-12 20:09:25 -05:00
parent 7ed339cfa0
commit a7d40ec654
19 changed files with 1537 additions and 19 deletions

View File

@ -418,6 +418,7 @@
#define BOARD_MKS_EAGLE 4237 // MKS Eagle (STM32F407VE)
#define BOARD_ARTILLERY_RUBY 4238 // Artillery Ruby (STM32F401RC)
#define BOARD_FYSETC_SPIDER_V2_2 4239 // FYSETC Spider V2.2 (STM32F446VE)
#define BOARD_CREALITY_V24S1_301F4 4240 // Creality v2.4.S1_301F4 (STM32F401RC) as found in the Ender-3 S1 F4
//
// ARM Cortex M7

View File

@ -488,7 +488,7 @@
#ifndef LCD_SERIAL_PORT
#if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_E3_TURBO)
#define LCD_SERIAL_PORT 1
#elif MB(CREALITY_V24S1_301)
#elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4)
#define LCD_SERIAL_PORT 2 // Creality Ender3S1 board
#else
#define LCD_SERIAL_PORT 3 // Creality 4.x board

View File

@ -48,7 +48,7 @@
#ifdef __STM32F1__
#define SDA_IN() do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 8 << 12; }while(0)
#define SDA_OUT() do{ PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH &= 0XFFFF0FFF; PIN_MAP[IIC_EEPROM_SDA].gpio_device->regs->CRH |= 3 << 12; }while(0)
#elif STM32F1
#elif defined(STM32F1) || defined(STM32F4)
#define SDA_IN() SET_INPUT(IIC_EEPROM_SDA)
#define SDA_OUT() SET_OUTPUT(IIC_EEPROM_SDA)
#endif

View File

@ -695,6 +695,8 @@
#include "stm32f4/pins_MKS_EAGLE.h" // STM32F4 env:mks_eagle
#elif MB(ARTILLERY_RUBY)
#include "stm32f4/pins_ARTILLERY_RUBY.h" // STM32F4 env:Artillery_Ruby
#elif MB(CREALITY_V24S1_301F4)
#include "stm32f4/pins_CREALITY_V24S1_301F4.h" // STM32F4 env:STM32F401RC_creality env:STM32F401RC_creality_jlink env:STM32F401RC_creality_stlink
//
// ARM Cortex M7

View File

@ -22,5 +22,11 @@
#pragma once
#if NOT_TARGET(__STM32F1__, STM32F1)
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#if DISABLED(ALLOW_STM32F4)
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#elif NOT_TARGET(STM32F4)
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
#endif
#endif
#undef ALLOW_STM32F4

View File

@ -22,7 +22,8 @@
#pragma once
/**
* Creality V24S1_301 (STM32F103RE / STM32F103RC) board pin assignments as found on Ender 3 S1
* Creality V24S1_301 (STM32F103RE / STM32F103RC) board pin assignments as found on Ender 3 S1.
* Also supports the STM32F4 version of the board with identical pin mapping.
*/
#include "env_validate.h"
@ -35,8 +36,12 @@
#error "Disable Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN when using BLTOUCH with Creality V24S1-301."
#endif
#define BOARD_INFO_NAME "Creality V24S1-301"
#define DEFAULT_MACHINE_NAME "Ender 3 S1"
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Creality V24S1-301"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Ender 3 S1"
#endif
//
// Servos
@ -70,8 +75,8 @@
//
// SD Card
//
#define ONBOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PA4 // SDSS
#define ONBOARD_SPI_DEVICE 1
#define ONBOARD_SD_CS_PIN PA4 // SDSS
//
// M3/M4/M5 - Spindle/Laser Control
@ -80,9 +85,10 @@
//#define HEATER_0_PIN -1
//#define HEATER_BED_PIN -1
#define FAN_PIN -1
#define SPINDLE_LASER_ENA_PIN PA0 // FET 1
#define SPINDLE_LASER_PWM_PIN PA0 // Bed FET
#define SPINDLE_DIR_PIN PA0 // FET 4
#define SPINDLE_LASER_ENA_PIN PC0 // FET 1
#define SPINDLE_LASER_PWM_PIN PC0 // Bed FET
#define SPINDLE_DIR_PIN PC0 // FET 4
#define LASER_SOFT_PWM_PIN PC0
#endif
#include "pins_CREALITY_V4.h"

View File

@ -43,7 +43,9 @@
//
// Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
//
#define DISABLE_DEBUG
#ifndef DISABLE_DEBUG
#define DISABLE_DEBUG
#endif
//
// EEPROM

View File

@ -0,0 +1,38 @@
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2022 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once
/**
* Creality V24S1_301F4 (STM32F401RC) board pin assignments as found on Ender 3 S1.
*/
#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Creality V24S1-301F4"
#endif
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "Ender-3 S1 F4"
#endif
#define DISABLE_DEBUG false // DISABLE_(DEBUG|JTAG) is not supported for STM32F4.
#define ALLOW_STM32F4
#include "../stm32f1/pins_CREALITY_V24S1_301.h"