Product Guides

Debug and Programming Compatibility When Moving from STM32 to AT32

Check the toolchain before you check the datasheet

An MCU replacement that cannot be debugged is not a replacement. The good news is that the Cortex-M debug interface is standardised, so the SWD connection, the probe and the general flow usually carry over. The friction sits in device support: whether your specific IDE version lists the part, and whether your production programmer has it in its device database.

AI-generated concept of SWD debug probe and production programming setup

The debug path

LayerWhat usually transfersWhat to verify
Two-wire SWDPin functions SWDIO and SWCLKWhich package pins carry them, and whether they are shared
Probe hardwareGeneric CMSIS-DAP and J-Link class probesDevice selection in the probe software
IDE and toolchainSame compiler familyDevice support package for the exact part number
Flash algorithmProvided by the support packageWhether your IDE version ships it already
Production programmerSame socket and interfaceDevice entry in the programmer's own database

Pin sharing on small packages

On QFN and small LQFP parts the SWD pins often double as general-purpose I/O. Firmware that configures those pins as outputs early in startup will lose the debug connection — sometimes permanently, until a boot-mode entry is used to recover. Check this before you flash a design onto a board you cannot easily rework.

Reset pin as debug control

Some debug adapters use the reset line to force a connect under reset. If your board removed the external reset network, that connection method may behave differently. Keep the option to drive reset available on the debug header.

The programming path

  • System bootloader. Many parts ship with a factory bootloader that loads firmware over a serial or USB interface. Confirm it is present on the order code you buy, and confirm the entry condition, because production fixtures depend on it.
  • Read protection. Once enabled, recovery usually requires a full erase. Decide in advance which products ship locked, and document the recovery procedure for the line.
  • Mass production. Offline programmers, gang programmers and in-circuit fixtures each have their own device support. Confirm at least one path supports the new part before you commit to the switch.

A one-day checklist that prevents a one-week delay

  1. Confirm your IDE version lists the new part number; update if not.
  2. Plug the probe into a development board and get a connect, before touching your own PCB.
  3. Flash a minimal program and verify the debug connection survives a reset.
  4. Enable and then remove read protection once, deliberately, to learn the recovery path.
  5. Confirm your production programmer recognises the part.

Where this affects the schedule

None of these items is technically difficult, and all of them are cheap to check. The cost appears when a production line is stopped because the programmer does not know the part, and that delay is measured in days rather than hours. Checking the toolchain first converts a schedule risk into a checklist.

Parts commonly used for toolchain bring-up: AT32F403ARCT7, AT32F407VGT7 and AT32F435CGT7. The full line is listed under Microcontrollers / MCUs.

Verify before you commit: pinout, peripheral mapping and electrical limits differ between part numbers and between silicon revisions. Always confirm against the current official datasheet and errata for the exact order code you intend to use.

Questions & Answers

Will my existing ST-Link or J-Link work with AT32 parts?

Generic SWD probes of the CMSIS-DAP and J-Link classes normally work because the debug interface is standardised. You still need device support in the probe software, so update it and select the new part number.

Do I need a different IDE?

Usually the same IDE works once its device support package includes the part. Confirm your installed version lists the exact order code before you start the port.

What is the risk of read protection during a swap?

If protection is enabled and you lose the key, recovery normally means a full erase. Decide deliberately which builds ship locked and document the recovery procedure so the production line is not blocked.

Which pin issue breaks debug connections most often?

SWD pins that double as general-purpose I/O on small packages. If startup code reconfigures them early, the debugger loses the connection and recovery may need a boot-mode entry.

Recommended next steps

If you are sourcing any of the parts mentioned in this guide, we can help you confirm stock, pricing, and lead times quickly.

Stock, date codes and lead time change daily. Send us your BOM or quantity target and we will confirm what is actually available, then quote within one working day. Email [email protected] or use the Get a Quote form on this page.

About us & trademarks: Jingteng Electronics (Shenzhen Jingteng Electronics Technology Co., Ltd.) is an independent distributor of electronic components. We are not an authorised distributor, agent or representative of any manufacturer named in this article. Manufacturer names, part numbers and trademarks are used for identification and technical compatibility only and belong to their respective owners.

Transimpedance Front Ends: Reading Photodiodes and Current-Output Sensors with Precision Op-Amps
EMC Re-Testing After an MCU Replacement: What Actually Changes