Skip to content

Conversation

@ZeyHex
Copy link

@ZeyHex ZeyHex commented Apr 17, 2024

Fixes the correct logic of the Klipper timer on GD32 series chips

Fixes the correct logic of the Klipper timer on GD32 series chips
@henrivdr
Copy link

@ZeyHex
Copy link
Author

ZeyHex commented Apr 19, 2024

@ZeyHex I guess the CR10 SE and Ender KE would benefit from the timer fix, right?

If you open the logs (klippy.log) and see something like this, then this PR is definitely for you:

image

@omahena
Copy link

omahena commented May 13, 2024

I would certainly like to see this fix merged and tested.

@ZeyHex This timer implementation brings the probe accuracy to about 0.002 and would dramatically improve if not fix all the first layer issues. I can't imagine anything more important than resolving this issue.

@henrivdr
Copy link

@ZeyHex I guess the CR10 SE and Ender KE would benefit from the timer fix, right?

If you open the logs (klippy.log) and see something like this, then this PR is definitely for you:

image

@ZeyHex would these warnings usually occur during normal printing, or only during probing only?
I saw a handful on the CR10 during normal use. Have not checked during probing yet.

@ZeyHex
Copy link
Author

ZeyHex commented May 14, 2024

@henrivdr they always occur, even just during idle time, if your timers on the MCU are broken.

@henrivdr
Copy link

I would certainly like to see this fix merged and tested.

@ZeyHex This timer implementation brings the probe accuracy to about 0.002 and would dramatically improve if not fix all the first layer issues. I can't imagine anything more important than resolving this issue.

@omahena is this improvement seen with the stock prtouchv2? Or does it only work with the full bulk-ADC rework?

@omahena
Copy link

omahena commented May 14, 2024

@omahena is this improvement seen with the stock prtouchv2? Or does it only work with the full bulk-ADC rework?

From what I understand this works with the stock PRTouch. @ZeyHex can confirm. I saw this issue debated on Klipper discourse group and am eagerly awaiting for it to be adopted to the official firmware.

This improves probing by an order of magnitude and makes the integrated probe fit for the advertised purpose.

pellcorp added a commit to pellcorp/creality that referenced this pull request Jun 24, 2024
pellcorp added a commit to pellcorp/creality that referenced this pull request Jun 24, 2024
@clrx25
Copy link

clrx25 commented Oct 12, 2025

Hi! I'm interested in testing this fix on a Creality K1C as well.
Based on my research, the firmwares (MCU, Nozzle, Bed) for this model should be configured as follows:

Board MCU Architecture Processor Model Bootloader Offset Communication Interface Baud Rate Serial Device GPIO pins to set at micro-controller startup
MCU (main) GD32 GD32F303xE 12 KiB Serial (USART1 PA2/PA3) 230400 /dev/ttyS7 PC7,PB0
Nozzle GD32 GD32F303xB 12 KiB Serial (USART1 PA2/PA3) 230400 /dev/ttyS1 !PB5,!PB6,!PB7
Bed GD32 GD32E230x8 12 KiB Serial (USART0 PA9/PA10) 230400 /dev/ttyS9

Could anyone who has already implemented this fix please verify or share the .config_mcu, .config_noz, and .config_bed files?
Alternatively, if the controllers and parameters are the same across the K1 series, and someone already has compiled versions of the three firmwares, that would work just fine as well.

@ZeyHex Would implementing only src/gd32/Makefile and src/gd32/gd32e23x_timer.c be sufficient, or are additional modifications required?

Thank you very much for the work that has been done!
Even though this is a relatively "old" topic, I think it is still very relevant to implement, since the issue of inconsistent Z probe measurements is well-known and frequently reported by many users.

In my search for a solution to this problem, I have already tried many ways to fine-tune the parameters in prtouch_v2 with limited results.
It is clear that the problem needs to be addressed elsewhere, and I believe this fix might be the final solution (reference).

In the meantime, I have a ticket open with Creality regarding this issue, and I am waiting for a response from their technical department.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants