mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-08-05 21:13:56 -06:00
🔨 Creality V4.2.7 (GD32) (#27796)
This commit is contained in:
parent
019915b097
commit
0c72dc376c
5 changed files with 62 additions and 8 deletions
|
@ -92,7 +92,9 @@ bool is_temp_timer_initialized = false;
|
|||
|
||||
// Retrieves the clock frequency of the stepper timer
|
||||
uint32_t GetStepperTimerClkFreq() {
|
||||
return Step_Timer.getTimerClockFrequency();
|
||||
// Cache result
|
||||
static uint32_t clkFreq = Step_Timer.getTimerClockFrequency();
|
||||
return clkFreq;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -191,10 +193,12 @@ void SetTimerInterruptPriorities() {
|
|||
// Detect timer conflicts
|
||||
// ------------------------
|
||||
|
||||
TERN_(HAS_TMC_SW_SERIAL, static constexpr timer::TIMER_Base timer_serial[] = {static_cast<timer::TIMER_Base>(TIMER_SERIAL)});
|
||||
TERN_(SPEAKER, static constexpr timer::TIMER_Base timer_tone[] = {static_cast<timer::TIMER_Base>(TIMER_TONE)});
|
||||
TERN_(HAS_SERVOS, static constexpr timer::TIMER_Base timer_servo[] = {static_cast<timer::TIMER_Base>(TIMER_SERVO)});
|
||||
|
||||
enum TimerPurpose {
|
||||
PURPOSE_SERIAL,
|
||||
PURPOSE_TONE,
|
||||
PURPOSE_SERVO,
|
||||
PURPOSE_STEP,
|
||||
|
@ -205,6 +209,9 @@ enum TimerPurpose {
|
|||
// Includes the timer purpose to ease debugging when evaluating at build-time
|
||||
// This cannot yet account for timers used for PWM output, such as for fans
|
||||
static constexpr struct { TimerPurpose p; int t; } timers_in_use[] = {
|
||||
#if HAS_TMC_SW_SERIAL
|
||||
{ PURPOSE_SERIAL, timer_base_to_index(timer_serial[0]) }, // Set in variant.h
|
||||
#endif
|
||||
#if ENABLED(SPEAKER)
|
||||
{ PURPOSE_TONE, timer_base_to_index(timer_tone[0]) }, // Set in variant.h
|
||||
#endif
|
||||
|
|
|
@ -386,7 +386,7 @@
|
|||
#define BOARD_CREALITY_V422 5039 // Creality v4.2.2 (STM32F103RC / STM32F103RE) ... GD32 Variant Below!
|
||||
#define BOARD_CREALITY_V423 5040 // Creality v4.2.3 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V425 5041 // Creality v4.2.5 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 5042 // Creality v4.2.7 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V427 5042 // Creality v4.2.7 (STM32F103RC / STM32F103RE) ... GD32 Variant Below!
|
||||
#define BOARD_CREALITY_V4210 5043 // Creality v4.2.10 (STM32F103RC / STM32F103RE) as found in the CR-30
|
||||
#define BOARD_CREALITY_V431 5044 // Creality v4.3.1 (STM32F103RC / STM32F103RE)
|
||||
#define BOARD_CREALITY_V431_A 5045 // Creality v4.3.1a (STM32F103RC / STM32F103RE)
|
||||
|
@ -563,6 +563,7 @@
|
|||
//
|
||||
|
||||
#define BOARD_CREALITY_V422_GD32_MFL 7400 // Creality V4.2.2 MFL (GD32F303RE) ... STM32 Variant Above!
|
||||
#define BOARD_CREALITY_V427_GD32_MFL 7401 // Creality V4.2.7 MFL (GD32F303RE) ... STM32 Variant Above!
|
||||
|
||||
//
|
||||
// Raspberry Pi
|
||||
|
|
|
@ -27,11 +27,7 @@
|
|||
|
||||
#define ALLOW_GD32F3
|
||||
|
||||
#ifndef BOARD_INFO_NAME
|
||||
#define BOARD_INFO_NAME "Creality V4.2.2 MFL"
|
||||
#endif
|
||||
#ifndef DEFAULT_MACHINE_NAME
|
||||
#define DEFAULT_MACHINE_NAME "Ender-3 MFL"
|
||||
#endif
|
||||
#define BOARD_INFO_NAME "Creality V4.2.2 MFL"
|
||||
#define DEFAULT_MACHINE_NAME "Ender-3 MFL"
|
||||
|
||||
#include "../stm32f1/pins_CREALITY_V4.h"
|
||||
|
|
48
Marlin/src/pins/gd32f3/pins_CREALITY_V427_GD32_MFL.h
Normal file
48
Marlin/src/pins/gd32f3/pins_CREALITY_V427_GD32_MFL.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2025 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 MFL GD32 V4.2.7 (GD32F303RE) board pin assignments
|
||||
*/
|
||||
|
||||
#define ALLOW_GD32F3
|
||||
|
||||
#define BOARD_INFO_NAME "Creality V4.2.7 MFL"
|
||||
#define DEFAULT_MACHINE_NAME "Creality3D MFL"
|
||||
|
||||
//
|
||||
// Steppers
|
||||
//
|
||||
#define X_STEP_PIN PB9
|
||||
#define X_DIR_PIN PC2
|
||||
|
||||
#define Y_STEP_PIN PB7
|
||||
#define Y_DIR_PIN PB8
|
||||
|
||||
#define Z_STEP_PIN PB5
|
||||
#define Z_DIR_PIN PB6
|
||||
|
||||
#define E0_STEP_PIN PB3
|
||||
#define E0_DIR_PIN PB4
|
||||
|
||||
#include "../stm32f1/pins_CREALITY_V4.h"
|
|
@ -977,6 +977,8 @@
|
|||
|
||||
#elif MB(CREALITY_V422_GD32_MFL)
|
||||
#include "gd32f3/pins_CREALITY_V422_GD32_MFL.h" // GD32F303RE env:GD32F303RE_creality_mfl
|
||||
#elif MB(CREALITY_V427_GD32_MFL)
|
||||
#include "gd32f3/pins_CREALITY_V427_GD32_MFL.h" // GD32F303RE env:GD32F303RE_creality_mfl
|
||||
|
||||
//
|
||||
// Raspberry Pi RP2040
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue