Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BIGTREETRECH SKR V1.1 32bit LPC1768 mcu #12632

Closed
weed2all opened this issue Dec 12, 2018 · 311 comments

Comments

@weed2all
Copy link

commented Dec 12, 2018

Good morning!another question/new board for marlin...
After a search on Google I cross upon this board that in my vision has identical footprint as a MKS GEN L board only new is that have an LPC 1768 mcu as a Sbase and Smoothieboard..
Can marlin run this board?

https://s.click.aliexpress.com/e/ckQ3MWVS

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Dec 12, 2018

Hmm looks like another variation on a smoothieboard. It is different from the MKS Sbase as it seems to be using the same SPI channel for the LCD and the LCD SD card (unlike the SBase which uses different channels and instead shares an SPI channel between the two SD card connectors). This same SPI channel is bought out on to the LCD/SPI/SD header and is likely to be used when talking to TMC SPI devices. This may cause problems with some LCD displays. I'm not sure if there is a good pins.h file for this configuration so it may need a new one.

@weed2all

This comment has been minimized.

Copy link
Author

commented Dec 12, 2018

Yeah...but in my opinion this is better because of swapable drivers...i know that you can add external drivers to Sbase...but is not the same thing...

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Dec 12, 2018

I wasn't saying if it was better or worse, just pointing out that it is different from what is probably the closest match in terms of existing pins files and some of the changes that will probably be needed if anyone wants to get one working.

@dot-bob

This comment has been minimized.

Copy link
Contributor

commented Dec 16, 2018

I have one sitting here I plan on installing on a corexy. I just need to find time to get around to it. It should be simple to get up and running. If I get to it before someone else I will submit a pull request to add a new board type and a pins file.

@weed2all

This comment has been minimized.

Copy link
Author

commented Dec 16, 2018

That will be awsome!

@bipsendk

This comment has been minimized.

Copy link

commented Dec 20, 2018

