Thanks to visit codestin.com
Credit goes to github.com

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

Feature: ArteryTek AT32F437/435 Read protection unlocking#1956

Open
ALTracer wants to merge 294 commits into
blackmagic-debug:mainfrom
ALTracer:feature/at32f43x-unrdp
Open

Feature: ArteryTek AT32F437/435 Read protection unlocking#1956
ALTracer wants to merge 294 commits into
blackmagic-debug:mainfrom
ALTracer:feature/at32f43x-unrdp

Conversation

@ALTracer

Copy link
Copy Markdown
Contributor

Detailed description

  • This is close to a new feature, but basically I cloned a couple existing functions and extended timeouts.
  • The existing problem is BMD internally timing out after 250ms after issuing a RDP1 degrade command (erase option bytes and write 0x5aa5) of which the latter takes ~14 seconds of DP WAIT because it is going through a mass erase of F437ZM 4032 KiB flash.
  • This PR solves it by using a couple different ADIv5 raw_access functions with extended timeouts and progress printout.

Tested to allow regression from RDP1 to Open state on AT-START-F437 via BMP or BMDA, via SWD or JTAG transport. I have no idea how to implement the same for CMSIS-DAP, JLink, FTDI and other backends. I don't expect this to be merged as-is, rather I publish a hacked working example of what must be done. Maybe there's a better way of repurposing existing drivers to not take up so much code flash of BMP (ENABLE_ARTERY is already opt-in). This is based on top of #1949 branch, just two new commits.

Your checklist for this pull request

Closing issues

@ALTracer ALTracer force-pushed the feature/at32f43x-unrdp branch 3 times, most recently from e253ad2 to 335b1b6 Compare October 26, 2024 15:42
@dragonmux dragonmux added this to the v2.1 release milestone Jul 26, 2025
@dragonmux dragonmux added the Enhancement General project improvement label Jul 26, 2025
dragonmux added 25 commits March 9, 2026 04:58
…correctly and the pins are driven suitably hard
…ng the dual target serial interfaces up to the second host serial interface
…n steering macros weren't available when they should be
… the UART needs to be switched by toggling the direction signal on the level translation once every 10ms
…32U5 as the old method was making erase fail to execute correctly on these devices
… noticable ill effects

This needs properly documenting and that documentation must be written before this is PR'd. The flag does not cause data corruption and appears to work the correct way, however it's unknown if it's acting like DMA or micro-halting the core. We suspect the latter.
…ut string with its value from getting compiled out when assertions are off
…ut string with its value from getting compiled out when assertions are off
lethalbit and others added 29 commits May 23, 2026 16:51
…ommand

This was found by looking at the JTAG traffic the lattice diamond programmer generated when programming the ispCLOCK device, and the name was extracted from a JED for the ispCLOCK being converted to an svf file, as the name for this command was included in a comment in the resulting file.
…_done`

These now properly handle the setup and exit for programming ispCLOCK devices
…e attached ispCLOCK device.

After much mucking about and trying to figure out what the lattice programmer was doing and how much of it is required, the method for properly programming the ispCLOCK devices was figured out, which does include wiggling TCK, for some reason....
This is used so we can verify the contents of the the ispCLOCK device and ensure that the correct configuration for it was written
* Extract the memory write into a dedicated helper function
* Wrap it into TRY-CATCH macros
* Drop the extraneous 10ms delay introduced back in PR2072
if we use the stock bootloader, we need to PULL PA12 to GND
The main idea is that if we disable the NXP, RP, EFM and/or NRF
support, there is no need to do a DP rescue and probe for these targets
@ALTracer ALTracer force-pushed the feature/at32f43x-unrdp branch from a4b00b0 to 61c7b6f Compare June 25, 2026 22:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Enhancement General project improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants