Skip to content

Conversation

@karcherm
Copy link

I replaced the AT32F415 by an AT32F435 on my SFRKC30AT3 Gotek, and lost the rotary encoder functionaliy after flashing the firmware. It turns out that there is no detection of the KC30 boards in the AT32F435 firmware, because "PF7 doesn't exist". Yet PF6 does exist, and that pin seems to be able to be used for KC30 detection as well (as long as the user doesn't press select on power-up). This patch implements KC30 Rev.1 detection in the F435 firmware.

Assuming the comment is correct that pre-KC30 boards have
PF6/PH2 grounded, this allows to use the rotary encoder on
KC30 Rev 1 boards that have been "upgraded" to a AT32F435.
@keirf
Copy link
Owner

keirf commented Nov 4, 2025

You can't safely put a 435 chip on an SFRKC30AT3 board as pin 36 is NC on the board but 435 requires that pin connected to VDD. It's not a configuration I will support in mainline firmware.

@karcherm
Copy link
Author

karcherm commented Nov 4, 2025

Thanks for considering the merge request!

That's a fair point. I probably should add a bodge wire (and possibly a decoupling capacitor) to pin 36. And when I do that mod, I can likely add a pull-up to pin 4 (if that pin is not used on the SFRKC30AT3) to make it look more like the KC30 Rev.2. It will still not work with flashfloppy mainline, because it expects different pins for the rotary encoder, unless you use mcu_package to decide whether this is a modded Rev.1 or an actual Rev.2.

Do you see anything I can do to my modded KC30 Rev.1 which would allow support in mainline firmware?

@keirf
Copy link
Owner

keirf commented Nov 5, 2025

What is the rotary-encoder pin mismatch between Rev.1 and Rev.2? I believe the pin assignments are the same?

@karcherm
Copy link
Author

karcherm commented Nov 6, 2025

You are correct. The rotary encoder pins are not different between Rev.1 and Rev.2, but KC30 Rev.2 has a different optional motor pin than KC30 Rev.1. Your source code says PB15 on "classic Gotek" and PB12 on "KC30 Rev.2". I'm actually unsure whether I currently use the motor pin, so I think I'm going to give modding my PCB to look like "Rev 2" a try.

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.

2 participants