Hi, I managed it, to flash my Duet 3 6HC with Klipper. I wanted to use it, because all other printers in my farm use klipper and I dont want to use different config languages, even that I worked with duet for years.
For my actual custom design I decided to use an old Duet 3, which wasnt used before, because the driver 1 is defect. Since you can activate them in RRF driver by driver, I thought it would work with klipper too. After some hours of research I know think that this is the problem for my error mentioned in the caption above.
Is there any way to declare only 5 of the 6 drivers? The printer.cfg doesnt seem to make that happen and is still trying to adress it. Or is there another reason that could be the problem? The fusion is fine and should not be the problem. The power supply is old, but there is nothing else on it - only the board.
Im not sure what you mean. In stepper_x Im defining the step, dir and enable pins. In the general tmc stepper x Im defining chain position and the cs pin, which is the same for all drivers. The config you linked is doing it exactly like I did Maybe you can explain a bit more what you mean?
But why? Im not sure what youre doing there. The PD17 Pin is the chipselect pin. Since all drivers are using the same Pin I cant just pd 17. But klipper doesnt know which drive “slot0” is - does it? when putting output of the cs pin to 1 im activating the driver. Since the driver is defect that doesnt work.
When having a look in the klippy log file, I can see, that he is already having problems with “virtual enable” the drivers. May this have something to do with my problem?
Configured MCU ‘mcu’ (1024 moves)
Enabling TMC virtual enable for ‘stepper_x’
TMC stepper_x failed to init: Unable to write tmc spi ‘stepper_x’ register GLOBALSCALER
Enabling TMC virtual enable for ‘stepper_y’
TMC stepper_y failed to init: Unable to write tmc spi ‘stepper_y’ register GLOBALSCALER
Enabling TMC virtual enable for ‘stepper_z’
TMC stepper_z failed to init: Unable to write tmc spi ‘stepper_z’ register GLOBALSCALER
Enabling TMC virtual enable for ‘extruder’
TMC extruder failed to init: Unable to write tmc spi ‘extruder’ register GLOBALSCALER
Starting heater checks for heater_bed
Starting heater checks for extruder
If you have a look at the link you posted you can compare both configurations. I just changed the pins so that the driver 1 pins are not used anymore.
If you have a look at the klippy log you can see, that he is only trying to contact the steppers configurated in the printer.cfg. But there the driver 1 is not used. Is there a deeper part of the firmware for example, where he is trying to contact all drivers and get this error?
Maybe switching back to RRF is the only way to do it.
Today I did also something else: I changed the kinematics to none and just configurated an extruder. This should result in just one motor is used.
In the log file I can now see the “cant write to GLOBALSCALER”-error again, but there is also a lot more mcu traffic than before.
Interesting is, that he is shutting down when I try to move the motor, but the error
Configured MCU ‘mcu’ (1024 moves)
TMC extruder failed to init: Unable to write tmc spi ‘extruder’ register GLOBALSCALER
Is coming right after startup. Question for me is, if there is any other configuration file, that is trying to reach all drivers implemented for that board.
Even with changing the pins to different drivers I dont get any good results. I´m now giving up, since I need this board. Otherwise I maybe would try to fix it.
Is there anybody who wrote this stuff and knows how klipper is using the tmc configuration? There are some more questions about the enable and cs pins. Maybe they are the problem in any way?
To check if the defect driver may interrupt the miso mosi lines with unwanted high or low, I started desoldering it. Sadly that didnt change anything. I also started to change the printer.cfg to SPI1 instead of usart1 and used cs PIN PC25. I cant even change the error message. That said I think the problem needs to be with klipper firmware. Since there are many people with the same problem with faulty drivers I think they are adressing the drivers in another way than RFF.
The global scaler register is used for maxmimum current, so maybe RFF is just not trying to write there…? I dont really know where to start searching in the software. maybe somebody has a hint for me.
When tmc5160 drivers are daisy chained, Klipper sends commands to “driver0” (chain_position: 1) which relays the commands to “driver1” (chain_position: 2), which relays the commands to “driver2” (chain_position: 3), etc.
So, if you don’t want to use “driver0” then you must not reference a chain_position: 1 anywhere in your config.
If “driver0” is not functioning correctly, then it may not be able to relay commands and responses to “driver1” (and thus all other drivers in the chain). I guess it depends on how the chip is malfunctioning.
If you desolder “driver0” then it definitely wont be able to forward commands on to “driver1”.
I think the problem is, that Klipper in some way is using a daisy chain type of communication with the given example config before. That seems to be the reason why Klipper can’t be used with one or more defect drivers on the board.
If you have a look at RFF and the board layout at Duet3-Mainboard-6HC/Duet3_Mainboard_6HC_v1.01/Duet3_MB_Schematic_v1.01.pdf at master · Duet3D/Duet3-Mainboard-6HC · GitHub you can see that it seems like only SDO and SDI are used in daisy chain. Not to forget SPI and Step/Dir are both Connected. So it seems like there are truly more ways to talk to the drivers. Sadly I’m not sure if this is having influence on the global scaler register since this is the only error I can get from Klipper.
This said I think the solution would be to find a way using Klipper Just like RFF is doing. Maybe it’s kind of ignoring the SDOs from the driver before or just stop trying to write to global scaler. Maybe you get a high or low state at some point RFF doesn’t care but Klipper does.
To find answers to this question you need to dive deep into at least the Klipper Code to understand which way it is going. Otherwise its hard trying to understand the whole code without any references.