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

Fix AT32F405 flash size/map#2032

Merged
dragonmux merged 1 commit into
blackmagic-debug:mainfrom
ALTracer:fix/at32f405-fsize
Dec 22, 2024
Merged

Fix AT32F405 flash size/map#2032
dragonmux merged 1 commit into
blackmagic-debug:mainfrom
ALTracer:fix/at32f405-fsize

Conversation

@ALTracer
Copy link
Copy Markdown
Contributor

Detailed description

  • The F_SIZE readout and usage as implemented in Feature: Add support for Arterytek MCU AT32F405, F423 #1949 is incomplete and results in failure to reprogram internal flash of AT32F405RC.
  • This PR solves that by factoring in the kibibytes multiplier, for both AT32F402/405 and AT32F423 added in that commit.

For a (C) 256 KiB flash part, the F_SIZE "register" contains not 262144 but 256, which (as used in PR1949 26d27b9) generates a target flash map of 256 byte length and 2048 (or 1024) byte erase-sectors, which is broken.

Assumed tested on some BMD-derivative platform.

Your checklist for this pull request

Closing issues

@dragonmux dragonmux added this to the v2.0 release milestone Dec 22, 2024
@dragonmux dragonmux added the Bug Confirmed bug label Dec 22, 2024
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 and this fix!

@dragonmux dragonmux merged commit 1e0457b into blackmagic-debug:main Dec 22, 2024
@ALTracer ALTracer deleted the fix/at32f405-fsize branch March 30, 2025 19:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Bug Confirmed bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants