What's new
VORON Design

Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members!

Manta M8P & BTT EBB SB22XX setup

Beaker

Member
The current documentation regarding getting these two parts working together from BTT is incomplete and user made info is scattered. I'm going to take a crack at fixing (some) of that.

I would recommend doing all of this configuration before installing it into your printer if you can, it will make things a bit easier.
This guide assumes that you have installed the OS on your CM4 or CB1 along with at least Klipper.

The hardware I'm using.
- Manta M8P v2.0 & CM4
- EBB SB2209 CAN v1.0 & EBB SB0000 CAN v1.0

I'm going to provide config details for other versions where I can find it, but I can't verify function as I don't have hardware to test. YMMV.
Note: Versions covered by this guide are v1.1 and v2.0 only. v1.0 doesn't have CAN bus headers direct on board.

Sources:

You will need an SSH client. I'm using MobaXterm for SSH, use your favourite.


Start with the EBB unplugged, we are going to flash the M8P first.

M8P Flashing
1) Clone Katapult (Formerly CanBoot) into your home directory
Code:
cd ~
git clone https://github.com/Arksine/katapult.git

2) Switch directories to Katapult and enter the make menu
Code:
cd ~/katapult/
make menuconfig

3) Configure as shown below for your M8P version.
V1.1V2.0
Micro-controller ArchitectureSTMicroelectronics STM32STMicroelectronics STM32
Processor modelSTM32G0B1STM32H723
Build Katapult deployment applicationDo not buildDo not build
Clock Reference8 MHz crystal25MHz crystal
Communication interfaceCAN bus (on PD12/PD13)CAN bus (on PD0/PD1)
Application start offset8KiB offset128KiB offset
CAN bus speed ***Actual number isn't really important, pick a number and use it for the rest of the config***250000 to 1000000250000 to 1000000
GPIO pins to set on bootloader entry( )( )
Support bootloader entry on rapid double click of reset button[*][*]
Enable bootloader entry on button (or gpio) state[ ][ ]
Enable status LED[ ][ ]

Quit and save

4) Build it
Code:
make clean
make

5) Switch directories to Klipper and enter the make menu
Code:
cd ~/klipper/
make menuconfig

6) Configure as shown below for your M8P version.
V1.1V2.0
Enable extra low-level configuration options[*][*]
Micro-controller ArchitectureSTMicroelectronics STM32STMicroelectronics STM32
Bootloader offset8KiB bootloader128KiB bootloader
Processor modelSTM32G0B1STM32H723
Clock Reference8 MHz crystal25MHz crystal
Communication interfaceUSB to CAN bus bridge (USB on PA11/PA12)USB to CAN bus bridge (USB on PA11/PA12)
CAN bus interfaceCAN bus (on PD12/PD13)CAN bus (on PD0/PD1)
CAN bus speed***Use same as first config******Use same as first config***
GPIO pins to set on bootloader entry( )( )

Quit and save

7) Build it
Code:
make clean
make

8) Install a jumper for the CAN bus resistor on the M8P
v1.1
v11.png

v2.0
V2.png

9) Put the M8P into DFU mode by holding BOOT0 and then pressing RESET

10) Verify DFU mode by checking USB devices
Code:
lsusb
You should see something similar to this:
Bus 001 Device 011: ID 0483:df11 STMicroelectronics STM Device in DFU Mode

If you don't see the device in DFU mode try to enter again, power cycle the board if you have to. If your ID number is different, you will need to copy it to the flash commands. (In my case it wasn't)

11) Flash Katapult
Code:
sudo dfu-util -a 0 -D ~/katapult/out/katapult.bin --dfuse-address 0x08000000:force:leave -d 0483:df11

You should see this output, the error at the end is normal:
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 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: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08000000, size = 4676
Erase [=========================] 100% 4676 bytes
Erase done.
Download [=========================] 100% 4676 bytes
Download done.
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status

12) Reset the M8P by pressing RESET then put it back into DFU mode by holding BOOT0 and then pressing RESET

13) Flash Klipper
v1.1
Code:
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08002000 -D ~/klipper/out/klipper.bin
v2.0
Code:
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08020000 -D ~/klipper/out/klipper.bin

You should see this output:
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 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: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08020000, size = 36112
Erase [=========================] 100% 36112 bytes
Erase done.
Download [=========================] 100% 36112 bytes
Download done.
File downloaded successfully

14) Reset the M8P again

15) Validate that the firmware was flashed sucessfully:
Code:
lsusb
You should no longer see the STMicreoelectronics device and should now see something like:
Bus 001 Device 015: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter

Post 1 of 2
 
EBB Flashing

***IMPORTANT: I have seen in several places that there is potential for some versions of the EBB to turn on the heater output while in DFU mode. Best to disconnect the heater until you are all done***


1) Switch directories to Katapult and enter the make menu
Code:
cd ~/katapult/
make menuconfig

2) Configure as shown below
Micro-controller ArchitectureSTMicroelectronics STM32
Processor modelSTM32G0B1
Build Katapult deployment applicationDo not build
Clock Reference8 MHz
Communication interfaceCAN bus (on PB0/PB1)
Application start offset8KiB offset
CAN bus speed***Use same as first config***
GPIO pins to set on bootloader entry( )
Support bootloader entry on rapid double click of reset button[*]
Enable bootloader entry on button (or gpio) state[ ]
Enable status LED[*]
Status LED GPIO PinPA13

Quit and save

3) Build it
Code:
make clean
make

4) Switch directories to Klipper and enter the make menu
Code:
cd ~/klipper/
make menuconfig

5) Configure as shown below
Enable extra low-level configuration options[*]
Micro-controller ArchitectureSTMicroelectronics STM32
Processor modelSTM32G0B1
Bootloader offset8KiB bootloader
Clock Reference8MHz crystal
Communication interfaceCAN bus (on PB0/PB1)
CAN bus speed***Use same as first config***
GPIO pins to set on bootloader entry( )

Quit and save

6) Build it
Code:
make clean
make

7) Prep the EBB by adding Jumpers to the USB_5V and 120R headers. If connected, disconnect the CAN bus cable.
ebb.png

8) Plug the EBB into the M8P using a USB C cable.

9) Put the EBB into DFU mode by holding BOOT and then pressing RESET

10) Verify DFU mode by checking USB devices
Code:
lsusb
You should see something similar to this:
Bus 001 Device 011: ID 0483:df11 STMicroelectronics STM Device in DFU Mode

If you don't see the device in DFU mode try to enter again, power cycle the board if you have to. If your ID number is different, you will need to copy it to the flash commands. (In my case it wasn't)

11) Flash Katapult
Code:
sudo dfu-util -a 0 -D ~/katapult/out/katapult.bin --dfuse-address 0x08000000:force:leave -d 0483:df11

You should see this output, again, the error at the end is normal:
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 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: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08000000, size = 4544
Erase [=========================] 100% 4544 bytes
Erase done.
Download [=========================] 100% 4544 bytes
Download done.
File downloaded successfully
Submitting leave request...
dfu-util: Error during download get_status

12) Reset the EBB by pressing RESET then put it back into DFU mode by holding BOOT and then pressing RESET

13) Flash Klipper
Code:
sudo dfu-util -a 0 -d 0483:df11 --dfuse-address 0x08002000 -D ~/klipper/out/klipper.bin

You should see this output:
dfu-util 0.11
Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 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: Warning: Invalid DFU suffix signature
dfu-util: A valid DFU suffix will be required in a future dfu-util release
Opening DFU capable USB device...
Device ID 0483:df11
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #0 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 1024
DfuSe interface name: "Internal Flash "
Downloading element to address = 0x08002000, size = 34024
Erase [=========================] 100% 34024 bytes
Erase done.
Download [=========================] 100% 34024 bytes
Download done.
File downloaded successfully

14) Reset the EBB again

15) Validate that the firmware was flashed sucessfully:
Code:
lsusb
You should no longer see the STMicreoelectronics device and should now see something like:
Bus 001 Device 015: ID 1d50:606f OpenMoko, Inc. Geschwister Schneider CAN adapter
Note: For my setup the EBB disappeared from the USB list, however this wasn't an issue in the end.

16) Disconnect the USB cable and remove the jumper from USB_5V

CAN bus config

1) Create a new file for the CAN bus settings
Code:
sudo nano /etc/network/interfaces.d/can0

2) Add the following lines, replace the #'s with the value you configured.
allow-hotplug can0
iface can0 can static
bitrate #######
up ifconfig $IFACE txqueuelen 1024

3) Save and close the new file and reboot the M8P

4) If everything has worked you should be able to query the CAN ID of the M8P
Code:
sudo ifup can0
Should give you an ouput of something like:
ifup: interface can0 already configured

Then run the query
Code:
python3 ~/katapult/scripts/flash_can.py -q
And you should see:
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: 86269e826cab, Application: Klipper
Query Complete

Record that UUID as you will need it for your printer.cfg (Don't use mine, it likely isn't the same as yours)
[mcu]
canbus_uuid: ########
canbus_interface: can0

5) Now connect the EBB with the CAN bus cable

6) Then run the query again
Code:
python3 ~/katapult/scripts/flash_can.py -q
This time you should see:
Resetting all bootloader node IDs...
Checking for Katapult nodes...
Detected UUID: 86269e826cab, Application: Klipper
Detected UUID: 68eb547daac9, Application: Klipper
Query Complete
If you don't see the second UUID you may need to reboot the M8P and run the query again, it should support hot-plugging but may have just decided that it doesn't want to.

Record the new UUID as you will need it for your printer.cfg as well. (Again, don't use mine, it likely isn't the same as yours)
[mcu EBBCan]
canbus_uuid: ########
canbus_interface: can0

Now you should be able to finish setting up your printer.cfg to use the new CAN bus IO. Happy printing!

A big thanks to fredrikasberg and Braxton Schafer who wrote the two guides I referenced.

Post 2 of 2
 
Last edited:
Top