|
620 | 620 | #endif
|
621 | 621 |
|
622 | 622 | #if HAS_TMC_UART
|
623 |
| - |
624 | 623 | /**
|
625 |
| - * Address for the UART Configuration of the TMC2209. Override in Configuration files. |
626 |
| - * To test TMC2209 Steppers enable TMC_DEBUG in Configuration_adv.h and test the M122 command with voltage on the steppers. |
| 624 | + * TMC2208/TMC2209 stepper drivers |
| 625 | + * It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations. |
| 626 | + * Steppers 1,2,3,4 (X,Y,Z,E0) are on the Serial1, Sercom (RX = 0, TX = 1), extra stepper 5 (E1 or any axis you want) is on Serial2, Sercom (RX = 17, TX = 16) |
627 | 627 | */
|
| 628 | + |
| 629 | + //#define X_HARDWARE_SERIAL Serial1 |
| 630 | + //#define Y_HARDWARE_SERIAL Serial1 |
| 631 | + //#define Z_HARDWARE_SERIAL Serial1 |
| 632 | + //#define E0_HARDWARE_SERIAL Serial1 |
| 633 | + //#define E1_HARDWARE_SERIAL Serial2 |
| 634 | + |
| 635 | + // Default TMC slave addresses |
628 | 636 | #ifndef X_SLAVE_ADDRESS
|
629 | 637 | #define X_SLAVE_ADDRESS 0b00
|
630 | 638 | #endif
|
|
640 | 648 | #ifndef E1_SLAVE_ADDRESS
|
641 | 649 | #define E1_SLAVE_ADDRESS 0b00
|
642 | 650 | #endif
|
643 |
| - |
644 |
| - /** |
645 |
| - * TMC2208/TMC2209 stepper drivers |
646 |
| - * It seems to work perfectly fine on Software Serial, if an advanced user wants to test, you could use the SAMD51 Serial1 and Serial 2. Be careful with the Sercom configurations. |
647 |
| - * Steppers 1,2,3,4 (X,Y,Z,E0) are on the Serial1, Sercom (RX = 0, TX = 1), extra stepper 5 (E1 or any axis you want) is on Serial2, Sercom (RX = 17, TX = 16) |
648 |
| - */ |
649 |
| - |
650 |
| - //#define X_HARDWARE_SERIAL Serial1 |
651 |
| - //#define Y_HARDWARE_SERIAL Serial1 |
652 |
| - //#define Z_HARDWARE_SERIAL Serial1 |
653 |
| - //#define E0_HARDWARE_SERIAL Serial1 |
654 |
| - //#define E1_HARDWARE_SERIAL Serial2 |
655 |
| - |
656 |
| - #define TMC_BAUD_RATE 250000 |
| 651 | + static_assert(X_SLAVE_ADDRESS == 0b00, "X_SLAVE_ADDRESS must be 0b00 for BOARD_BRICOLEMON_V1_0."); |
| 652 | + static_assert(Y_SLAVE_ADDRESS == 0b01, "Y_SLAVE_ADDRESS must be 0b01 for BOARD_BRICOLEMON_V1_0."); |
| 653 | + static_assert(Z_SLAVE_ADDRESS == 0b10, "Z_SLAVE_ADDRESS must be 0b10 for BOARD_BRICOLEMON_V1_0."); |
| 654 | + static_assert(E0_SLAVE_ADDRESS == 0b11, "E0_SLAVE_ADDRESS must be 0b11 for BOARD_BRICOLEMON_V1_0."); |
| 655 | + static_assert(E1_SLAVE_ADDRESS == 0b00, "E1_SLAVE_ADDRESS must be 0b00 for BOARD_BRICOLEMON_V1_0."); |
| 656 | + |
| 657 | + // Reduce baud rate to improve software serial reliability |
| 658 | + #ifndef TMC_BAUD_RATE |
| 659 | + #define TMC_BAUD_RATE 19200 // 250000 |
| 660 | + #endif |
657 | 661 |
|
658 | 662 | //
|
659 | 663 | // Software serial
|
|
0 commit comments