0
0
Fork 0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2025-01-19 08:08:25 +00:00

🔧 Allow TMC_BAUD_RATE override

This commit is contained in:
Scott Lahteine 2023-05-05 20:46:33 -05:00
parent 85325f585a
commit 40895cbcbb
51 changed files with 232 additions and 92 deletions

View file

@ -91,7 +91,9 @@
#define K_CS_PIN 159
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
//
// Temperature Sensors

View file

@ -63,7 +63,9 @@
#define E0_SERIAL_RX_PIN PC14
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART

View file

@ -186,8 +186,11 @@
#define E1_SERIAL_RX_PIN P1_01
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
/**
* ------ ------

View file

@ -243,8 +243,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
/** ------ ------
* 1.30 | 1 2 | 0.28 0.17 | 1 2 | 0.15

View file

@ -106,7 +106,9 @@
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#else
#error "TMC2208 UART configuration is required for GMarsh X6."
#endif

View file

@ -336,8 +336,11 @@
#define E0_SERIAL_RX_PIN P0_26 // TH4
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
// UNUSED
//#define PIN_P0_02 P0_02 // AUX1 (Interrupt Capable/ADC/Serial Port 0)

View file

@ -184,7 +184,10 @@
#define Z2_SERIAL_RX_PIN P1_17
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//

View file

@ -151,8 +151,11 @@
#endif
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -153,8 +153,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// TMC Low Power Standby pins

View file

@ -126,8 +126,11 @@
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -56,5 +56,8 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART

View file

@ -195,7 +195,10 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//

View file

@ -99,8 +99,11 @@
#define E0_SERIAL_RX_PIN P0_21
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temp Sensors

View file

@ -337,8 +337,9 @@
* Hardware serial communication ports.
* If undefined software serial is used according to the pins below
*
* Serial2 -- AUX-4 Pin 18 (D16 TX2) and AUX-4 Pin 17 (D17 RX2)
* Serial1 -- Pins D18 and D19 are used for Z-MIN and Z-MAX
* Serial1 -- TX1 = D18 RX1 = D19 (Z-MIN and Z-MAX on RAMPS)
* Serial2 -- TX2 = D16 RX2 = D17 (AUX4-18 and AUX4-17)
* Serial3 -- TX3 = D14 RX3 = D15 (Available on some RAMPS-like boards)
*/
//#define X_HARDWARE_SERIAL Serial1
//#define X2_HARDWARE_SERIAL Serial1

View file

@ -69,6 +69,7 @@
* IIC : 12V GND D21 D20 GND 5V
* (SCL SDA)
*
* TX2 RX2 RX3 TX3
* END STOPS : D19 D18 D15 D14 D2 D3
* GND GND GND GND GND GND
* 5V 5V 5V 5V 5V 5V

View file

@ -131,8 +131,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -46,5 +46,8 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART

View file

@ -93,8 +93,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Heaters / Fans

View file

@ -100,7 +100,9 @@
#endif
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
//
// Temperature Sensors

View file

@ -128,7 +128,9 @@
#define Y_SERIAL_RX_PIN Y_SERIAL_TX_PIN
#define Z_SERIAL_TX_PIN PC7 // IO1
#define Z_SERIAL_RX_PIN Z_SERIAL_TX_PIN
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#else
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_XY_PIN PA6 // VREF2/3 CONTROL XY
@ -169,7 +171,6 @@
#if AXIS_DRIVER_TYPE_E0(TMC2208) || AXIS_DRIVER_TYPE_E0(TMC2209)
#define E0_SERIAL_TX_PIN PA8 // IO0
#define E0_SERIAL_RX_PIN PA8 // IO0
#define TMC_BAUD_RATE 19200
#else
// Motor current PWM pins
#define MOTOR_CURRENT_PWM_E_PIN PB0 // VREF1 CONTROL E

View file

@ -118,8 +118,11 @@
#endif
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Stepper current PWM

View file

@ -55,5 +55,8 @@
#define E0_SERIAL_RX_PIN PA3
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART

View file

@ -156,7 +156,10 @@
#define E0_SERIAL_RX_PIN PD9
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//

View file

@ -112,8 +112,11 @@
#define E0_SERIAL_RX_PIN PC11
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Heaters 0,1 / Fans / Bed

View file

@ -163,7 +163,10 @@
#define E1_SERIAL_RX_PIN PD8
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//

View file

@ -125,8 +125,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -223,5 +223,8 @@
#define Z2_SERIAL_RX_PIN EXT4_PIN
#define Z2_SERIAL_TX_PIN EXT4_PIN
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART

View file

@ -152,8 +152,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -131,8 +131,11 @@
#endif
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -282,8 +282,11 @@
#endif
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -299,8 +299,11 @@
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
/** ------ ------
* (BEEPER) PE8 | 1 2 | PE7 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)

View file

@ -222,8 +222,11 @@
#define E2_SERIAL_RX_PIN E2_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -322,8 +322,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// SD Connection

View file

@ -159,8 +159,11 @@
//#define E2_SERIAL_RX_PIN EX_SERIAL_RX_PIN
//#define E2_SERIAL_TX_PIN EX_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -175,8 +175,11 @@
#define E4_SERIAL_RX_PIN E4_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -108,8 +108,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -160,7 +160,10 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//

View file

@ -211,8 +211,11 @@
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
/** ------ ------
* (BEEPER) PB2 | 1 2 | PE10 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)

View file

@ -144,9 +144,11 @@
#define K_SERIAL_RX_PIN K_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif
#endif // HAS_TMC_UART
//
// Heaters / Fans

View file

@ -141,9 +141,11 @@
#define K_SERIAL_RX_PIN K_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif
#endif // HAS_TMC_UART
//
// Heaters / Fans

View file

@ -132,9 +132,6 @@
#define E0_SERIAL_TX_PIN PC10
#define E0_SERIAL_RX_PIN PC11
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
// Default TMC slave addresses
#ifndef X_SLAVE_ADDRESS
#define X_SLAVE_ADDRESS 0
@ -148,7 +145,13 @@
#ifndef E0_SLAVE_ADDRESS
#define E0_SLAVE_ADDRESS 3
#endif
#endif
// Reduce baud rate to improve software serial reliability
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temp Sensors

View file

@ -110,7 +110,9 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
// Default TMC slave addresses
#ifndef E0_SLAVE_ADDRESS

View file

@ -172,8 +172,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -138,8 +138,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -158,8 +158,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -64,8 +64,11 @@
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// NeoPixel LED

View file

@ -63,8 +63,11 @@
#define E3_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// NeoPixel LED

View file

@ -194,8 +194,11 @@
#define E0_SERIAL_RX_PIN E0_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -318,8 +318,11 @@
#define E5_SERIAL_RX_PIN E3_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
/**
* ----

View file

@ -141,8 +141,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// Temperature Sensors

View file

@ -310,8 +310,11 @@
#define E1_SERIAL_RX_PIN E1_SERIAL_TX_PIN
// Reduce baud rate to improve software serial reliability
#define TMC_BAUD_RATE 19200
#endif
#ifndef TMC_BAUD_RATE
#define TMC_BAUD_RATE 19200
#endif
#endif // HAS_TMC_UART
//
// SD Connection