Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUMBA32 Improvements and Additions #18249

Merged
merged 11 commits into from
Jun 12, 2020
29 changes: 15 additions & 14 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,20 +322,21 @@
#define BOARD_BEAST 4200 // STM32F4xxVxT6 Libmaple-based STM32F4 controller
#define BOARD_GENERIC_STM32F4 4201 // STM32 STM32GENERIC-based STM32F4 controller
#define BOARD_ARMED 4202 // Arm'ed STM32F4-based controller
#define BOARD_RUMBA32_AUS3D 4203 // RUMBA32 STM32F446VET6 based controller from Aus3D
#define BOARD_RUMBA32_MKS 4204 // RUMBA32 STM32F446VET6 based controller from Makerbase
#define BOARD_BLACK_STM32F407VE 4205 // BLACK_STM32F407VE
#define BOARD_BLACK_STM32F407ZE 4206 // BLACK_STM32F407ZE
#define BOARD_STEVAL_3DP001V1 4207 // STEVAL-3DP001V1 3D PRINTER BOARD
#define BOARD_BTT_SKR_PRO_V1_1 4208 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
#define BOARD_BTT_BTT002_V1_0 4209 // BigTreeTech BTT002 v1.0 (STM32F407VG)
#define BOARD_BTT_GTR_V1_0 4210 // BigTreeTech GTR v1.0 (STM32F407IGT)
#define BOARD_LERDGE_K 4211 // Lerdge K (STM32F407ZG)
#define BOARD_LERDGE_X 4212 // Lerdge X (STM32F407VE)
#define BOARD_VAKE403D 4213 // VAkE 403D (STM32F446VET6)
#define BOARD_FYSETC_S6 4214 // FYSETC S6 board
#define BOARD_FLYF407ZG 4215 // FLYF407ZG board (STM32F407ZG)
#define BOARD_MKS_ROBIN2 4216 // MKS_ROBIN2 (STM32F407ZE)
#define BOARD_RUMBA32_V1_0 4203 // RUMBA32 STM32F446VET6 based controller from Aus3D
#define BOARD_RUMBA32_V1_1 4204 // RUMBA32 STM32F446VET6 based controller from Aus3D
#define BOARD_RUMBA32_MKS 4205 // RUMBA32 STM32F446VET6 based controller from Makerbase
#define BOARD_BLACK_STM32F407VE 4206 // BLACK_STM32F407VE
#define BOARD_BLACK_STM32F407ZE 4207 // BLACK_STM32F407ZE
#define BOARD_STEVAL_3DP001V1 4208 // STEVAL-3DP001V1 3D PRINTER BOARD
#define BOARD_BTT_SKR_PRO_V1_1 4209 // BigTreeTech SKR Pro v1.1 (STM32F407ZG)
#define BOARD_BTT_BTT002_V1_0 4210 // BigTreeTech BTT002 v1.0 (STM32F407VG)
#define BOARD_BTT_GTR_V1_0 4211 // BigTreeTech GTR v1.0 (STM32F407IGT)
#define BOARD_LERDGE_K 4212 // Lerdge K (STM32F407ZG)
#define BOARD_LERDGE_X 4213 // Lerdge X (STM32F407VE)
#define BOARD_VAKE403D 4214 // VAkE 403D (STM32F446VET6)
#define BOARD_FYSETC_S6 4215 // FYSETC S6 board
#define BOARD_FLYF407ZG 4216 // FLYF407ZG board (STM32F407ZG)
#define BOARD_MKS_ROBIN2 4217 // MKS_ROBIN2 (STM32F407ZE)

//
// ARM Cortex M7
Expand Down
10 changes: 8 additions & 2 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,9 @@
#include "stm32f4/pins_GENERIC_STM32F4.h" // STM32F4 env:STM32F4
#elif MB(ARMED)
#include "stm32f4/pins_ARMED.h" // STM32F4 env:ARMED
#elif MB(RUMBA32_AUS3D)
#elif MB(RUMBA32_V1_0)
#include "stm32f4/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32_f446ve
#elif MB(RUMBA32_V1_1)
#include "stm32f4/pins_RUMBA32_AUS3D.h" // STM32F4 env:rumba32_f446ve
#elif MB(RUMBA32_MKS)
#include "stm32f4/pins_RUMBA32_MKS.h" // STM32F4 env:rumba32_mks
Expand Down Expand Up @@ -647,6 +649,7 @@
#define BOARD_BIGTREE_SKR_MINI_E3 -1016
#define BOARD_BIGTREE_SKR_E3_DIP -1017
#define BOARD_RUMBA32 -1018
#define BOARD_RUMBA32_AUS3D -1019

