Mks-Robin-Nano-Marlin2.0-Firmware icon indicating copy to clipboard operation
Mks-Robin-Nano-Marlin2.0-Firmware copied to clipboard

Printing pauses immediately after starting a print form SD card, unable to continue print

Open MB-Finski opened this issue 4 years ago • 13 comments

My printer is based on the MKS Robin Nano version used by Lotmaxx (they have their own silk screen on the PCB but I think it's v1.1 of the board and has a 3.5" TFT over FSMC).

The firmware uploaded without any issues and I even managed to get some good prints done over USB. However, printing from the SD card fails as soon as the TFT display is refreshed (typically the first major update after homing causes a fail). Over serial the typical error message is: 'unrecognized command "05"'. I think the read operation from the SD-card is compromized by the simultaneous update of the display. Maybe simultaneous reads from the sd-card (g-code) and flash is causing the issue? DMA related issue or pin conflict?

I tried slowing down the SD card clock and in addition slowed down the spi to no avail. Curiously, printing from SD card can be done successfully if it is initiated over USB (no display updates).

Has anyone else here experienced this bug? Any easy workarounds?

EDIT: I have the same issue with both the current master and the 2.0.5.3 release.

MB-Finski avatar Aug 04 '20 16:08 MB-Finski

Btw, I uploaded the "factory version" 2.0.3.4 MKS firmware and it doesn't have this same issue so I think I can confirm this is a bug (or misconfiguration of my config files).

MB-Finski avatar Aug 04 '20 22:08 MB-Finski

Hey. I have the same problem. MKS Robin Nano 1.2v. Have you defeated this problem?

doon3 avatar Aug 11 '20 19:08 doon3

Partially solved this problem: the gcode files must be placed directly in the SD cards, not in a folder.

doon3 avatar Aug 12 '20 08:08 doon3

Partially solved this problem: the gcode files must be placed directly in the SD cards, not in a folder.

For me, printing directly from the SD card root doesn't really help (I haven't even tried printing from anywhere else. There's something funky going on with the SPI communications and switching from one device to another (SD-card reader to flash memory) screws up the read operations from the SD card.

MB-Finski avatar Aug 12 '20 13:08 MB-Finski

Just following up on this issue: Compiled the latest available source (committed 2 days ago) and I can confirm that it still has this issue.

Printing stops sometimes before even the bed is heated. Sometimes the first line is printed. I tried enabling debugging messages over USB but it gave no error/debug messages. Occasionally the message "echo 'unrecognized command "05"" is printed over USB when this error happens but not every time.

Edit: Just as before, if the print is started over USB from the SD card, it runs just fine. I tried going through the menus while the print was going and had no errors so I'm not 100% that the error is related to reading data from flash but it may be something else.

MB-Finski avatar Sep 02 '20 07:09 MB-Finski

If anyone is reading these:

Some further updates on trying to narrow down the possible source of the issue. I disabled the LVGL GUI and used "FSMC_GRAPHICAL_TFT" with instead. That seemed to solve the issue (of course, now the graphics won't get loaded from the external flash all the time). So I think that narrows it down to the flash reads(/writes?) causing issues with the SD-card communication.

MB-Finski avatar Sep 03 '20 09:09 MB-Finski

I recently bought the Sainsmart Coreception 300 which also uses the MKS Robin Nano V1.2 board. It works fine with the dated standard firmware (which seems to be from the Creativity Elf), but I wanted to be able to use Marlin and its updated features. I was able to get Marlin built for the Robin board and TFT but when I print a model the printer pauses at the first G1 gcode command. I did some debugging and found its because the software thinks the filament has run out. I think this may also be the cause of some of the pauses described above. I was able to remove the filament from the filament sensor and then Marlin printed properly (with no other changes to the printer or the gcode). You could give that a try to see if you have the same problem I had. If so, here are the changes I made to the Marlin source configuration to fix it:

In the file Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h
    Change "#define MT_DET_2_PIN                      PE6" to
                 "//#define MT_DET_2_PIN                      PE6"
    Change "#define MT_DET_PIN_INVERTING        false" to
                 "#define MT_DET_PIN_INVERTING        true"

My printer only has one filament sensor (MT_DET_1_pin) so commenting out the define disables testing the empty MT_DET_2 sensor connections. Changing the detection assertion state provides correct filament detection function. Other printers using the MKS Robin Nano V1.2 may also need this change. Hope this helps.

forbin2575 avatar Nov 17 '20 19:11 forbin2575

I recently bought the Sainsmart Coreception 300 which also uses the MKS Robin Nano V1.2 board. It works fine with the dated standard firmware (which seems to be from the Creativity Elf), but I wanted to be able to use Marlin and its updated features. I was able to get Marlin built for the Robin board and TFT but when I print a model the printer pauses at the first G1 gcode command. I did some debugging and found its because the software thinks the filament has run out. I think this may also be the cause of some of the pauses described above. I was able to remove the filament from the filament sensor and then Marlin printed properly (with no other changes to the printer or the gcode). You could give that a try to see if you have the same problem I had. If so, here are the changes I made to the Marlin source configuration to fix it:

In the file Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h
    Change "#define MT_DET_2_PIN                      PE6" to
                 "//#define MT_DET_2_PIN                      PE6"
    Change "#define MT_DET_PIN_INVERTING        false" to
                 "#define MT_DET_PIN_INVERTING        true"

My printer only has one filament sensor (MT_DET_1_pin) so commenting out the define disables testing the empty MT_DET_2 sensor connections. Changing the detection assertion state provides correct filament detection function. Other printers using the MKS Robin Nano V1.2 may also need this change. Hope this helps.

Yes it works. Thanks. For mks robin anno v.2 board I did this:

  1. In the file Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_v2.h

Change #define MT_DET_2_PIN                      PE6  to
//#define MT_DET_2_PIN                      PE6
Change #define MT_DET_PIN_INVERTING        false to
#define MT_DET_PIN_INVERTING        true

After //#define MT_DET_2_PIN PE6 // LVGL UI FILAMENT RUNOUT2 PIN add: #define FIL_RUNOUT_PIN PA4

  1. In configuration.h
//#define FILAMENT_RUNOUT_SENSOR
#define FILAMENT_RUNOUT_SENSOR
//  #define FILAMENT_RUNOUT_SCRIPT "M600"
#define FILAMENT_RUNOUT_SCRIPT "M25"

Malderin avatar Nov 17 '20 20:11 Malderin

Yes, I can confirm these changes fix the issue. Is the line #define FIL_RUNOUT_PIN PA4 necessary, though?

MB-Finski avatar Nov 22 '20 13:11 MB-Finski

I left the //#define FILAMENT_RUNOUT_SENSOR option commented out, but the filament runout sensor works without that option enabled. Makes me wonder how. Maybe a defualt runout sensor logic turned off when you choose the FILAMENT_RUNOUT_SENSOR option. I was able to comment out the pins_MKS_ROBIN_NANO.H "//#define FIL_RUNOUT_PIN PA4" and it compiled successfully, so FIL_RUNOUT_PIN must be defined somewhere else. I just upgraded to a BTT SKR V1.4 Turbo board with the BTT TFT35 screen, so I can't quickly switch back to test your configuration.

forbin2575 avatar Nov 23 '20 01:11 forbin2575

@Malderin, on my system, it works out of the box, it won't print without filament. I had to rewire the connector through, but I think it's an issue with the manufacturer (Two Trees) who inverted the connection in there (they wired it initially so that it was open whatever a filament was present or not, so it was 100% useless). I do have FIL_RUNOUT_PIN defined to PA4 even if it's also defined in the STM32's header, because it was failing to compile at that time.

X-Ryl669 avatar Nov 26 '20 12:11 X-Ryl669

Dear all, I bought a Robin Nano V3 a month ago and I am experiencing the same problem, unable to print anything except from usb pc host. My setup does not incorporate filament sensor but I still tried everything mentioned above with no luck.

Does anyone have a solution?

ImmortalTeknik avatar Oct 11 '21 10:10 ImmortalTeknik

MT_DET_PIN_INVERTING

This was my issue, to the point i disconnected the filament out sensor bypass board and printing resumed. Now to fix the bed size issue with the BLTouch

mdunfee3016 avatar Jul 06 '22 15:07 mdunfee3016