Also looking at this board (actually just ordered one). Having it supported, hopefully also with support for 12864 RepRap Full Graphics LCD and MksMini would be awesome ....
As far as I can see, some pins are not the same as on the Smoothieboard (source: [https://www.biqu.equipment/collections/control-board-kits/products/bigtreetech-skr-v1-1-motherboard-32-bit-smoothieboard-arm-cpu-control-board-open-source-for-tft3-5-printer-pannel])

@bipsendk

This comment has been minimized.

Copy link

commented Dec 20, 2018

I just noticed, there are some minor issues regarding the picture with the pin assignments. Both EXP connectors are shown as EXP1 .... And 0.15 is apparently connected on both EXP1 and EXP2, and 0.16 only exists on the LCD/SD/SPI pin array (which I think is a bug in the picture)...

@XneddyX

This comment has been minimized.

Copy link

commented Dec 20, 2018

Hello i orderd some one to.... I'm in contact with The Dealer and i ask him about the Problems .. i will Report You...

@bipsendk

This comment has been minimized.

Copy link

commented Dec 21, 2018

I am not so familiar with the LCP1768 - but would it be possible to use e.g. the Y_MAX (P1_26) as (software) PWM output to control a BLtouch probe ?

@bipsendk

This comment has been minimized.

Copy link

commented Dec 21, 2018

Seems like some work already is in progress: #12689

@hectori4502

This comment has been minimized.

Copy link

commented Dec 23, 2018

@bipsendk

This comment has been minimized.

Copy link

commented Dec 23, 2018

other good board for marlin...?
REMRAM
https://youprintin3d.de/elektronik/open-source/1029/remram-v1.5-first-edition.html

Also more than 4 times the cost of SKR, and not with replacable stepsticks.
According to the description, that board is already supported by Marlin 2.0:

"Zur Zeit nur Marlinunterstützung V2.0"

@XneddyX

This comment has been minimized.

Copy link

commented Dec 24, 2018

This is the answere from BIQU BQ: "Hello friend.
The pin out photo is right.
You can see this video.
It can work with 12864LCD.
https://www.facebook.com/echo.li.520562/videos/226299174934140/?t=37"

@bipsendk

This comment has been minimized.

Copy link

commented Dec 25, 2018

This is the answere from BIQU BQ: "Hello friend.
The pin out photo is right.
You can see this video.
It can work with 12864LCD.

Well, checking with the pinout of the RepRap Discount Full Graphics LCD, it would mean that the LCD4 pin on EXP1 is connected to the SCK pin of EXP2..
Also, they pinout shown designates EXP1 and EXP2 on the PCB - but the descriptive text states 2 connectors named EXP1 - so some sort of typo definitively exists on their pinout reference...

I will check up on it once I receive the board, that I have ordered...

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Dec 25, 2018

As I said above I think this board shares a single SPI bus between the LCD display and the SD card attached to the LCD so it is probably correct that LCD4 (EXP1) and SCK(EXP2) are connected to the same pin.

@Nuttavoot

This comment has been minimized.

Copy link

commented Dec 25, 2018

I am not so familiar with the LCP1768 - but would it be possible to use e.g. the Y_MAX (P1_26) as (software) PWM output to control a BLtouch probe ?

I ask to Aliexpress store about how to connect a BLtouch, this is the answer "they can not be connected to use, because SKR does not have the appropriate port."

If someone can connect a BLtouch then I would like to order it.

@b0ssman

This comment has been minimized.

Copy link

commented Dec 27, 2018

According to the smoothieboard bltouch wiring you wire can wire the servo to 1.23, 2.4, 3.25 or 3.26
http://smoothieware.org/zprobe#bltouch-or-servo-retractable-touch-probe
on the SKR 3.25 and 3.26 are on the LCD/SD/SPI header so in theory it should work.

@b0ssman

This comment has been minimized.

Copy link

commented Dec 27, 2018

a i didnt see that they are using 3.25 and 3.26 for the lcd as well.
but 1.26 is also hardware pwm capable.
http://smoothieware.org/pwm-capable

@b0ssman

This comment has been minimized.

Copy link

commented Dec 27, 2018

i just ordered a SKR board. the price is unbeatable

@Nuttavoot

This comment has been minimized.

Copy link

commented Dec 28, 2018

a i didnt see that they are using 3.25 and 3.26 for the lcd as well.
but 1.26 is also hardware pwm capable.
http://smoothieware.org/pwm-capable

That smoothie board in the above link uses LCP1769, will it be same as LCP1768 ?

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Dec 28, 2018

The LPC1769 is just a carefully selected version of the LPC1768 that can run at a faster clock speed. So yes the pins are the same.

@Nuttavoot

This comment has been minimized.

Copy link

commented Dec 29, 2018

i just ordered a SKR board. the price is unbeatable

Keep us posted for progress.

@talldonkey

This comment has been minimized.

Copy link

commented Jan 2, 2019

@bipsendk

This comment has been minimized.

Copy link

commented Jan 2, 2019

Personally I prefer native support in the main branch - but as far as I can see from the commits, it is more or less already done. I am still waiting for my board, will test the bugfix-2.0 as soon as I can put it on the board (I have already tried to test-compile it in VScode without issues).

@040medien

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2019

I was able to get the latest Marlin 2.0 running on the SKR, but my REPRAP_DISCOUNT_SMART_CONTROLLER is not working. The backlight is coming on, but it's blank. It's not the contrast, so I'm wondering if the pins.h is correct for this combination. Did anyone manage to get the same combination to work?

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2019

@040medien it is not the same board but this one is pretty similar to the Sbase in many respects, so you may want to check out this thread (if you have not done so already) #12796

@040medien

This comment has been minimized.

Copy link
Contributor

commented Jan 5, 2019

Thanks for the pointer @gloomyandy - I made a mistake in my post - I'm actually trying to use the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER, but no luck so far. According to the post you linked to, this should work.

Edit: Never mind, the display was broken. I tried it with an otherwise identical display and it worked.

@Miroslav57

This comment has been minimized.

Copy link

commented Jan 6, 2019

Hello 040 medien . I bought a skr v1.1 to and I have a reprap discount lcd from my Anet A6 but I can't made it work. The backlight isn't coming.

@040medien

This comment has been minimized.

Copy link
Contributor

commented Jan 6, 2019

Is that a standard RRD GLCD? If so, try flipping the cables 180 degrees. It's easiest if you carefully pull off the black plastic receptacles on either the board or the LCD.

@VanessaE

This comment has been minimized.

Copy link

commented Feb 25, 2019

Linux, yes. dmesg shows that the OS receives no indication that the volume has been cycled/"inserted" when I issue M22.

Here's such a session:

Log output
[  +0.000021] cdc_acm 3-3:1.0: ttyACM0: USB ACM device
[  +1.315985] usb 3-3: new full-speed USB device number 80 using ohci-pci
[  +0.199036] usb 3-3: New USB device found, idVendor=1d50, idProduct=6029
[  +0.000002] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000002] usb 3-3: Product: Marlin USB Device
[  +0.000001] usb 3-3: Manufacturer: marlinfw.org 
[  +0.000001] usb 3-3: SerialNumber: 1.0000000000
[  +0.002072] cdc_acm 3-3:1.0: ttyACM0: USB ACM device
[  +0.002108] usb-storage 3-3:1.2: USB Mass Storage device detected
[  +0.000358] scsi host9: usb-storage 3-3:1.2
[  +1.023545] scsi 9:0:0:0: Direct-Access     Marlin   Re-ARM SDCard 01 1.0  PQ: 0 ANSI: 0 CCS
[  +0.000423] sd 9:0:0:0: Attached scsi generic sg3 type 0
[  +0.009547] sd 9:0:0:0: [sdd] 245760 512-byte logical blocks: (126 MB/120 MiB)
[  +0.010010] sd 9:0:0:0: [sdd] Write Protect is off
[  +0.000003] sd 9:0:0:0: [sdd] Mode Sense: 03 00 00 00
[  +0.010019] sd 9:0:0:0: [sdd] No Caching mode page found
[  +0.000004] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[  +0.262982] scsi_io_completion: 2 callbacks suppressed
[  +0.000005] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000003] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: 2 callbacks suppressed
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000004] buffer_io_error: 2 callbacks suppressed
[  +0.000001] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.013975] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000001] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000002] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000002] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.013992] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000003] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.013990] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000003] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.000017] ldm_validate_partition_table(): Disk read failed.
[  +0.013995] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000004] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.013971] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000003] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.013979] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000003] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.014001] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000003] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.000016] Dev sdd: unable to read RDB block 0
[  +0.013973] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000003] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.013992] sd 9:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Sense Key : Not Ready [current] 
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 Add. Sense: Medium not present
[  +0.000002] sd 9:0:0:0: [sdd] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  +0.000001] blk_update_request: I/O error, dev sdd, sector 0
[  +0.000002] Buffer I/O error on dev sdd, logical block 0, async page read
[  +0.028003]  sdd: unable to read partition table
[  +0.020013] sd 9:0:0:0: [sdd] Attached SCSI removable disk
[Feb25 17:37] sd 9:0:0:0: [sdd] 245760 512-byte logical blocks: (126 MB/120 MiB)
.

Near the end, I issued M22 but it did nothing. Linux made one attempt to read the partition table, and failed. Therefore, there's nothing for Linux to mount, manually or otherwise. I can only assume that Windows just keeps re-trying as long as the volume appears to be present.

The problem as I see it, is that Marlin both auto-mounts the card for itself and makes it visible to the OS, on bootup of the SKR. If Marlin is going to auto-mount the card, fine, but then it should not make it visible to the OS at all.

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

Did you try manually mounting the device? It looks like your dmesg log is reporting that a 126MB disk has been detected (see the last few entries in the log), probably after you issued the M22. Certainly linux can see the card reader device (which is basically what Marlin exports) and is correctly reporting that no media is present after Marlin has mounted the device. Think of it as what happens if you have a card reader and then remove the card from it. The m22 is the equivalent if inserting the card back into it.

I've just tried it on my Linux system and was able to mount the drive no problem after issuing the m22...

[2793509.026904] usb 1-1.3: new full-speed USB device number 43 using dwc_otg
[2793509.160709] usb 1-1.3: New USB device found, idVendor=1d50, idProduct=6029
[2793509.160863] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[2793509.160872] usb 1-1.3: Product: Marlin USB Device
[2793509.160880] usb 1-1.3: Manufacturer: marlinfw.org
[2793509.160887] usb 1-1.3: SerialNumber: 1.0000000000
[2793509.172678] cdc_acm 1-1.3:1.0: ttyACM0: USB ACM device
[2793509.179794] usb-storage 1-1.3:1.2: USB Mass Storage device detected
[2793509.181257] scsi host0: usb-storage 1-1.3:1.2
[2793510.200221] scsi 0:0:0:0: Direct-Access     Marlin   Re-ARM SDCard 01 1.0  PQ: 0 ANSI: 0 CCS
[2793510.209396] sd 0:0:0:0: [sda] 15351808 512-byte logical blocks: (7.86 GB/7.32 GiB)
[2793510.212289] sd 0:0:0:0: [sda] Write Protect is off
[2793510.212311] sd 0:0:0:0: [sda] Mode Sense: 00 00 00 00
[2793510.214838] sd 0:0:0:0: [sda] Asking for cache data failed
[2793510.214859] sd 0:0:0:0: [sda] Assuming drive cache: write through
[2793510.236610] sd 0:0:0:0: Attached scsi generic sg0 type 0
[2793511.925001] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[2793511.925050] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x2 [current]
[2793511.925081] sd 0:0:0:0: [sda] tag#0 ASC=0x3a ASCQ=0x0
[2793511.925101] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
[2793511.925116] print_req_error: I/O error, dev sda, sector 0
[2793511.925133] Buffer I/O error on dev sda, logical block 0, async page read
[2793511.930604] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[2793511.930647] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x2 [current]
[2793511.930662] sd 0:0:0:0: [sda] tag#0 ASC=0x3a ASCQ=0x3
[2793511.930694] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
[2793511.930708] print_req_error: I/O error, dev sda, sector 0
[2793511.930723] Buffer I/O error on dev sda, logical block 0, async page read
[2793511.935454] sd 0:0:0:0: [sda] tag#0 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
[2793511.935474] sd 0:0:0:0: [sda] tag#0 Sense Key : 0x2 [current]
[2793511.935486] sd 0:0:0:0: [sda] tag#0 ASC=0x3a ASCQ=0x3
[2793511.935501] sd 0:0:0:0: [sda] tag#0 CDB: opcode=0x28 28 00 00 00 00 00 00 00 08 00
[2793511.935510] print_req_error: I/O error, dev sda, sector 0
[2793511.935556] Buffer I/O error on dev sda, logical block 0, async page read
[2793511.935668]  sda: unable to read partition table
[2793511.941560] sd 0:0:0:0: [sda] Attached SCSI removable disk
[2793615.961099] sd 0:0:0:0: [sda] 15351808 512-byte logical blocks: (7.86 GB/7.32 GiB)
[2793615.982897]  sda: sda1
pi@octopi:~ $ sudo mount /dev/sda1 /mnt
pi@octopi:~ $ ls /mnt
Android                     S3_e3dfanduct.gcode
FIRMWARE.CUR                S3_Extrusion_Test.gcode
FOUND.000                   S3_FGSC_front.gcode
FOUND.001                   S3_k010xyzCalibration_cubepg.gcode
kfactor2.gcode              S3_Rubber_Duck.gcode
kfactor.gcode               S3_sbase-cover.gcode
LOST.DIR                    S3_sbase-support1.gcode
pgkfactor.gcode             S3_sbase-support2.gcode
plkfactor.gcode             S3_SwitchCover.gcode
S3_3DBenchy.gcode           s3_test.gcode
S3_3DBenchypg.gcode         S3_Tolerance Test V2 Final Makersmuse.gcode
S3_BCGens.gcode             S3_xyzCalibration_cube.gcode
S3_BCTreks.gcode            steptest.gcode
S3_bike-light-cover2.gcode  System Volume Information
pi@octopi:~ $

Really this is no different to what will happen when you issue an M21 followed by an M22 and Linux seems to handle that fine (at least I've not seen any reports of problems). But if you don't like the way that Marlin handles the boot situation then it should be easy to change the line I pointed out above.

Oh and one other thing is that if the SD card you are using is the one that comes with the SKR board then I would try something else as I've seen a number of people have issues with using that card via USB.

@VanessaE

This comment has been minimized.

Copy link

commented Feb 26, 2019

Did you try manually mounting the device

Again, the host can't read the partition table, so there is no volume to mount. And yes, it's the card that came with the SKR, and is the only one I have available right now.

But, just to be sure, I tried again. Disabled that LCD option, booted, got the same sequence of messages as before. Issued M22 and one line appeared:

[Feb25 19:58] sd 9:0:0:0: [sdd] 245760 512-byte logical blocks: (126 MB/120 MiB)

The card is visible in /proc/partitions:

8 48 122880 sdd

...and that's it. The OS did not try to re-read the partition table, so there's no sdd1 entry. 5 minutes later, it's still sitting there.

If it's considered an unacceptable situation to have two devices try to mount the same filesystem, and Marlin insists on mounting the card at bootup, then under no circumstances should Marlin make it visible to the host at the same time, until after M22.

Furthermore, with the SKR still sitting in that "halfway" state,

vanessa@rainbird:~$ sudo partprobe /dev/sdd
[sudo] password for vanessa: 
Error: Error opening /dev/sdd: No medium found
@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

I've just dug out the card that came with my SKR and it shows similar problems to those you are seeing. None of the other SD cards I have (I tried five others of various sizes and makes) have any sort of issue. The same thing happens with my Windows system, the card is not accessible after an m22. I'm not sure what the actual specification of the card is (it has a very small capacity) it could be old/slow, perhaps there is some issue with the way that Marlin accesses it. I would suggest you try another card when you get chance.

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

Oh and with this card I can reproduce the problem when using a display an m21 followed by m22 results in the drive not re-appearing under windows. No other card I have does this. Whatever is going on it does not seem to need Marlin to mount the card at boot time to trigger it.

@VanessaE

This comment has been minimized.

Copy link

commented Feb 26, 2019

I dug out another SD card I just remembered I had. It's a Transcend 32 GB class 10 card, and reads as such when I M21, M22. Same problem as with the stock one, though -- no re-read of the partition table.

Did you actually try your tests with no LCD configured/enabled in the firmware?

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

Yep with no LCD defined and every other card I have except the one that came with the SKR it works fine for me. The dmesg output I posted earlier was with this configuration. You can see the initial error with reading the partition table (because the media is no longer available), then at the end of the log you can see that after the M22 the card size is displayed, device sda1 is created and this device can be mounted. I'm not sure why my system rereads the partition table, but yours does not. But there are obviously differences in the two systems. You can see in the traces that how the sense data is presented is different (yours displays the sense data in text mine in hex). I'm using octopi 15.1 which has a kernel version of 4.14.34-v7+. What are you running?

With your 32GB card. If you define a display (or comment out the line I pointed you at earlier), so that the card does not get mounted at boot time by Marlin, what happens if you then use M21 followed by M22? Is the card mountable again after the M22 in this case?

@VanessaE

This comment has been minimized.

Copy link

commented Feb 26, 2019

I'm running Debian 9.8, kernel 4.9.0. With a display defined, and using the 32GB card:

Log output
--> Power-up

[ +38.638176] usb 3-3: new full-speed USB device number 102 using ohci-pci
[ +0.195091] usb 3-3: New USB device found, idVendor=1d50, idProduct=6029
[ +0.000003] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ +0.000001] usb 3-3: Product: Marlin USB Device
[ +0.000001] usb 3-3: Manufacturer: marlinfw.org
[ +0.000001] usb 3-3: SerialNumber: 1.0000000000
[ +0.002046] cdc_acm 3-3:1.0: ttyACM1: USB ACM device
[ +0.002089] usb-storage 3-3:1.2: USB Mass Storage device detected
[ +0.000441] scsi host9: usb-storage 3-3:1.2
[ +1.031488] scsi 9:0:0:0: Direct-Access Marlin Re-ARM SDCard 01 1.0 PQ: 0 ANSI: 0 CCS
[ +0.000638] sd 9:0:0:0: Attached scsi generic sg3 type 0
[ +0.009316] sd 9:0:0:0: [sdd] 61863936 512-byte logical blocks: (31.7 GB/29.5 GiB)
[ +0.010004] sd 9:0:0:0: [sdd] Write Protect is off
[ +0.000003] sd 9:0:0:0: [sdd] Mode Sense: 03 00 00 00
[ +0.009996] sd 9:0:0:0: [sdd] No Caching mode page found
[ +0.000004] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[ +3.626197] sdd: sdd1
[ +0.046004] sd 9:0:0:0: [sdd] Attached SCSI removable disk