#if MB(MKS_13)
#error "BOARD_MKS_13 has been renamed BOARD_MKS_GEN_13. Please update your configuration."
Expand Down Expand Up @@ -687,7 +690,9 @@
#elif MB(STEVAL)
#error "BOARD_STEVAL has been renamed BOARD_STEVAL_3DP001V1. Please update your configuration."
#elif MB(RUMBA32)
#error "BOARD_RUMBA32 is now BOARD_RUMBA32_MKS or BOARD_RUMBA32_AUS3D. Please update your configuration."
#error "BOARD_RUMBA32 is now BOARD_RUMBA32_MKS or BOARD_RUMBA32_V1_0. Please update your configuration."
#elif MB(RUMBA32_AUS3D)
#error "BOARD_RUMBA32_AUS3D is now BOARD_RUMBA32_V1_0. Please update your configuration."
#else
#error "Unknown MOTHERBOARD value set in Configuration.h"
#endif
Expand All @@ -711,6 +716,7 @@
#undef BOARD_BIGTREE_SKR_MINI_V1_1
#undef BOARD_BIGTREE_SKR_E3_DIP
#undef BOARD_RUMBA32
#undef BOARD_RUMBA32_AUS3D

#endif

Expand Down
56 changes: 46 additions & 10 deletions Marlin/src/pins/stm32f4/pins_RUMBA32_AUS3D.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,57 @@
#pragma once

/**
* Pin assignments for the MKS RUMBA32
* Pin assignments for the RUMBA32
*
* https://aus3d.com.au/rumba32
* https://github.com/Aus3D/RUMBA32
*
* The MKS and Aus3D versions have the same pinout but the MKS version
* has some added resistors and LEDs. The resistors needed for the
* TMC2208/9 UART interface are among the additions. Also added were
* connectors and resistors dedicated to the TMC2130 sensorless homing
* interface.
*/

#define BOARD_INFO_NAME "Aus3D RUMBA32"
#define BOARD_INFO_NAME "RUMBA32"

#if NO_EEPROM_SELECTED
#if MB(RUMBA32_V1_0)
#define FLASH_EEPROM_EMULATION
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#elif MB(RUMBA32_V1_1)
#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x2000 // 8KB (24LC64T-I/OT)
#endif
#endif

#define RUMBA32_V1_0
//#define I2C_EEPROM
#if ENABLED(FLASH_EEPROM_EMULATION)
// Decrease delays and flash wear by spreading writes across the
// 128 kB sector allocated for EEPROM emulation.
#define FLASH_EEPROM_LEVELING
#endif

#include "pins_RUMBA32_common.h"

#if MB(RUMBA32_V1_1)

#define SERVO0_PIN PA15
#undef BTN_PIN

#if HAS_TMC_UART
//
// TMC2208/TMC2209 stepper drivers - Software Serial is used according to below pins
//
#define X_SERIAL_TX_PIN PA14
#define X_SERIAL_RX_PIN PC14

#define Y_SERIAL_TX_PIN PA13
#define Y_SERIAL_RX_PIN PE4

#define Z_SERIAL_TX_PIN PB10
#define Z_SERIAL_RX_PIN PE0

#define E0_SERIAL_TX_PIN PD11
#define E0_SERIAL_RX_PIN PC13

#define E1_SERIAL_TX_PIN PB3
#define E1_SERIAL_RX_PIN PD5

#define E2_SERIAL_TX_PIN PB4
#define E2_SERIAL_RX_PIN PD1
#endif
#endif
39 changes: 11 additions & 28 deletions Marlin/src/pins/stm32f4/pins_RUMBA32_MKS.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,21 @@

#define BOARD_INFO_NAME "MKS RUMBA32"

#define RUMBA32_V1_0
#if NO_EEPROM_SELECTED
#define FLASH_EEPROM_EMULATION
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
#endif

#if ENABLED(FLASH_EEPROM_EMULATION)
// Decrease delays and flash wear by spreading writes across the
// 128 kB sector allocated for EEPROM emulation.
#define FLASH_EEPROM_LEVELING
#endif

#define ENABLE_SPI1
//#define I2C_EEPROM

#include "pins_RUMBA32_common.h"

//
// Software SPI pins for TMC2130 stepper drivers
//
#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PA7
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PA6
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PA5
#endif
#endif

#if HAS_TMC_UART
/**
* TMC2208/TMC2209 stepper drivers
Expand Down Expand Up @@ -96,14 +90,3 @@
#define E2_SERIAL_TX_PIN PD12
#define E2_SERIAL_RX_PIN PD1
#endif

//
// LCD / Controller
//

// Alter timing for graphical display
#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(600)
#endif
44 changes: 40 additions & 4 deletions Marlin/src/pins/stm32f4/pins_RUMBA32_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

/**
* Common pin assignments for all RUMBA32 boards
*
*/

#ifndef STM32F4
Expand All @@ -31,11 +32,21 @@
#error "RUMBA32 boards support up to 3 hotends / E-steppers."
#endif

#define RUMBA32_V1_0
#define DEFAULT_MACHINE_NAME BOARD_INFO_NAME

//#define I2C_EEPROM
#define MARLIN_EEPROM_SIZE 0x1000 // 4KB
// Use soft PWM for fans - PWM is not working properly when paired with STM32 Arduino Core v1.7.0
// This can be removed when Core version is updated and PWM behaviour is fixed.
#define FAN_SOFT_PWM

//
// Configure Timers
// TIM6 is used for TONE
// TIM7 is used for SERVO
// TIMER_SERIAL defaults to TIM7 so we'll override it here
//
#define STEP_TIMER 10
#define TEMP_TIMER 14
#define TIMER_SERIAL TIM9

//
// Limit Switches
Expand Down Expand Up @@ -80,6 +91,18 @@
#define E2_ENABLE_PIN PD0
#define E2_CS_PIN PD1

#if ENABLED(TMC_USE_SW_SPI)
#ifndef TMC_SW_MOSI
#define TMC_SW_MOSI PA7
#endif
#ifndef TMC_SW_MISO
#define TMC_SW_MISO PA6
#endif
#ifndef TMC_SW_SCK
#define TMC_SW_SCK PA5
#endif
#endif

//
// Temperature Sensors
//
Expand All @@ -101,7 +124,7 @@
#define FAN1_PIN PA8

//
// I2C
// SPI
//
#define SCK_PIN PA5
#define MISO_PIN PA6
Expand Down Expand Up @@ -143,4 +166,17 @@
#define LCD_PINS_D7 PE15
#endif

// Alter timing for graphical display
#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(600)
#endif
#endif

#endif
14 changes: 12 additions & 2 deletions buildroot/share/tests/rumba32_f446ve-tests
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,24 @@ set -e

# Build examples
restore_configs
opt_set MOTHERBOARD BOARD_RUMBA32_AUS3D
opt_set MOTHERBOARD BOARD_RUMBA32_V1_0
opt_set SERIAL_PORT -1
opt_disable PIDTEMP
opt_enable PIDTEMPBED
opt_set TEMP_SENSOR_BED 1
opt_disable THERMAL_PROTECTION_BED
opt_set X_DRIVER_TYPE TMC2130
exec_test $1 $2 "rumba32_f446ve with TMC2130, PID Bed, and bed thermal protection disabled"
exec_test $1 $2 "rumba32_f446ve V1.0 with TMC2130, PID Bed, and bed thermal protection disabled"

# Build examples
restore_configs
opt_set MOTHERBOARD BOARD_RUMBA32_V1_1
opt_set SERIAL_PORT -1
opt_enable PIDTEMPBED EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
opt_set TEMP_SENSOR_BED 1
opt_set X_DRIVER_TYPE TMC2130
opt_set Y_DRIVER_TYPE TMC2208
exec_test $1 $2 "rumba32_f446ve V1.1 with TMC2130, TMC2208, PID Bed, EEPROM settings, and graphic LCD controller"

# cleanup
restore_configs