STM32duino on BTT Kraken?

Post here first, or if you can't find a relevant section!
Post Reply
kazoe
Posts: 2
Joined: Thu Jun 29, 2023 8:26 pm

STM32duino on BTT Kraken?

Post by kazoe »

Is it possible to program this board using arduino (STM32Duino)? The MCU on it is a STM32H723ZGT6 and I can see on the motherboard that it has SWD headers (right above the boot/reset buttons). So is it possible to program it using STM32duino with a ST-link v2 dongle? It is for a project driving multiple stepper motors / servo's and a LCD. (not a 3d printer).
bigtreetech-kraken-v1.0-3d-printer-motherboard-pin-600x600w.jpg
bigtreetech-kraken-v1.0-3d-printer-motherboard-pin-600x600w.jpg (81.63 KiB) Viewed 2093 times
A more detailed picture here: https://github.com/bigtreetech/BIGTREET ... .0-Pin.png
fpiSTM
Posts: 1944
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 108
Location: Le Mans
Contact:

Re: STM32duino on BTT Kraken?

Post by fpiSTM »

Hi,
in theory you could using the generic:
https://github.com/stm32duino/Arduino_C ... BT_H733ZGT
ag123
Posts: 1898
Joined: Thu Dec 19, 2019 5:30 am
Answers: 30

Re: STM32duino on BTT Kraken?

Post by ag123 »

I've been hunting for the SWD pins on this pretty complex board
https://github.com/bigtreetech/BIGTREET ... .0-Pin.png
those pins are next to that row of buttons, which in my guess among of them are probably boot0, reset etc.

there should be 2 ways to upload a firmware to this board
- SWD
you need at least a st-link v2 (or newer) dongle
https://www.st.com/en/development-tools/st-link-v2.html
https://www.adafruit.com/product/2548

- USB (DFU) update
for this the 'normal' button dance should be
- connect usb cable to pc/laptop and board (powering up the board if need be)
- press both reset and boot0
- hold boot0 release reset (i.e. set boot0)
- the board should drop into DFU (device firmware update) mode

for those 2 STM32 Cube programmer should be able to flash firmware into the chip
https://www.st.com/en/development-tools ... eprog.html

and like @fpiSTM mentioned, you could start with the 'generic' variant
and make a *new variant* (in the local copy of your source codes) for the board to run on the external crystal (HSE)
https://github.com/stm32duino/Arduino_C ... 28board%29
https://github.com/stm32duino/Arduino_C ... BT_H733ZGT

to run on the HSE a key task is to define the

Code: Select all

void SystemClock_Config(void)
you could look at some examples,
https://github.com/stm32duino/Arduino_C ... C5-L128C35

and do cross reference the ref manual for your chip (it is normally searchable on google or
on the product page for your chip in the documentation section)
https://www.st.com/en/microcontrollers- ... 723ze.html
https://www.st.com/resource/en/datashee ... h723ze.pdf
https://www.st.com/resource/en/referenc ... ronics.pdf
in particular the reset and clock control chapter
the clock setup for the H7 family is (a lot) more complicated than say the F4, G4, H5 series, but that there are features.
e.g. that board which I give as an example after working through that I noticed that it is feasible to vary the system clock independently of the IO e.g. spi, uart, etc clocks. this is 'very different' from the 'lower' series (e.g. f4, g4, h5 etc)
and in my 'example' I added a feature to select running the cpu at full speed and half speed. I noted that this is even feasible on a running board e.g. to flip / change the speeds dynamically), running at 1/2 speeds makes for a considerably cooler cpu temperatures.
I can't remember fully how I worked those things back then, so you would need to cross-reference the ref manual if you adapt those codes.

there is a python script to explore the various PLL clock multipliers, but that these are for the stm32f4, g4, h5 and similar families (it may help in h7 as well)
viewtopic.php?t=78
hope that helps
GonzoG
Posts: 491
Joined: Wed Jan 15, 2020 11:30 am
Answers: 36
Location: Prudnik, Poland

Re: STM32duino on BTT Kraken?

Post by GonzoG »

Without any problems. Marlin runs on it and uses stm32duino for STM32 based boards.
harrystyles1
Posts: 1
Joined: Thu Nov 07, 2024 4:42 am
Contact:

Re: STM32duino on BTT Kraken?

Post by harrystyles1 »

You can program the STM32H723ZGT6 using STM32Duino with an ST-Link v2 dongle. The SWD headers on the board allow for programming and debugging via the SWD interface.
Post Reply

Return to “General discussion”