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.34k stars 19.26k forks source link

[BUG] Conflict TCM2130 and AUTO_POWER_CONTROL #14558

Closed stormy-gh closed 4 years ago

stormy-gh commented 5 years ago

Problem: Marlin hangs.

Steps to reproduce:

In Configuration.h enable:

#define X_DRIVER_TYPE  TMC2130
#define PSU_CONTROL
#define AUTO_POWER_CONTROL

In there is no connection with TCM2130 Marlin hangs.

Problem is that in restore_stepper_drivers() method stepperX.push() is called without any check if communication with TMC2130 is working.

Expected behaviour: "TMC communication error" message.

teemuatlut commented 5 years ago

Please provide configuration settings just like the issue template says. Behaves just fine for me with SKRv1.3 running just on USB 5v.

stormy-gh commented 5 years ago

I have board "DUE3DOM LE". It is version of DUE3DOM with SPI connected to stepsticks. I attach schematic of the board.

Configuration changes I have made:

In pins.h

#elif MB(DUE3DOM_LE)
  #include "pins_DUE3DOM_LE.h"

In boards.h #define BOARD_DUE3DOM_LE 3099 // DUE3DOM LE for Arduino DUE

In Configuration.h

#define MOTHERBOARD BOARD_DUE3DOM_LE
#define REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
#define X_DRIVER_TYPE  TMC2130
#define Y_DRIVER_TYPE  TMC2130
#define Z_DRIVER_TYPE  A4988
#define PSU_CONTROL
#define AUTO_POWER_CONTROL  // Enable automatic control of the PS_ON pin

In this configuration Marlin hangs at startup. When you comment out line _"#define AUTO_POWERCONTROL" it working fine.

You do not need DUE3DOM LE to reproduce this behaviour - just try this config on standalone Arduino Due. My Arduino is hanging so hard, that I need to press "Erase" button to reprogram it again.

Due3DomLE_Schemat.pdf

marlin-bug.zip

boelle commented 5 years ago

@stormy-gh is the issue still there?

stormy-gh commented 5 years ago

Yes. The issue is still there.

Quick & Dirty fix: I've commented out "restore_stepper_drivers();" on power.cpp line 127 and now everything is working good.

boelle commented 4 years ago

@stormy-gh if not mistaken there has been some fix's to power control,

problem is that logic voltage needs to come on a tad before 12/24V when you deal with TMC's

give it a go

stormy-gh commented 4 years ago

Informujemy, ze w dniach od 25 listopada - 18 grudnia firma jest nieczynna.

Panstwa list zostal zachowany, postaramy sie odpowiedziec najszybciej jak to bedzie mozliwe.


Please be informed that our office will be closed from 25th November to 18th December.

-- S-TECH Business IT solutions http://www.s-tech.pl

boelle commented 4 years ago

@stormy-gh its now past 18th december

there has been some fix's to power control,

problem is that logic voltage needs to come on a tad before 12/24V when you deal with TMC's

give it a go

boelle commented 4 years ago

Lack of Activity This issue is being closed due to lack of activity. If you have solved the issue, please let us know how you solved it. If you haven't, please tell us what else you've tried in the meantime, and possibly this issue will be reopened.

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.