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

CAN Klipper reserved pin problem EBB36 / Manta E3EZ #115

Open
cs301cs301 opened this issue Apr 14, 2024 · 27 comments
Open

CAN Klipper reserved pin problem EBB36 / Manta E3EZ #115

cs301cs301 opened this issue Apr 14, 2024 · 27 comments

Comments

@cs301cs301
Copy link

I have the problem that some of the specified pins are already reserved for CAN. This means that I cannot use the ADXL cs_pin: EBBCan:PB12. Klipper gives error, is reserved for CAN. The E3EZ uses PB12 and PB13 for CAN communication.
I also cannot use the heater_pin: EBBCan:PB13, also reserved for CAN.
So can I not use CAN in this board combination?

@Monra124
Copy link

I have the same problem, I have the ebb with usb communication plus the two power cables, when I turn it on it tells me that PIN PB13 is reserved for SPI2, have you found a solution?.

Thanks

@cs301cs301
Copy link
Author

I have the same problem, I have the ebb with usb communication plus the two power cables, when I turn it on it tells me that PIN PB13 is reserved for SPI2, have you found a solution?.

Thanks

I have now switched and use the CAN lines for USB. This works for the E3EZ + EBB36 combination. As for your problem, maybe a pin is named wrong? PB13 is actually the Heater pin on v1.2, SPI2 is PB12. Which boards are you using?

@Monra124
Copy link

I have the same problem, I have the ebb with usb communication plus the two power cables, when I turn it on it tells me that PIN PB13 is reserved for SPI2, have you found a solution?.
Thanks

I have now switched and use the CAN lines for USB. This works for the E3EZ + EBB36 combination. As for your problem, maybe a pin is named wrong? PB13 is actually the Heater pin on v1.2, SPI2 is PB12. Which boards are you using?

Exactly the same board, the E3EZ blanket.
With the fimrware installed from github.

Thanks for answering, I've also sent a ticket to BTT, let's see if they answer me

@cs301cs301
Copy link
Author

Then it can only be a config problem...
my configs:
config-20240430-173109.zip
my menuconfigs:
E3EZ
E3EZ_menuconfig
EBB36
EBB36_menuconfig

Firmware is Armbian 24.2.3 Bookworm with Linux 6.1.79-legacy-sun50iw9-btt

@Monra124
Copy link

Then it can only be a config problem... my configs: config-20240430-173109.zip my menuconfigs: E3EZ E3EZ_menuconfig EBB36 EBB36_menuconfig

Firmware is Armbian 24.2.3 Bookworm with Linux 6.1.79-legacy-sun50iw9-btt

Thanks.
I have done this exactly the same, but when I enter the ebb input I get the PIN error PB13 reserved SPI2

@Monra124
Copy link

I put an older version of the EBB CAN frimware, the error did not come out, I asked to update, it updates everything but the EBB, I downloaded the latest firmware_usb.bin version from the official repository and nothing.

What version of the EBB mcu do you have??

I currently have:
Your Klipper version is: v0.12.0-177-gaf149b47-dirty
MCU(s) which should be updated:
mcu: Current version v0.12.0-177-gaf149b47
EBBCan: Current version v0.12.0-9-gbb4711c5d

@Monra124
Copy link

Monra124 commented Apr 30, 2024

I updated the firm from menuconfig and the same error comes up again:
Captura de pantalla 2024-04-30 190239

With the configuration:
326878465-7cf9a6a5-43e9-4222-ace0-1c9b2b4a43f1

@cs301cs301
Copy link
Author

It seems that you still have the old "fire-hazardous" v1.0 of EBB36. PB13 is there for SPI2.

old
For the heater you have to use PB1 in the config.

This is no longer the case with the new v1.2.

new

@Monra124
Copy link

The ebb 36 can is v1.2.

The firm I install is the one they have on github v1.1 since it is the same as v1.2.

You won't have the firm you installed on yours to see if that's the problem.

Thank you very much for your time, I really appreciate it as I can't get it to work.

IMG_20240430_205507

@cs301cs301
Copy link
Author

That's right, I did not use the pre-built firmware. I followed the instructions for Canboot (now Katapult).

https://wiki.kb-3d.com/en/home/btt/voron/BTT_EBB36

@Monra124
Copy link

Ok, so you have it connected by CAN, instead of USB?

@cs301cs301
Copy link
Author

cs301cs301 commented Apr 30, 2024

No, as I said, I use USB. (https://lab4450.com/latest-projects/upgrade-can-ebb36-to-usb-toolhead/)
Initially yes, but that didn't work. I then flashed Klipper over it with USB settings. I just don't know whether any of the old firmware remains on it, because sometimes you specify a bootloader offset, sometimes not.
I don't really know why it doesn't work for you.
Have you also rebuilt and flashed Klipper for the EBB36 or is it still running the firmware from github? The E3EZ board sees the EBB, so you can simply flash Klipper in DFU mode there and don't need the pre built firmware.

@Monra124
Copy link

The board sees the EBB36.
I've tried building the firmware, I've even tried installing RATOS from its installer and the same thing always ends up happening to me, it's as if you always give me a v1.0 signature.

I will take a look at the information you have given me, thank you very much

@Monra124
Copy link

Monra124 commented May 1, 2024

Good morning.
There is no way, no matter what I do the same result, I built the firmware and flashed it in dfu mode, it did it correctly, the result is the same, it's like you always build with the v1.0 board pins.

@cs301cs301
Copy link
Author

Can you pls upload your Klipper configs for EBB & E3EZ?

@Monra124
Copy link

Monra124 commented May 1, 2024

Can you pls upload your Klipper configs for EBB & E3EZ?

I don't have everything done, as I first tried to link the E3EZ board with the EBB and then connect everything and finish the printer with its macros...
print_ebb.zip

shh

@cs301cs301
Copy link
Author

That's crazy, there is no double reference to PB13, so where is this error message coming from?
Just out of interest, have you tried entering PB1 for the heater instead of PB13? Not that it would work, but just to see if other error messages appear.

@cs301cs301
Copy link
Author

However, it appears that the board is faulty. Do you have the option of returning it?

@Monra124
Copy link

Monra124 commented May 2, 2024

I opened a ticket on the official BTT website where I bought it, but they don't answer

@nexus665
Copy link

nexus665 commented Aug 28, 2024

### [edit] Solved it - need to use software SPI for the ADXL! Solution on top, original post below[/edit]

Correct and working conf for the ADXL345 on the EBB toolheads - is a direct copy of the relevant section of the klipper/config/sample-bigtreetech-ebb-canbus-v1.2.cfg file that is packaged with Klipper. Who'd have thunk it :) It specifies software-SPI pins, not just CS/PB12:

[adxl345]
cs_pin: EBBCan:PB12
spi_software_sclk_pin: EBBCan:PB10
spi_software_mosi_pin: EBBCan:PB11
spi_software_miso_pin: EBBCan:PB2
axes_map: x,y,z

My config - manually created - only contained the cs_pin assignment, meaning it tried to use HW SPI, which seems to conflict. As soon as I added software SPI pin defs, it worked just fine.

On to finishing my build, hope it helps someone else not bash their head against the wall in frustration.
[/edit]

[Original post]
Hi,
I have the same problem - though I am using the EBB36 v1.2 with CAN (self-configured katapult bootloader, not precompiled binary).

As soon as I try to setup the ADXL345, it tells me that PB13 is reserved for spi2 and it cannot start. As above, I have only one reference to PB13, as in:

[heater extruder]heater_pin: EBB36:PB13

[adxl345] cs_pin: EBB36:PB12

Only when I comment out the adxl section will Klipper start and connect.

Otherwise, it gives the exact same error message of:

Pin PB13 is reserved for spi2

Katapult is freshly checked out and compiled, so is Klipper on both main and toolhead boards. Everything else seems to work fine, I didn't have the same problem with an EBB42 board on my other printer, no clue ATM what the problem is or how to fix it.

I will test using the default bootloader with vanilla klipper and whether that makes a difference, that's the only thing I can think of trying RN - any other ideas for possible solutions?

@Monra124
Copy link

Good morning, my problem was a faulty board, with its replacement it was easier to solve.

@duder56
Copy link

duder56 commented Sep 13, 2024

Good morning, my problem was a faulty board, with its replacement it was easier to solve.

when you say "faulty board" do you mean your main board, u2c, ebb36?

I have a Manta m8p v1.0, u2c v2.1, and ebb2240 and I'm getting the same error. I don't really see how a new board will fix this issue, as it would be in the coding?. The heater pin will always be PB13 for the heater, as this is how it appears in their schematics. I've tried starting from scratch twice now, it only worked the first install for about 10 min before the first reboot, then all I have been getting afterwards is the PB13 reserved problem. Quite frustrating that using all BTT products, would leave me without a working system...

@Monra124
Copy link

If it was the defective EBB36, I don't know why.

I couldn't tell you, just check that the firmware you introduce is the right one.

@duder56
Copy link

duder56 commented Sep 13, 2024

If it was the defective EBB36, I don't know why.

I couldn't tell you, just check that the firmware you introduce is the right one.

Ok thanks, at least that is the cheaper board to replace 😅

I've definitely made sure to have all the correct firmware, as it did work temporarily the first install. Then nothing was touched, aside from a reboot, and will not work. I've even gone as far as trying older firmware with fresh installs, and different issues arose with no communication to EBB bus, or the same pin error.

But I will try a new EBB board, thank you for the advice.

@nexus665
Copy link

Hi duder,

did you try the solution I posted a couple of messages above, enabling Software SPI instead of Hardware SPI by defining the

spi_software_sclk_pin: EBBCan:PB10
spi_software_mosi_pin: EBBCan:PB11
spi_software_miso_pin: EBBCan:PB2

not just

cs_pin: EBBCan:PB12

on its own? Worked for me...

Of course, you could have a defective board, but hey, worth a try before you buy a new one...

Regards

@Monra124
Copy link

Hi duder,

did you try the solution I posted a couple of messages above, enabling Software SPI instead of Hardware SPI by defining the

spi_software_sclk_pin: EBBCan:PB10 spi_software_mosi_pin: EBBCan:PB11 spi_software_miso_pin: EBBCan:PB2

not just

cs_pin: EBBCan:PB12

on its own? Worked for me...

Of course, you could have a defective board, but hey, worth a try before you buy a new one...

Regards

I'm sorry I can't help you more.
I hope you fix it

@duder56
Copy link

duder56 commented Sep 13, 2024

Hi duder,

did you try the solution I posted a couple of messages above, enabling Software SPI instead of Hardware SPI by defining the

spi_software_sclk_pin: EBBCan:PB10 spi_software_mosi_pin: EBBCan:PB11 spi_software_miso_pin: EBBCan:PB2

not just

cs_pin: EBBCan:PB12

on its own? Worked for me...

Of course, you could have a defective board, but hey, worth a try before you buy a new one...

Regards

I have a EBB SB2240, and in the sample CFG this is how it is written already. But thank you for the suggestion, obviously I would also like to try all avenues before buying a new board 🤭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants