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

Feature: Add support for Arterytek MCU AT32F405, F423 #1949

Merged
merged 6 commits into from
Oct 26, 2024

Conversation

ALTracer
Copy link
Contributor

@ALTracer ALTracer commented Oct 2, 2024

Detailed description

  • This could be described as a new feature (new target support in existing driver)
  • The existing problem is AT32F405 not identified by BMD but likely supported via AT32F435 API.
  • This PR solves it by adding required match code in at32f43_probe.

I do not have any chips accessible for that target and cannot test live, only read refmans. FPEC is at 0x40023C00, which is promising. USD and DBGMCU support not considered yet.
The generic F_SIZE method was used to not carry yet another table of Part IDs.

Your checklist for this pull request

Closing issues

src/target/at32f43x.c Outdated Show resolved Hide resolved
@dragonmux dragonmux added this to the v2.0 release milestone Oct 2, 2024
@dragonmux dragonmux added the New Target New debug target label Oct 2, 2024
@ALTracer ALTracer force-pushed the feature/at32f405 branch 4 times, most recently from a352680 to b18c2f1 Compare October 3, 2024 19:39
@ALTracer
Copy link
Contributor Author

ALTracer commented Oct 3, 2024

Enhanced support detail for AT32F405. Added nominal support for AT32F423 as well. Added doc references. Not tested.

@ALTracer ALTracer force-pushed the feature/at32f405 branch 2 times, most recently from 3acb590 to 93cc477 Compare October 4, 2024 18:58
@ALTracer
Copy link
Contributor Author

Tested to detect an AT32F437ZM device even under read protection level 1. That renders not just internal flash but also UID, F_SIZE, and option bytes, readable as 0xFF, but DEBUG_SER_ID can still be used on these three families for identification.
Actually entire DBGMCU support is identical for implemented features.

src/target/at32f43x.c Outdated Show resolved Hide resolved
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

The patchset looks better - the comments are a lot clearer, thank you. With the only note we found this time taken care of, we'll get this merged.

src/target/at32f43x.c Outdated Show resolved Hide resolved
* All of SRAM is declared regardless of parity checking
* Two flash sizes are detected from idcode
* DEBUG sleep and watchdog bits handling is enabled
Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

LGTM, merging. Thank you for the contribution!

@dragonmux dragonmux merged commit 85b4110 into blackmagic-debug:main Oct 26, 2024
33 checks passed
@ALTracer ALTracer mentioned this pull request Dec 21, 2024
6 tasks
@dragonmux dragonmux changed the title Feature: Add support for Arterytek MCU AT32F405, F402 Feature: Add support for Arterytek MCU AT32F405, F423 Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Target New debug target
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants