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.28k stars 19.24k forks source link

[BUG] [bugfix-2.0.x] TMC5160 SD card unmounts and encoder 'clicks' itself #13544

Closed klcjr89 closed 5 years ago

klcjr89 commented 5 years ago

Description

I was originally running genuine Watterott TMC2130 drivers in SPI mode on my Azteeg x5 mini v3 controller board, with the SDO, SCK, and SDI pins for the drivers wired to the SD card breakout pins on the board. I had no issues at that point at all. The CS pins for each driver are defined in my pins file (attached below) for the board.

I then bought genuine Watterott TMC5160 drivers and installed them. There are no issues with printing, however, with the USB cord plugged into my computer to the board, the SD card will randomly mount and unmount, which didn't happen with the TMC2130s.

In addition to this, the LCD screen/encoder on my Ender-3 (the printer this is installed on) will randomly enter a menu by itself and also return to the main menu by itself, as if I were physically pressing on the encoder click button. This issue happens with and without the controller board being plugged into the computer via USB, as I was trying to rule things out. This didn't happen with the TMC2130s either.

I am unsure if there were code changes in the past two weeks to the main branch that would've caused this.

I verified it isn't a ground loop problem.

Steps to Reproduce

Physically swapped genuine TMC2130 drivers in SPI mode to genuine TMC5160 drivers in SPI mode.

Expected behavior:

SD card should not mount and unmount on computer by itself.

LCD screen should not enter menus by itself.

Actual behavior:

SD card mounts and unmounts randomly with controller board plugged into the computer via USB.

LCD screen randomly clicks a menu item by itself and returns to the info screen by itself, as if I were physically pressing the button.

I am tagging @teemuatlut to see if he can help.

Thank you!

My config files: ConfigFiles.zip

kAdonis commented 5 years ago

I dont see a pullup either, but as comps wrote above, it is not needed

klcjr89 commented 5 years ago

Ok great! My plan of action now is to put a 10K pullup to 3v3 on the CS pins of the drivers then.

kAdonis commented 5 years ago

As @comps wrote above, a pullup on CS is also not required. Before you make permanent changes to your hardware, I would suggest, you try it first with only one driver

klcjr89 commented 5 years ago

This is very confusing. MISO is what comps stated can be problematic, but it is already pulled up on the controller board.

kAdonis commented 5 years ago

We can only guess whats wrong, maybe its the CS-pullup, maybe the high current (or the low current from your E driver) You need to try things

klcjr89 commented 5 years ago

Are the LPC1769 chip pins configured as pull ups? Because, the CS pins of each driver go to the LPC1769 directly (via the EXP1 header) as per the diptrace file.

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.