--> My desktop environment (XFCE) auto-mounted sdd1 and opened it in a file manager (Thunar).

[ +11.061584] FAT-fs (sdd1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.

--> Issued M21

[Feb26 04:33] VFS: Dirty inode writeback failed for block device sdd1 (err=-5).

--> Issued M22

[Feb26 04:34] sd 9:0:0:0: [sdd] 61863936 512-byte logical blocks: (31.7 GB/29.5 GiB)

...and then, nothing. sdd1 does not re-appear.

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

So you are using an older kernel, no idea if that has anything to do with the differences. You should probably fix the errors on the SD card by running fsck, so that we have a good base line. With a display enabled what happens if you boot Marlin, unmount the drive from linux (eject it or whatever), M21 then then M22. That is really the safe workflow. Though really the system should be able to cope with just having the drive disappear after all there is nothing stopping the user from simply removing it.

Though I am a little confused I thought that you had originally said that with a display defined things were working for you?

@VanessaE

This comment has been minimized.

Copy link

commented Feb 26, 2019

You should probably fix the errors on the SD card by running fsck,

Don't mind those errors - the result is the same either way. Been there, checked that. But, I went ahead and sorted them out and tried again, to no avail.

Though I am a little confused I thought that you had originally said that with a display defined things were working for you?

Yes. I don't print from SD, so I hadn't had occasion to use the M21/M22 commands until you mentioned them. In other words, the on-board SD is only useful to me as a place to put firmware updates, especially since I've only just gotten this thing going enough to print from USB (using my A4988's, which do quite well, incidentally).

what happens if you boot Marlin, unmount the drive from linux (eject it or whatever), M21 then then M22.

It does this:
[ +48.971093] usb 3-3: new full-speed USB device number 107 using ohci-pci
[  +0.223043] usb 3-3: New USB device found, idVendor=1d50, idProduct=6029
[  +0.000003] usb 3-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000002] usb 3-3: Product: Marlin USB Device
[  +0.000001] usb 3-3: Manufacturer: marlinfw.org 
[  +0.000001] usb 3-3: SerialNumber: 1.0000000000
[  +0.002068] cdc_acm 3-3:1.0: ttyACM1: USB ACM device
[  +0.002103] usb-storage 3-3:1.2: USB Mass Storage device detected
[  +0.000459] scsi host9: usb-storage 3-3:1.2
[  +1.011475] scsi 9:0:0:0: Direct-Access     Marlin   Re-ARM SDCard 01 1.0  PQ: 0 ANSI: 0 CCS
[  +0.000541] sd 9:0:0:0: Attached scsi generic sg3 type 0
[  +0.009439] sd 9:0:0:0: [sdd] 61863936 512-byte logical blocks: (31.7 GB/29.5 GiB)
[  +0.010000] sd 9:0:0:0: [sdd] Write Protect is off
[  +0.000003] sd 9:0:0:0: [sdd] Mode Sense: 03 00 00 00
[  +0.009973] sd 9:0:0:0: [sdd] No Caching mode page found
[  +0.000005] sd 9:0:0:0: [sdd] Assuming drive cache: write through
[Feb26 05:40]  sdd: sdd1
[  +0.045995] sd 9:0:0:0: [sdd] Attached SCSI removable disk

[ +33.546702] sd 9:0:0:0: [sdd] 61863936 512-byte logical blocks: (31.7 GB/29.5 GiB)
[ +0.044005] sdd:

Though really the system should be able to cope with just having the drive disappear after all there is nothing stopping the user from simply removing it.

And in fact, it behaves fine in my PC's card reader. Plug in the 32GB card, let it mount and open the folder, then pull the card out without properly unmounting it... the PC naturally throws an error (one of those useless ones where some programmer didn't bother with human readability). Plug the card back into the PC's reader, the PC doesn't complain, it just mounts it and works fine.

Now if I do that using the SKR's onboard slot, without using M21/M22, thus treating the onboard slot as if it were a generic card reader, the PC doesn't notice that the card was removed, nor that it was re-inserted. I guess something scans the entire directory tree at the start, so all directories and files do show up (it has a bunch of music on it). Of course, the PC can't actually read any of them once the card's back in, nor would I expect it to.

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

If you only want it for firmware then just comment out this line:
https://github.com/MarlinFirmware/Marlin/blob/bugfix-2.0.x/Marlin/src/Marlin.cpp#L1064
and don't define a display. Without that line Marlin will not attempt to mount the drive (I've just checked this).

 #if ENABLED(SDSUPPORT) && DISABLED(ULTRA_LCD)
    card.beginautostart();
  #endif

remove/comment out the card.beginautostart(); line.

So I assume that when you unmount the drive and then do m21/m22 the drive is still not usable? Does the sdd1 device exist?

For me if I unmount the drive before doing m21/m22 then everything is fine and I can remount the drive. If I do not unmount the drive, then following M21 the drive is still mounted and visible (but it is set into a read only error state), if I then use m22 then I can unmount the drive and remount it and it works fine. Similarly if I leave the drive mounted then do m21, then unmount the linux drive and then do m22 everything seems to work and I can remount the drive no problem. So basically for me things work pretty much as expected (as they do when using Windows).

As a final test I pulled out an old laptop that runs Ubuntu (14.04 I think!), with that and a display defined a file explorer window pops up on Marlin boot (as expected), if I use that to unmount the drive and then do an M21/M22 then after the M22 command a new file explorer window pops up. So again things are doing what I would expect.

Sorry I think I've taken this pretty much as far as I can at the moment. I have no easy way of running the same version of linux as you and I'm not able to reproduce the problem you are seeing with the versions of Linux I do have available. Perhaps there is some sort of bug/issue with the particular version you are using? I'm really not sure what is going on.

@VanessaE

This comment has been minimized.

Copy link

commented Feb 26, 2019

If you only want it for firmware then just comment out this line:

I don't intend to do that, because sooner or later I'm sure I'll find reason to print from SD, but you're totally missing the point.

So I assume that when you unmount the drive and then do m21/m22 the drive is still not usable? Does the sdd1 device exist?

As I said, sdd1 does not exist after M21/M22, whether or not a display is defined.

Sorry I think I've taken this pretty much as far as I can at the moment.

The solution is painfully obvious to me: whatever Marlin is doing to make the onboard SD visible and mountable to the PC when a display that I don't even have is defined, it should do precisely the same without one. I simply do not see the confusion here.

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

Let's take a step back here. I'm trying to help you and I don't think I'm missing the point.

I have already given you a way to get Marlin without a display to behave the same way as Marlin with a display. Comment out that one line. Then when Marlin boots you will have your SD card.

But that will not solve the issue of what happens following an M21/M22. From your reports it seems that for some reason the SD card is not seen correctly in this situation. Correct me if I am wrong but that will still be a problem for you?

I assume that the "obvious solution" is that after an M22 we should just do whatever Marlin is doing when it boots with a display? But in this situation it presents a totally new USB composite device. It is not possible to do that when you perform an M21/M22 as that will also disconnect the other half of the composite device which is the USB serial interface. Most people would not find that an acceptable solution.

@VanessaE

This comment has been minimized.

Copy link

commented Feb 26, 2019

Let's take a step back here. I'm trying to help you and I don't think I'm missing the point.

My point is this is behaving in a completely unintuitive and inconsistent manner.

What does an external display have to do with an on-motherboard SD card that's accessed through a different set of hardware lines?

I have already given you a way to get Marlin without a display to behave the same way as Marlin with a display. Comment out that one line. Then when Marlin boots you will have your SD card.

And what happens the next time I want to update? THAT's why I don't go editing the code, even to change one line. Sooner or later, that one-line change won't work anymore.

But that will not solve the issue of what happens following an M21/M22. From your reports it seems that for some reason the SD card is not seen correctly in this situation. Correct me if I am wrong but that will still be a problem for you?

For now, whether M21/M22 work doesn't matter to me, since I print via USB, but it's gonna matter to someone, and soon, because the SKR isn't that old of a board, and it appears to be in high demand. I can't be the only person for whom this doesn't work.

I assume that the "obvious solution" is that after an M22 we should just do whatever Marlin is doing when it boots with a display?

No, M21/M22 are a whole different matter, and I only care about bootup behavior right now. Marlin should just boot up without mounting the onboard SD card if there's no display defined, just as it does if there is an LCD defined and connected, with an SD card inserted. In other words, treat the two SD card methods as identical at bootup.

What happens after bootup is a completely different issue and is not what I'm complaining about.

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2019

If you want to change the way that Marlin handles the SD card on boot without a display, then you should create a new issue just for that and you will have to get @thinkyhead to agree that such a change makes sense. Or just go ahead and create the PR and have the discussion that way. That issue is not specific to this board.

The thing is that Marlin will mount the SD card in an LCD based reader most of the time. The only reason you are not seeing that is because in this case no pin is defined that can detect if an SD card is present in the reader. If such a pin was defined and there was an SD card in the reader then Marlin would mount it, just like it is mounting the SD card with no display defined. Yes it is inconsistent but arguably it is the case of a display with no SD detect defined that is the odd one out.

