Marlin
Marlin copied to clipboard
✨ LDO Leviathan V1.2 (STM32F446ZE)
Description
This PR adds a board config for the LDO Leviathan V1.2. There are still areas that need to be tested / expanded. I'm not sure if this config is correct for the "Limit Switches" section.
Requirements
- LDO Leviathan V1.2
Benefits
This PR will add support for the LDO Leviathan V1.2
Configurations
-
BOARD_LDO_LEVIATHAN_V1_2
Related Issues
Where are the marlin_LDO_LEVIATHAN_V1_2 files?
Would normally be in buildroot/share/PlatformIO/boards
@ellensp sry. I missed this file. I'm not very familiar with marlin. I added the file.
marlin_LDO_LEVIATHAN_V1_2 shows you have a MARLIN_LDO_LEVIATHAN_V1_2 directory, also missing Should be in buildroot/share/PlatformIO/variants
Thanks for the PR!
I had started on a pins file for this board, but noticed that there were discrepancies between the pins in the manual, Klipper configs, and physical board itself, so I was hoping to get those worked out. Do you know which is correct?
~~I also have some additions to the pins file like flash-based EEPROM emulation, fan tach pins, and some other tweaks that I'll get cleaned up and pushed shortly~~ Done.
For the naming of this board, it says "VORON Leviathan V1.2" and "<VORON logo> Designed in collaboration with <LDO's logo>" on it, so should the name be changed or should LDO remain as the "company"?
@thisiskeithb thx for all your fixes and completing the config!
I had started on a pins file for this board, but noticed that there were discrepancies between the pins in the manual, Klipper configs, and physical board itself, so I was hoping to get those worked out. Do you know which is correct?
The designer of this board (JNP) also sent me a few corrections. I'll check/fix them right now and push them. I have a board installed in my printer and i can also check some pin assignments, if needed.
For the naming of this board, it says "VORON Leviathan V1.2" and "<VORON logo> Designed in collaboration with <LDO's logo>" on it, so should the name be changed or should LDO remain as the "company"?
In my opinion, it is an "LDO Leviathan" that was developed for "VORON DESIGN", so I would keep the name as it is. But I also sent JNP a message about this question and i think he will answer this question here. Then we are on the safe side.
What's the trick to getting DFU to work? I followed these instructions, but I cannot connect to it with STM32CubeProgrammer via USB:
Connecting to the board with an ST-Link V2 works fine though.
i just press and hold the BOOT0
button and then press a short time the Reset
button. But i used only dfu-util to flash the board directly with the pi until now.
i just press and hold the BOOT0 button and then press a short time the Reset button.
~~Hmm. That doesn't work either.~~
~~Do you have a .bin file of the MCU as it was shipped (or can you dump a working copy)? I can try to re-flash it via ST-Link.~~
Scratch that. It's just very picky apparently.
thx for all your fixes and completing the config!
This PR is mostly ready, but we still need a proper board variant (buildroot/share/PlatformIO/variants/<variant>/*
). I tried using the Octopus variant with the same MCU, but that does not work.
Scratch that. It's just very picky apparently.
Floating PA10 (UART1 RX) might confuse bootloader and cause "serial" DFU mode instead of "USB" mode. Can be fixed by pull-up resistor or just by connecting USB to TTL serial converter.
I rebased this PR on current bugfix-2.1.x
& resolved merge conflicts due to the recently merged BlackBeezMini 3D board support.
In my opinion, it is an "LDO Leviathan" that was developed for "VORON DESIGN", so I would keep the name as it is. But I also sent JNP a message about this question and i think he will answer this question here. Then we are on the safe side.
Any updates on this? Even LDO calls this board the Voron Leviathan: https://twitter.com/LDOMOTORSJASON/status/1730761869575754071
@thisiskeithb I asked JNP again to answer this question here. He is the developer of this board.
In my opinion, it is an "LDO Leviathan" that was developed for "VORON DESIGN", so I would keep the name as it is. But I also sent JNP a message about this question and i think he will answer this question here. Then we are on the safe side.
Any updates on this? Even LDO calls this board the Voron Leviathan: https://twitter.com/LDOMOTORSJASON/status/1730761869575754071
![]()
LDO Leviathan is correct because LDO is the manufacturer of this board and the sources are also on the LDO GitHub server.
Scratch that. It's just very picky apparently.
Floating PA10 (UART1 RX) might confuse bootloader and cause "serial" DFU mode instead of "USB" mode. Can be fixed by pull-up resistor or just by connecting USB to TTL serial converter.
I don't think that should be a problem. The UART bootloader is only triggered when the RX pin receives 0x7F. No STM32 I have worked with so far has had a problem. Also other boards have no pullup resistor.
LDO Leviathan is correct because LDO is the manufacturer of this board and the sources are also on the LDO GitHub server.
Thanks for confirming, @JNP-1!
Can you help with https://github.com/MarlinFirmware/Marlin/pull/26463#issuecomment-1826390722 ?
This board isn’t usable with Marlin until the referenced files are provided.
LDO Leviathan is correct because LDO is the manufacturer of this board and the sources are also on the LDO GitHub server.
Thanks for confirming, @JNP-1!
Can you help with #26463 (comment) ?
This board isn’t usable with Marlin until the referenced files are provided.
I am in contact with meteyou for this.
No STM32 I have worked with so far has had a problem. Also other boards have no pullup resistor.
Personally run into this issue with F401CC and F411CE blackpill boards. No problems with USB DFU while FT232 is connected and complete lottery then PA10 is floating. Solved it with 10K pull-down resistor. Pull-up resistor or temporary jumper wire to connect PA10 to GND or 3V3 also worked.
https://3dtoday.ru/upload/posts/main/p3LNTz88Ovj7COv1Q0yM9HZ9Ylbc7KaDB9ECbPVS1CmnzW01Lw.jpg
No STM32 I have worked with so far has had a problem. Also other boards have no pullup resistor.
Personally run into this issue with F401CC and F411CE blackpill boards. No problems with USB DFU while FT232 is connected and complete lottery then PA10 is floating. Solved it with 10K pull-down resistor. Pull-up resistor or temporary jumper wire to connect PA10 to GND or 3V3 also worked.
https://3dtoday.ru/upload/posts/main/p3LNTz88Ovj7COv1Q0yM9HZ9Ylbc7KaDB9ECbPVS1CmnzW01Lw.jpg
Also the eval board STM32F446ZE from ST has no pullup/pulldown on the PA10. Could it be that it only occurs in conjunction with Marlin?
@thisiskeithb i uploaded some variant files. is it correct, that we need HAL_SD_MODULE_ENABLED
, when the board itself doesn't has a sdcard slot, but you can connect one via EXP?
is it correct, that we need
HAL_SD_MODULE_ENABLED
, when the board itself doesn't has a sdcard slot, but you can connect one via EXP?
I'm not sure. Using the BigTreeTech BTT002 as an example (STM32F407), it doesn't have an onboard SD card, but uses the SD from the LCD to update firmware and it doesn't have HAL_SD_MODULE_ENABLED
enabled.
You're still missing ldscript.ld
:
Warning! Cannot find linker script for the current target!
And it does not compile because PinNamesVar.h
is also missing:
/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src/stm32/low_power.c: In function 'LowPower_EnableWakeUpPin':
/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src/stm32/low_power.c:104:12: error: 'SYS_WKUP1' undeclared (first use in this function)
104 | case SYS_WKUP1 :
| ^~~~~~~~~
/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src/stm32/low_power.c:104:12: note: each undeclared identifier is reported only once for each function it appears in
/.platformio/packages/framework-arduinoststm32/libraries/SrcWrapper/src/stm32/low_power.c:114:12: error: 'SYS_WKUP2' undeclared (first use in this function)
114 | case SYS_WKUP2 :
| ^~~~~~~~~
ldscript.ld
& PinNamesVar.h
are still missing from /buildroot/share/PlatformIO/variants/MARLIN_LDO_LEVIATHAN_V1_2/
(see https://github.com/MarlinFirmware/Marlin/pull/26463#issuecomment-1843877063), but we're close 🙂
Last commit is a best guess for ldscript.ld
and PinNamesVar.h
.
The firmware now compiles & board boots.
Remaining Issue(s):
-
Analog pins are missing from the variant files (h/t to @ellensp for finding that!), so the board runs briefly before halting due to a MAXTEMP error. edit: I've added
BOGUS_TEMPERATURE_GRACE_PERIOD
topins_LDO_LEVIATHAN_V1_2.h
, so enable it & bump the value to get around this while debugging for now.I'm still working through how to correctly define these analog pins based on the pins listed under
PinMap_ADC[]
inPeripheralPins.c
, but haven't been successful. -
Need to verify: 2.2kΩ thermistor pullups means the only real option for users is to enable thermistors as type
1000
and set them up inConfiguration_adv.h
under the "Custom Thermistor 1000 parameters" heading. This is a Marlin limitation since we can't set the pullup value (only) with any thermistor like you can in Klipper.
Resolved Issue(s)
-
Garbled
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
screen due to aBOARD_ST7920_DELAY_*
issue. Fixed in f57b5f3. I also verifiedFYSETC_MINI_12864_2_1
(with NeoPixels) works. -
SPEAKER
causes a step timer conflict. Fixed in 2dc9055. -
Defining
*_FAN_TACHO_PIN
s enables them and causes "Fan speed fault" errors. Fixed in 8d1c4e3 by leaving them in the pins file, but commented out. -
Since this board has integrated TMC2209s & TMC5160s, I added a
TMC_USE_SW_SPI
to the pins file for the 5160s in fbb6c4b / e0514c7 to prevent a TMC CONNECTION ERROR. -
TMC RSENSE values are not sanity checked. Fixed in 4a16fd7
I'll keep pushing commits now that I have a working board to test on 😀
Thank you very much @thisiskeithb . Unfortunately, I haven't had enough time in the last few weeks due to the "pre-Christmas stress". I'll have a look at it in the next few days and try to flash a board.
Unfortunately, I haven't had enough time in the last few weeks due to the "pre-Christmas stress". I'll have a look at it in the next few days and try to flash a board.
No worries! Jason at LDO reached out to me tonight to see where I was with this, so I had a go at creating the missing variant files & now I'm working through everything. I'll update https://github.com/MarlinFirmware/Marlin/pull/26463#issuecomment-1867258809 with my findings.
I've rebased this PR on current bugfix-2.1.x
.
Also, my PR comments above are hidden on GitHub through all the commits, so be sure to expand the "Hidden Items / Load more..." text above for all comments / questions (particularly https://github.com/MarlinFirmware/Marlin/pull/26463#discussion_r1498716235).
I've rebased this PR on current bugfix-2.1.x
.
Also, my PR comments above are hidden on GitHub through all the commits, so be sure to expand the "Hidden Items / Load more..." text above for all comments / questions (particularly https://github.com/MarlinFirmware/Marlin/pull/26463#discussion_r1498716235).