STM32H7 pin connections for 3D printer main board

Share
STM32H7 pin connections for 3D printer main board

In order for Marlin firmware to work properly on my imaginary main board I'm building. Turns out there is a file in a Marlin GitHub repository that has pre set pins for certain popular main boards that use H7 as their brain. One of those is a BTT Kraken.

If you go to: Marlin/src/pins/stm32h7/pins_BTT_KRAKEN_V1_0.h, there are all the defined pins. It can be changed, however for the first time I don't think I have expertise to do it for this first board I'm making.

As for that file, I understand it up to a certain point. So I asked ChatGPT to explain it completely. For example:

define X_STEP_PIN PC14
define X_DIR_PIN PC13
define X_ENABLE_PIN PE6
define X_CS_PIN PD6

Those are for x axis motor control.

define TMC_SPI_MOSI PC8
define TMC_SPI_MISO PC7
define TMC_SPI_SCK PC6

Those are for controlling all the motor drivers. I still don't understand the protocol how those drivers are controller, so I need to explore that more.

define X_DIAG_PIN PC15
define Y_DIAG_PIN PF0
define Z_DIAG_PIN PF1

Those are for diagnostic I guess... ChatGPT says it's for sensorless homing. I have to admit I don't know that also works.

define TEMP_0_PIN PB1
define TEMP_1_PIN PC5
define TEMP_2_PIN PC4
define TEMP_3_PIN PA7
define TEMP_BED_PIN PB0

Those are for thermistor readings, so we can read temperatures. There are 5 of them, however my Ender uses only 2, so I might incorporate 3 into the board.

define HEATER_BED_PIN PF5
define HEATER_0_PIN PF6
define HEATER_1_PIN PF7
define HEATER_2_PIN PF9
define HEATER_3_PIN PF8

There are heater pins for controlling the heaters.

define FAN0_PIN PA0
define FAN1_PIN PA1
define FAN2_PIN PA2
define FAN3_PIN PA3
define FAN4_PIN PA4
define FAN5_PIN PA5
define FAN6_PIN PA6
define FAN7_PIN PE8

Fan pins, not even funny how many are those.

define SERVO0_PIN PE9
define Z_MIN_PROBE_PIN PG1

Those are for BlTouch. I would like to add BlTouch to my printer, then I don't need the Z limit switch.

define PS_ON_PIN PD10

I don't know what's going on with that last pin. AI says it's for controlling the main power supply with a relay. I don't know how would it work. Maybe if the PSU has multiple outputs, so that board can stay powered, and turn off the other output.