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

hc32f460: Add app address 0x10000 #6269

Merged
merged 1 commit into from
Aug 13, 2023
Merged

Conversation

falk-h
Copy link
Contributor

@falk-h falk-h commented Jun 24, 2023

This is required for the Anycubic Kobra 2. See this definition in Anycubic's newly released source code.

Required for the Anycubic Kobra 2.

Signed-off-by: Falk Höppner <falk@hoppner.se>
@github-actions
Copy link

github-actions bot commented Jul 8, 2023

Thank you for your contribution to Klipper. Unfortunately, a reviewer has not assigned themselves to this GitHub Pull Request. All Pull Requests are reviewed before merging, and a reviewer will need to volunteer. Further information is available at: https://www.klipper3d.org/CONTRIBUTING.html

There are some steps that you can take now:

  1. Perform a self-review of your Pull Request by following the steps at: https://www.klipper3d.org/CONTRIBUTING.html#what-to-expect-in-a-review
    If you have completed a self-review, be sure to state the results of that self-review explicitly in the Pull Request comments. A reviewer is more likely to participate if the bulk of a review has already been completed.
  2. Consider opening a topic on the Klipper Discourse server to discuss this work. The Discourse server is a good place to discuss development ideas and to engage users interested in testing. Reviewers are more likely to prioritize Pull Requests with an active community of users.
  3. Consider helping out reviewers by reviewing other Klipper Pull Requests. Taking the time to perform a careful and detailed review of others work is appreciated. Regular contributors are more likely to prioritize the contributions of other regular contributors.

Unfortunately, if a reviewer does not assign themselves to this GitHub Pull Request then it will be automatically closed. If this happens, then it is a good idea to move further discussion to the Klipper Discourse server. Reviewers can reach out on that forum to let you know if they are interested and when they are available.

Best regards,
~ Your friendly GitIssueBot

PS: I'm just an automated script, not a human being.

@KevinOConnor
Copy link
Collaborator

@SteveGotthardt - any comments on this?

-Kevin

Copy link

@AleksB27 AleksB27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully tested on Kobra2.

@ABDViciousOne
Copy link

Successfully tested on Kobra2.

What settings did you use for building the firmware

@falk-h
Copy link
Contributor Author

falk-h commented Jul 31, 2023

What settings did you use for building the firmware

Micro-controller Architecture (Huada Semiconductor HC32F460)  --->
Communication interface (Serial (PA15 & PA09))  --->
Application Address (0x10000)  --->
Clock Speed (200 MHz)  --->

I'm not entirely sure that these settings are correct (especially the clock speed), but these are the last settings I used before I went back to the stock firmware. I ended up going back because I wasn't able to figure out which pins to use to talk to the stepper drivers over UART.

Anycubic's source code seems to run the stepper drivers in standalone mode, without UART communication, but they have only released the source code for v2.9.3 of the firmware at the time of writing. v3.0.2 has linear advance and input shaping, which iirc can't work without talking to the stepper drivers over UART, but the source for v3.0.2 isn't released yet. I'm currently waiting for them to release that source before I continue trying to get Klipper to work on my printer.

@AleksB27
Copy link

AleksB27 commented Aug 1, 2023

I used 168mhz speed
Steppers are in stand-alone mode 100% - I checked all GPIO pins of controller and can provide a map (expect 3-4pins I was not able to found). UART communication is made in parallel meaning there is no UART :)
Also all stepper drivers share same enable pin - PC3/ADC1_IN13. Also there are some GPIO that have unsoldered resistors/jumpers, but I didn't track them
PA2/ADC1_IN2 Unused R87 (unsoldered)
PA3/ADC1_IN3 Unused R100, 125, R126 (unsoldered)
PB3 Unused R127 (unsoldered)

@falk-h
Copy link
Contributor Author

falk-h commented Aug 1, 2023

@AleksB27 I think I had figured out most of the pins by looking at Anycubic's source (and some trial and error), but I'd very much appreciate a map :)

@AleksB27
Copy link

AleksB27 commented Aug 2, 2023

Sure
Trigorilla Pro B CPU pinout.xlsx

@KevinOConnor KevinOConnor merged commit 4292136 into Klipper3d:master Aug 13, 2023
1 check passed
@KevinOConnor
Copy link
Collaborator

Thanks.

-Kevin

@Coldarn
Copy link

Coldarn commented Nov 28, 2023

Successfully tested on Kobra2.

@AleksB27 Could you share the full printer.cfg you used? I'm trying to get my Kobra 2 working with Klipper but so far have been stumped by many unfamiliar settings. Here's the incomplete starting point I'm working from: https://drive.google.com/file/d/1pM1Jqvb7u2QWBPVBMnJPBVq0YINx-xez/view

@Coldarn
Copy link

Coldarn commented Nov 29, 2023

Never mind, I found this tutorial included the configs I needed; here's a direct link to them for posterity: https://drive.google.com/file/d/1b9xOY9zppay2TfVpMH0pkc6hTFPuR4Y5/view?usp=drive_link

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.

None yet

5 participants