Why is PE11 not a valid hardware PWM on an Octopus Pro?

Basic Information:

Printer Model:
Custom Trident-based
MCU / Printerboard:
Octopus Pro 1.1 Stm32h7
Host / SBC
Rasppi 4
klippy.log

klippy(4).log (35.6 KB)

Describe your issue:


I’m currently trying to use hardware PWM to control a 4-pin fan- it requires a 25khz pwm frequency to work, which is kind of unsuited for software PWM. All available fan ports are in use, so I turned to other ports on the octopus pro.

I identified PE11 as being a good candidate, having a JST header, a pull-up resistor, etc.
PS_ON is directly tied to PE11 on the MCU

However, when I try to use pe11 as a HW pwm port, I get the following error:

MCU 'mcu' shutdown: Not a valid PWM pin
Once the underlying issue is corrected, use the
"FIRMWARE_RESTART" command to reset the firmware, reload the
config, and restart the host software.
Printer is shutdown

I can use PB10 just fine- but it’s on the RGB header which is just a dupont header, I’d rather use a JST header. Also might eventually want RGB.

The source code appears to indicate that PE11 is suitable for use as a PWM port (linked) and it seems to match the datasheet’s timer definitions.

So, what gives?

It is on the mainline klipper: klipper/src/stm32/hard_pwm.c at master · Klipper3d/klipper · GitHub

But you use:

Starting Klippy...
Args: ['/home/zircon/klipper/klippy/klippy.py', '/home/zircon/printer_data/config/printer.cfg', '-I', '/home/zircon/printer_data/comms/klippy.serial', '-l', '/home/zircon/printer_data/logs/klippy.log', '-a', '/home/zircon/printer_data/comms/klippy.sock']
App Name: Kalico
Git version: 'v0.12.0-696-g9eac41f9'
Branch: bleeding-edge-v2
Remote: origin
Tracked URL: https://github.com/KalicoCrew/kalico
CPU: 4 core ?
Python: '3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]'
Start printer at Tue Nov 18 04:19:55 2025 (1763461195.3 14.4)
...
Loaded MCU 'mcu' 118 commands (Kalico v0.12.0-696-g9eac41f9 / gcc: (15:12.2.rel1-1) 12.2.1 20221205 binutils: (2.40-2+18+b1) 2.40)

The code at your commit.

Hope that helps.

2 Likes

No such luck unfortunately kalico has some modifications to this file that I guess I’ll look at, but it does include that pin definition

I’ll try for a minimal repro on klipper mainline.

The link that I gave you shows the exact state of the firmware at the git commit at which it has been compiled.
There is no PE11, and that is the reason why you got this error.

So, if it exists in the latest Kalico (you show me the main branch), you need to update to the latest and reflash your board with fresh firmware where it is included.

If it still doesn’t work after the update and reflash, please include the log.

Hope that helps.

jfyi:
The branch is the branch, probably it should be main.
v0.12.0 - latest tag
696 - commits since the latest tag
9eac41f9 - git commit hash prefix

1 Like

Ah, I didn’t understand what you were hinting at earlier.

I will say I’m a little surprised that these PWM configs weren’t added earlier- added in June of this year to mainline and July to kalico- I think that explains that, I’ll pull that into the branch I’m using and rebuild (bleeding-edge-v2, which is a bit clotted it seems….)

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.