Browse Source

Reduce default TMC baudrate to 57600 with Software Serial (#16930)

pull/1/head
Jason Smith 5 years ago
committed by GitHub
parent
commit
2bcc2ec7d1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      Marlin/src/module/stepper/trinamic.cpp

9
Marlin/src/module/stepper/trinamic.cpp

@ -117,8 +117,17 @@ enum StealthIndex : uint8_t { STEALTH_AXIS_XY, STEALTH_AXIS_Z, STEALTH_AXIS_E };
#endif #endif
#ifndef TMC_BAUD_RATE #ifndef TMC_BAUD_RATE
#if HAS_TMC_SW_SERIAL
// Reduce baud rate for boards not already overriding TMC_BAUD_RATE for software serial.
// Testing has shown that 115200 is not 100% reliable on AVR platforms, occasionally
// failing to read status properly. 32-bit platforms typically define an even lower
// TMC_BAUD_RATE, due to differences in how SoftwareSerial libraries work on different
// platforms.
#define TMC_BAUD_RATE 57600
#else
#define TMC_BAUD_RATE 115200 #define TMC_BAUD_RATE 115200
#endif #endif
#endif
#if HAS_DRIVER(TMC2130) #if HAS_DRIVER(TMC2130)
template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID> template<char AXIS_LETTER, char DRIVER_ID, AxisEnum AXIS_ID>

Loading…
Cancel
Save