Skip to content
This repository was archived by the owner on Mar 7, 2026. It is now read-only.

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

Merged
dragonmux merged 6 commits into
blackmagic-debug:mainfrom
ALTracer:feature/at32f405
Oct 26, 2024
Merged

Feature: Add support for Arterytek MCU AT32F405, F423#1949
dragonmux merged 6 commits into
blackmagic-debug:mainfrom
ALTracer:feature/at32f405

Conversation

@ALTracer
Copy link
Copy Markdown
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

Comment thread src/target/at32f43x.c Outdated
@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
Copy Markdown
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
Copy Markdown
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.

Comment thread src/target/at32f43x.c Outdated
Copy link
Copy Markdown
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.

Comment thread src/target/at32f43x.c Outdated
* 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
Copy Markdown
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
@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
@ALTracer ALTracer deleted the feature/at32f405 branch March 30, 2025 19:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

New Target New debug target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants