====== BTT Manta M8P (USB) ====== Schrittweise Anleitung, um die BTT **Manta** Boards über **USB** in Betrieb zu nehmen. Diese Anleitung ist auf folgende Boards anwendbar: * Manta M8P V2.0 * Manta M8P V1.x * Manta M5P * Manta M4P ===== YouTube Video #90 ===== {{youtube>k8DmTrY2GgY?half}} \\ ===== Hinweise ===== * **SBC** bedeutet in der Anleitung **S**ingle **B**oard **C**omputer. Also meistens wohl ein Raspberry Pi. * Es wird davon ausgegangen, dass auf dem SBC Klipper und MainSail eingerichtet ist. * Ein Zugang zum SBC über SSH ist notwendig! * In dieser Anleitung wird das BTT CB1 Modul verwendet. Inbetriebnahme siehe hier: [[klipper_faq:sbcs:btt_cb1|BTT CB1]] * Die Manta Boards lassen sich ebenfalls mit einem Raspberry Pi CM (Compute Module) betreiben. Damit funktionieren auch die CSI und DSI Ports! ===== Stromversorgung ===== * Im Betrieb wird das Board mit 12V oder 24V versorgt (Anschluss POWER + -) * Das Board kann zum initialen Flashen alleine über den USB-C Port versorgt werden. Für diesen Fall muss der VUSB Jumper gesetzt werden! * Das Board lässt sich auch mit der normalen Stromversorgung (POWER Anschluss) flashen. * Für die Treiber gibt es einen extra Stromanschluss (HV, oder POWER MOTOR) * Nicht das Board mit 24V und dem USB-C Port zusammen betreiben! ===== Verkabelung ===== * [[klipper_faq:flash_guide:stm32h743:btt_manta_m8n_usb#stromversorgung|Stromversorgung]] über 24V / GND * **Eine extra USB Verkabelung ist nicht notwendig.** Der STM32 Controller ist auf dem Manta Board direkt über USB angebunden! ===== Bootloader sichern ===== Den Original Bootloader - falls man den überhaupt für etwas gebrauchen kann - findet man hier: * **Manta M8P V2.0** \\ https://github.com/bigtreetech/Manta-M8P/tree/master/V2.0/Firmware * **Manta M8P V1.x** \\ https://github.com/bigtreetech/Manta-M8P/tree/master/V1.0_V1.1/Firmware * **Manta M5P** \\ nicht verfügbar * **Manta M4P** \\ nicht verfügbar ===== DFU Modus ===== * Das Board in den DFU Modus bringen * Im Terminal auf Meldungen warten \\ ''dmesg -HW'' * Jetzt die **Boot0** Taste gedrückt halten, kurz die **Reset** Taste drücken und dann auch die **Boot0** Taste wieder loslassen. * Hinweis: Die Tasten befinden sich jeweils direkt in der Nähe des µControllers. * Das Board meldet sich mit ''**Product: DFU in FS Mode**'' \\ biqu@BTT-CB1:~$ dmesg -HW [Feb10 04:48] usb 2-1.4: USB disconnect, device number 3 [ +0.000558] gs_usb 2-1.4:1.0 can0: Couldnt shutdown device (err=-19) [ +0.632135] usb 2-1.4: new full-speed USB device number 4 using ehci-platform [ +0.216530] usb 2-1.4: not running at top speed; connect to a high speed hub [ +0.001484] usb 2-1.4: New USB device found, idVendor=0483, idProduct=df11, bcdDevice= 2.00 [ +0.000019] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ +0.000006] usb 2-1.4: Product: DFU in FS Mode [ +0.000006] usb 2-1.4: Manufacturer: STMicroelectronics [ +0.000004] usb 2-1.4: SerialNumber: 307734543231 * Die Meldung mag je nach Manta Board etwas variieren. Allerdings sollte dort immer was mit DFU und oder BOOTLOADER zu lesen sein. * ''STRG+C'' drücken, um die Meldungen zu beenden ===== Klipper flashen ===== > **Hinweis** \\ Wenn das Board mit USB betrieben wird, braucht es **keinen extra Bootloader**! * ''cd ~/klipper'' * ''make menuconfig'' * **Manta M8P V2.0** \\ [*] Enable extra low-level configuration options Micro-controller Architecture (STMicroelectronics STM32) ---> Processor model (STM32H723) ---> Bootloader offset (No bootloader) ---> Clock Reference (25 MHz crystal) ---> Communication interface (USB (on PA11/PA12)) ---> USB ids ---> () GPIO pins to set at micro-controller startup * **Manta M8P V1.x**, **Manta M5P**, **Manta M4P** \\ [*] Enable extra low-level configuration options Micro-controller Architecture (STMicroelectronics STM32) ---> Processor model (STM32G0B1) ---> Bootloader offset (No bootloader) ---> Clock Reference (8 MHz crystal) ---> Communication interface (USB (on PA11/PA12)) ---> USB ids ---> () GPIO pins to set at micro-controller startup * Klipper kompilieren \\ ''make -j4'' * Klipper flashen \\ ''dfu-util -R -a 0 -s 0x08000000:mass-erase:force -D ~/klipper/out/klipper.bin'' \\ biqu@BTT-CB1:~/klipper$ dfu-util -R -a 0 -s 0x08000000:mass-erase:force -D ~/klipper/out/klipper.bin dfu-util 0.9 Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc. Copyright 2010-2016 Tormod Volden and Stefan Schmidt This program is Free Software and has ABSOLUTELY NO WARRANTY Please report bugs to http://sourceforge.net/p/dfu-util/tickets/ dfu-util: Invalid DFU suffix signature dfu-util: A valid DFU suffix will be required in a future dfu-util release!!! Opening DFU capable USB device... ID 0483:df11 Run-time device DFU version 011a Claiming USB DFU Interface... Setting Alternate Setting #0 ... Determining device status: state = dfuIDLE, status = 0 dfuIDLE, continuing DFU mode device DFU version 011a Device returned transfer size 1024 DfuSe interface name: "Internal Flash " Performing mass erase, this can take a moment Downloading to address = 0x08000000, size = 28284 Download [=========================] 100% 28284 bytes Download done. File downloaded successfully dfu-util: can`t detach Resetting USB to switch back to runtime mode biqu@BTT-CB1:~/klipper$ * Das Ergebnis sollte sein ''File downloaded successfully'' ===== Port ermitteln ===== * ''dmesg -HW'' starten \\ [Feb12 09:26] usb 2-1.4: USB disconnect, device number 5 [ +0.346204] usb 2-1.4: new full-speed USB device number 6 using ehci-platform [ +0.230545] usb 2-1.4: New USB device found, idVendor=1d50, idProduct=614e, bcdDevice= 1.00 [ +0.000030] usb 2-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ +0.000010] usb 2-1.4: Product: stm32h723xx [ +0.000008] usb 2-1.4: Manufacturer: Klipper [ +0.000007] usb 2-1.4: SerialNumber: 1E0043001051313236343430 [ +0.001420] cdc_acm 2-1.4:1.0: ttyACM0: USB ACM device * Reset Taste am Board 1x drücken * Wir brauchen die Information mit **tty...** also in diesem Fall **ttyACM0** * ''STRG+C'' drücken, um die Meldungen zu beenden * Den zugehörigen Link ermitteln \\ ''ls -lR /dev/ | grep -v '\%%->%%\s../tty' | grep -e 'tty%%[[:%%alpha%%:]]%%' -e serial'' * Wir brauchen die Info unter ''/dev/serial/by-id:'' : \\ ''lrwxrwxrwx 1 root root 13 Feb 12 09:26 **usb-Klipper_stm32h723xx_1E0043001051313236343430-if00** -> ../../ttyACM0'' * Achte darauf das am Ende die gleiche tty Bezeichnung steht wie sie im vorherigen Schritt ermittelt wurde (hier also ttyACM0) * Was wir für die Konfig brauchen ist dann am Ende: \\ ''/dev/serial/by-id/usb-Klipper_stm32h723xx_1E0043001051313236343430-if00'' ===== kurzer Test ===== Ob das Board korrekt mit Klipper läuft, lässt sich mit folgendem Befehl schnell testen: \\ ''~/klippy-env/bin/python ~/klipper/klippy/console.py /dev/serial/by-id/usb-Klipper_stm32h723xx_1E0043001051313236343430-if00'' Der Pfad am Ende muss natürlich mit dem übereinstimmen was ihr im vorherigen Schritt ermittelt habt! Wenn ihr ein ''**connected**'' am Anfang des Textes seht, ist das Board richtig geflasht. \\ {{:klipper_faq:flash_guide:stm32g0b1:pasted:20231111-152555.png}} ===== Konfiguration ===== * Klipper stoppen \\ ''sudo systemctl stop klipper.service'' * ''cd ~/printer_data/config'' * Konfiguration laden * **Beispiel Konfiguration M8P V1.0** \\ ''wget https://raw.githubusercontent.com/bigtreetech/Manta-M8P/master/V1.0_V1.1/Firmware/Klipper/generic-bigtreetech-manta-m8p-V1_0.cfg -O printer.cfg'' * **Beispiel Konfiguration M8P V1.0 Voron** \\ ''wget https://raw.githubusercontent.com/bigtreetech/Manta-M8P/master/V1.0_V1.1/Firmware/Klipper/generic-bigtreetech-manta-m8p-v1_0-voron2.cfg -O printer.cfg'' * **Beispiel Konfiguration M8P V1.1** \\ ''wget https://raw.githubusercontent.com/bigtreetech/Manta-M8P/master/V1.0_V1.1/Firmware/Klipper/generic-bigtreetech-manta-m8p-V1_1.cfg -O printer.cfg'' * **Beispiel Konfiguration M8P V2.0** \\ ''wget https://raw.githubusercontent.com/bigtreetech/Manta-M8P/master/V2.0/Firmware/generic-bigtreetech-manta-m8p-V2_0.cfg -O printer.cfg'' * **Beispiel Konfiguration M5P** \\ ''wget https://raw.githubusercontent.com/bigtreetech/Manta-M5P/master/Firmware/Klipper/generic-bigtreetech-manta-m5p.cfg -O printer.cfg'' * **Beispiel Konfiguration M4P** \\ ''wget https://raw.githubusercontent.com/bigtreetech/Manta-M4P/master/Firmware/Klipper/generic-bigtreetech-manta-m4p.cfg -O printer.cfg'' * **Beispiel Konfiguration M4P Voron** \\ ''https://raw.githubusercontent.com/bigtreetech/Manta-M4P/master/Firmware/Klipper/generic-bigtreetech-manta-m4p-voron0.cfg -O printer.cfg'' * ''nano ~/printer_data/config/printer.cfg'' \\ [mcu] canbus_uuid: fa5ad324b369 * Unterhalb ''[mcu]'' die Zeile mit ''serial'' löschen oder auskommentieren * Unterhalb ''[mcu]'' die Zeile ''canbus_uuid'' entsprechend mit der ermittelten UUID von oben einfügen * Klipper starten \\ ''sudo systemctl start klipper.service'' ===== Klipper Update ===== * Klipper Dienst stoppen \\ ''sudo systemctl stop klipper.service'' * ''cd ~/klipper && make menuconfig'' * Die Einstellungen sind genauso wie im Kapitel [[klipper_faq:flash_guide:stm32f446:leviathan_v1.2_usb#klipper_flashen|Klipper flashen]] * ''make flash -j4 FLASH_DEVICE=/dev/ttyACM0'' * Wie man an den Port (hier ttyACM0) kommt, ist [[klipper_faq:flash_guide:stm32h743:btt_manta_m8n_usb#klipper_flashen|hier]] beschrieben * Am Ende kann es zu einem Fehler kommen. Davon nicht irritieren lassen. Wichtig ist diese Zeile: \\ ''File downloaded **successfully**'' * Klipper Dienst starten \\ ''sudo systemctl start klipper.service'' * Sollte sich das Board nicht melden, am besten den Drucker einmal stromlos machen und neu starten. **Fehler** ''Failed to flash to /dev/ttyACM0: Error running dfu-util'' Funktioniert nicht immer ... Wenn nicht dann das hier: * ''cd ~/klipper/scripts'' * ''python3 -c %%'%%import flash_usb as u; u.enter_bootloader(%%"%%/dev/ttyACM0%%"%%)%%'%%'' * ''dfu-util -R -a 0 -s 0x08000000:mass-erase:force -D ~/klipper/out/klipper.bin'' ===== Sonstiges ===== Diese Punkte sind nicht immer Bestandteil vom YouTube Video, aber nützlich 8-) ==== STM32 Temperatur ==== Der interne Temperatur Sensor des STM32 kann mit folgendem Konfig Schnibsel ausgelesen werden: [temperature_sensor Levi] sensor_type : temperature_mcu sensor_mcu : mcu ==== ST-Link (SWD) ==== Das Board verfügt über einen SWD Port. Mit einem entsprechenden ST-Link kann das Board auch direkt geflasht werden. {{:klipper_faq:flash_guide:stm32f446:pasted:20240123-192812.png}} ==== ADXL345 (Input Shaper) ==== Alle Manta Boards haben einen 8-poligen SPI Anschluss an dem z.B. ein ADXL345 Sensor für Input Shaper betrieben werden kann. Der 8 polige Anschluss ist bei allen Boards gleich beschaltet, lediglich die Konfiguration unterscheidet sich in Klipper etwas. ^ ADXL345 Pin ^ Manta M8P V2.0 ^ Manta M8P V1.x ^ Manta M5P ^ Manta M4P ^ Pin Nr Stecker ^ | GND | GND | GND | GND | GND Zeichen | 2, 8 | | VCC | 3.3 V | 3.3 V | 3.3 V | STM_3V3 | 7 | | CS | 345SPI-CS (PA15) | SPI2-CS (PC4) | SPI2-CS (PC9) | SPI_CS (PD9) | 3 | | INT1 | - | - | - | - | - | | INT2 | - | - | - | - | - | | SDO | 345SPI-MISO | MOT-MISO | LCDSD-MISO | SD-TF MISO | 6 | | SDA | 345SPI-MOSI | MOT-MOSI | LCDSD-MOSI | SD-TF MOSI | 5 | | SCL | 345SPI-SCK | MOT-SCK | LCDSD-SCK | SD-TF SCK | 4 | * Konfiguration (cs_pin & spi_bus anpassen!) \\ [adxl345] axes_map : x,y,z cs_pin : spi_bus : [resonance_tester] accel_chip : adxl345 probe_points : 150, 150, 20 # Center of your bed, raised up a little * **Manta M8P V2.0** \\ ''cs_pin : PA15 spi_bus : spi3a'' * **Manta M8P V1.x** \\ ''cs_pin : PC4 spi_bus : spi2'' * **Manta M5P** \\ ''cs_pin : PC9 spi_bus : spi2'' * **Manta M4P** \\ ''cs_pin : PD9 spi_bus : spi1'' * **Test** in der MainSail Konsole mittels \\ ''ACCELEROMETER_QUERY'' \\ Als Ergebnis sollte in etwa sowas kommen: \\ ''accelerometer values (x, y, z): -1110.308913, 1184.329507, 11414.822920'' * Sollte der Test folgenden Fehler bringen ist die Verkabelung falsch! \\ ''Invalid adxl345 id (got 0 vs e5)'' ===== Links ===== * Github Repo \\ **Manta M8P V2.0** https://github.com/bigtreetech/Manta-M8P/tree/master \\ **Manta M8P V1.x** https://github.com/bigtreetech/Manta-M8P/tree/master \\ **Manta M5P** https://github.com/bigtreetech/Manta-M5P/tree/master \\ **Manta M4P** https://github.com/bigtreetech/Manta-M4P/tree/master * Manual \\ **Manta M8P V2.0** https://github.com/bigtreetech/Manta-M8P/blob/master/V2.0/BIGTREETECH%20MANTA%20M8P%20V2.0%20User%20Manual.pdf \\ **Manta M8P V1.x** https://github.com/bigtreetech/Manta-M8P/blob/master/V1.0_V1.1/BIGTREETECH%20MANTA%20M8P%20V1.0%26V1.1%20User%20Manual.pdf \\ **Manta M5P** https://github.com/bigtreetech/Manta-M5P/blob/master/BIGTREETECH%20MANTA%20M5P%20V1.0%20User%20Manual.pdf \\ **Manta M4P** https://github.com/bigtreetech/Manta-M4P/blob/master/BIGTREETECH_MANTA_M4P_User_Manual.pdf * Schaltplan \\ **Manta M8P V2.0** https://github.com/bigtreetech/Manta-M8P/blob/master/V2.0/Hardware/BIGTREETECH%20MANTA%20M8P%20V2.0-SCH.pdf \\ **Manta M8P V1.x** https://github.com/bigtreetech/Manta-M8P/blob/master/V1.0_V1.1/Hardware/BIGTREETECH%20MANTA%20M8P%20V1.1-SCH.pdf \\ **Manta M5P** https://github.com/bigtreetech/Manta-M5P/blob/master/Hardware/BIGTREETECH%20MANTA%20M5P%20V1.0-SCH.pdf \\ **Manta M4P** https://github.com/bigtreetech/Manta-M4P/blob/master/Hardware/bigtreetech_manta_m4p_v2.1_220608_SCH.pdf * Bootlader Entry bei Bridge Mode \\ https://github.com/Klipper3d/klipper/blob/master/docs/Bootloader_Entry.md