For me the M21/M22 problem is a more important one. But as I said I can't reproduce that at the moment and so far it seems to be specific to your setup.

@VanessaE

This comment has been minimized.

Copy link

commented Feb 26, 2019

Well if it's all about the lack of a detect line, then sure, the focus should be on making M21/M22 work properly. I can accept that.

@ManuelMcLure

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2019

Looks like the 1.3 version is now available for pre-order: https://www.aliexpress.com/item/Presale-BIGTREETECH-SKR-V1-3-Control-Board-32-Bit-CPU-Smoothieboard-MKS-GEN-L-GEN-V1/32981807406.html.

It looks like the general GPIO pin connector originally labeled "LCD/SD/SPI" is now dedicated to running the TMC drivers - unfortunately the documentation on the sale page doesn't say which processor pins correspond in case you want to use them as GPIO. I don't use TMC so would rather have the GPIO for RGB lights and PS_ON_PIN.

@fape

This comment has been minimized.

Copy link

commented Mar 3, 2019

@VanessaE

This comment has been minimized.

Copy link

commented Mar 3, 2019

@ManuelMcLure that's not a pre-order. In fact, that's sold out. The entire first run of boards - without driver modules - was gone from that listing within just minutes of the release (someone likely just bought the entire lot, minus a couple of orders that others got in just in time, just to resell somewhere else).

I managed to grab one from one of BigTreeTech's other store listings (they posted several on their Facebook group).

@ManuelMcLure

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2019

@fape Thanks for the link. Unfortunately unlike the SKR 1.1 wiring diagram the 1.3 diagram doesn't specify what processor pins correspond to which connector pins. For example, which connector pins correspond to the "special pins" at the end of the pins_BIGTREE_SKR_V1.3.h file? I just wish Bigtree had documented this better for those of us with "less standard" setups.

@ManuelMcLure

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2019

Ah - I was looking at those special pins to be available, but it looks like they're in use by the on-board SD and the LCD connectors, so not useful as GPIO as far as I can tell. I'm still unclear as to the pins labeled XST/YST/etc. (the ones just to the left of the EXT2 connector) - those don't seem to have pin numbers unless they are the same ones used by XCS/YCS/etc.
I'm just looking for 5 pins I can use for GPIO (RGBW and PS_ON_PIN) on a simple build replacing a RAMPS with A4988 drivers and a 12864 LCD.
I suppose I can always get a board and probe with my multimeter...

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2019

I think you will find that the YST/XST pins are pin headers to allow the bridging of the TMC DIAG pins to the end stop inputs for use with sensorless homing etc. I think the XCS/YCS do not really refer to a single header but are documenting the chip select pins that are probably connected via the jumper pins under each stepper driver.

Unfortunately although there are many more pins in use on this version of the board, these extra pins are not very easily accessible. If you are not using TMC2130 drivers then I suspect that you could use the various chip select pins but you may have to use a jumper wire that goes under one or more of the driver boards to get to it.

@gloomyandy

This comment has been minimized.

Copy link
Contributor

commented Mar 3, 2019

Oh and before this discussion gets any longer it may make sense to create a new issue for the 1.3 board, as this one is already pretty long and confusing!

@Lightpainter1

This comment has been minimized.

Copy link

commented Mar 3, 2019

Don't guess. Come an join our BIQU SKR User Group @

https://www.facebook.com/groups/247860246136776/264178671171600/?comment_id=265284987727635&reply_comment_id=265344611055006&notif_id=1551645728266379&notif_t=group_comment

We have all available documentation online here, and would sincerely like your opinions.

Michael E. Burk
Admin

@Black6spdZ

This comment has been minimized.

Copy link

commented Mar 3, 2019

@Lightpainter1 that would be great if FB allowed non-members to view.. I left that sh!t site a year ago and will never rejoin.

@Lightpainter1

This comment has been minimized.

Copy link

commented Mar 3, 2019

Well FB doesn't, you can however turn off notifications. And your expertize would be most welcome.

@dylanshock

This comment has been minimized.

Copy link

commented Mar 4, 2019

Hello anyone try to use e3d pt100 amplifier board on skr 1.1? For work the board Need +5v gnd and free analogic PIN ..

@antonvier

This comment has been minimized.

Copy link

commented Mar 6, 2019

@weed2all weed2all closed this Mar 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
You can’t perform that action at this time.