Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ LDO Leviathan V1.2 (STM32F446ZE) #26463

Draft
wants to merge 37 commits into
base: bugfix-2.1.x
Choose a base branch
from

Conversation

meteyou
Copy link

@meteyou meteyou commented Nov 25, 2023

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

MotorDynamicsLab/Leviathan#2

@ellensp
Copy link
Contributor

ellensp commented Nov 25, 2023

Where are the marlin_LDO_LEVIATHAN_V1_2 files?
Would normally be in buildroot/share/PlatformIO/boards

@meteyou
Copy link
Author

meteyou commented Nov 25, 2023

@ellensp sry. I missed this file. I'm not very familiar with marlin. I added the file.

@ellensp
Copy link
Contributor

ellensp commented Nov 25, 2023

marlin_LDO_LEVIATHAN_V1_2 shows you have a MARLIN_LDO_LEVIATHAN_V1_2 directory, also missing
Should be in buildroot/share/PlatformIO/variants

@thisiskeithb
Copy link
Member

thisiskeithb commented Nov 25, 2023

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"?

image

@thisiskeithb thisiskeithb marked this pull request as draft November 25, 2023 12:45
@thisiskeithb thisiskeithb changed the title Add LDO Leviathan V1.2 Add LDO Leviathan V1.2 (STM32F446ZET6) Nov 25, 2023
@meteyou
Copy link
Author

meteyou commented Nov 25, 2023

@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 " 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.

@thisiskeithb
Copy link
Member

What's the trick to getting DFU to work? I followed these instructions, but I cannot connect to it with STM32CubeProgrammer via USB:

image

Connecting to the board with an ST-Link V2 works fine though.

@meteyou
Copy link
Author

meteyou commented Nov 25, 2023

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.

@thisiskeithb
Copy link
Member

thisiskeithb commented Nov 25, 2023

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.

@thisiskeithb
Copy link
Member

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.

@jmz52
Copy link
Contributor

jmz52 commented Nov 27, 2023

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.

@thisiskeithb
Copy link
Member

I rebased this PR on current bugfix-2.1.x & resolved merge conflicts due to the recently merged BlackBeezMini 3D board support.

@thisiskeithb
Copy link
Member

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

image

@meteyou
Copy link
Author

meteyou commented Dec 2, 2023

@thisiskeithb I asked JNP again to answer this question here. He is the developer of this board.

@JNP-1
Copy link

JNP-1 commented Dec 2, 2023

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

image

LDO Leviathan is correct because LDO is the manufacturer of this board and the sources are also on the LDO GitHub server.

@JNP-1
Copy link

JNP-1 commented Dec 2, 2023

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.

@thisiskeithb
Copy link
Member

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.

@JNP-1
Copy link

JNP-1 commented Dec 2, 2023

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.

@jmz52
Copy link
Contributor

jmz52 commented Dec 2, 2023

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

@JNP-1
Copy link

JNP-1 commented Dec 2, 2023

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 thisiskeithb changed the title Add LDO Leviathan V1.2 (STM32F446ZET6) Add LDO Leviathan V1.2 (STM32F446ZE) Dec 3, 2023
@meteyou
Copy link
Author

meteyou commented Dec 6, 2023

@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?

@thisiskeithb
Copy link
Member

thisiskeithb commented Dec 6, 2023

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 :
      |            ^~~~~~~~~

@thisiskeithb thisiskeithb force-pushed the feat/add-leviathan branch 2 times, most recently from 4135e06 to b5e151f Compare December 15, 2023 01:47
@thisiskeithb thisiskeithb added the Needs: Work More work is needed label Dec 15, 2023
meteyou and others added 25 commits August 30, 2024 07:56
BTT_TFT35_SPI_V1_0 & MKS_TS35_V2_0 require different pinouts
Signed-off-by: Stefan Dej <[email protected]>
Users can enable tach pins if they have fans with tach wires
PA1 / TH0 for bed
PA2 / TH1 for hotend
- Tachometer pins only work for extruders (for now), so drop extra *_FAN_TACHO_PIN defines
@thisiskeithb
Copy link
Member

I've rebased this PR to bring it up to date with current bugfix-2.1.x & resolve merge conflicts, so please update your local copy with the following before pushing additional commits:

git checkout feat/add-leviathan
git fetch origin
git reset --hard origin/feat/add-leviathan

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 #26463 (comment)).

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 3 times, most recently from 37d77d6 to aa44542 Compare September 28, 2024 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants