MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.17k stars 19.21k forks source link

[BUG] 2.0.x LPC1768 TMC2130 steppers no longer move #14059

Closed dp250f closed 5 years ago

dp250f commented 5 years ago

Description

Was using repository from 5/11/2019, stepper motors all worked. Cloned new repository form 5/18/2019, steppers no longer move.

Steps to Reproduce

  1. Clone 2.0.x repository from today, configure and compile for LPC1768 (BOARD_BIGTREE_SKR_V1_3) and TMC2130 drivers in SPI mode

Expected behavior: Steppers move

Actual behavior: Steppers don't move

Additional Information

This seemed to work fine from when I had compiled it earlier this week, using the build from 5/11/2019. Not sure if there was a marlin update or a library update which broke it, but something definitely did. bug report.zip

dp250f commented 5 years ago

..and I can confirm it's the TMCStepper library update from 0.3.2 to 0.3.3 which broke it. If I specify TMCStepper@0.3.2 in my platformio.ini, it works like it did before.

thisiskeithb commented 5 years ago

I ran into the same issue: https://github.com/MarlinFirmware/Marlin/issues/14051

ghost commented 5 years ago

Not related, but in your configuration.h file @dp250f, I don't think you need to specify Z2 AND E1, it's one or the other really.

#define X_DRIVER_TYPE  TMC2130
#define Y_DRIVER_TYPE  TMC2130
#define Z_DRIVER_TYPE  TMC2130
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
#define Z2_DRIVER_TYPE TMC2130
//#define Z3_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2130
#define E1_DRIVER_TYPE TMC2130
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
//#define E5_DRIVER_TYPE A4988
ghost commented 5 years ago

Also, have you tried using HW SPI being as the TMC chips have their very own hardware SPI bus ?

in configuration_adv.h, try commenting out this line ..

#define TMC_USE_SW_SPI
ghost commented 5 years ago

Another also, but maybe useful tip is that if you specify the upload drive in your platformio.ini file in the LPC section, Atom/platformio will automatically copy the firmware.bin file onto the little SD card that is plugged into the SKR 1.3 board for you when you compile it - if you so wished.

In my case, this is ..

[env:LPC1768]
upload_port = D:\
platform          = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/master.zip
framework         = arduino
dp250f commented 5 years ago

Not related, but in your configuration.h file @dp250f, I don't think you need to specify Z2 AND E1, it's one or the other really.

#define X_DRIVER_TYPE  TMC2130
#define Y_DRIVER_TYPE  TMC2130
#define Z_DRIVER_TYPE  TMC2130
//#define X2_DRIVER_TYPE A4988
//#define Y2_DRIVER_TYPE A4988
#define Z2_DRIVER_TYPE TMC2130
//#define Z3_DRIVER_TYPE A4988
#define E0_DRIVER_TYPE TMC2130
#define E1_DRIVER_TYPE TMC2130
//#define E2_DRIVER_TYPE A4988
//#define E3_DRIVER_TYPE A4988
//#define E4_DRIVER_TYPE A4988
//#define E5_DRIVER_TYPE A4988

Yeah, I was getting desperate. I've removed it since I got it to go again. I have upload_port set to E: since that's the drive letter it gets. I was wondering about hardware SPI. Instructions for my board say to use sw spi (pins file seems to require it)

ghost commented 5 years ago

oh ok about the hardware SPI. That's a shame :(

gloomyandy commented 5 years ago

@doggyfan On the SKR V1.3 the pins connected to the SPI pins on the TMC drivers are... MOSI P4_28 MISO P0_05 SCK P0_04 That pin combination does not have a hardware SPI controller connected to it. On the SKR board hardware SPI is on: SCK P0_07 MISO P0_08 MOSI P0_09 and SCK P0_15 MISO P0_17 MOSI P0_18 So you would need to change the way that the SPI bus is connected to the drivers.

Also I think that the TMC library currently uses that HAL to provide hardware SPI support and that only supports a single hardware SPI device (which more often than not will be in use for the SD card and/or LCD).

ghost commented 5 years ago

oops, yes of cause @gloomyandy, I looked at the schematic and got it wrong, the TMC's are not connected to a hardware SPI port, shame.

Am surprised Marlin can only do a single hardware SPI, that's a shame too. That could be solved though if need be.

hoe hum lol

jeroen85 commented 5 years ago

Strange, i just updated to the latest (May 19) Marlin + TMC 0.3.3. Also on a SKR V1.3. No problems at all..

Config.zip

dp250f commented 5 years ago

Strange, i just updated to the latest (May 19) Marlin + TMC 0.3.3. Also on a SKR V1.3. No problems at all..

Config.zip

It looks like you're using an older configuration.h and configuration_adv.h Which E0 driver are you using?

jeroen85 commented 5 years ago

Strange, i just updated to the latest (May 19) Marlin + TMC 0.3.3. Also on a SKR V1.3. No problems at all.. Config.zip

It looks like you're using an older configuration.h and configuration_adv.h Which E0 driver are you using?

E0 is a A4988

gloomyandy commented 5 years ago

There has been an update to the stepper library to 0.3.4, so it is probably worth making sure you have that version and trying things again.

dp250f commented 5 years ago

Thanks! Version 0.3.4 is working.

github-actions[bot] commented 4 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.