Author Topic: XMC1404 SPD1 (P1.3) debugging. Can step but can't flash.  (Read 1116 times)

0 Members and 1 Guest are viewing this topic.

Offline carl0sTopic starter

  • Supporter
  • ****
  • Posts: 298
  • Country: gb
XMC1404 SPD1 (P1.3) debugging. Can step but can't flash.
« on: August 11, 2026, 10:01:05 pm »
Long story, but my £2000 welder either got stuck in UART update mode (ASC_BSL), or got it's firmware wiped, after I was messing with the internal DIP switches (see https://www.mig-welding.co.uk/forum/threads/think-i-have-killed-my-ac-dc-multi-process-tig-mig-parweld-xtm-211di-welder.150136/ )

I was sent the firmware files (various versions) by the manufacturer, but when I got to ver2 and it still didn't work, I figured it was the likely boot-mode, so I set it to the only one in the drop-down I could see that was 'run/user mode with debug (and not halt)', so that it would work and I had a way back in.
Unfortunately in hindsight this was a bad choice because I put it in User Mode with Debug (SPD1), which uses a non-standard single-pin proprietary debug on secondary pin (SPD1 not SPD0) and this pin was already wired elsewhere. What I should have done was taken more time, and scrolled upwards in the list for ASC_BSL with timeout, or any of the modes that used standard ARM SWD, on default pins (which were already broken out, and shared with the ASC_BSL UART update pins).

Machine is misbehaving slightly like the input to the 'store welding preset' is floating. It thinks I am pressing a button (one that I don't actually have), most but not all of the time. Turns out that P1.3 (SPD1) is wired to control panel... so could be this clash of pupose/pin programming. Or it could just be incompatible ver2 firmware. I want to try ver1 again, but I can't flash because I've lost ASC_BSL and only have SPD1 for debugging.

I bought a DAP MiniWiggler (v2 not v3), and I removed an SMT cap and resistor that went to this debug pin (P1.3).
I wired my MiniWiggler to it, and lo and behold, TAS basic Client Channel does see an XMC1400, but, it doesn't see any device identifiers or let me 'select' it. Also, TAS Read/Write does similar. It seems to let me read low-addresses though.

What is strange is that MCD Basic Client is able to Stop and Step the core.

So.. any ideas? I am about to order replacement MCUs to solder in, but this seems like admitting defeat, and a waste of a MiniWiggler (the new chip will come with ASC_BSL UART enabled which is what the Welder uses anyway).

Picture below shows the Info from TAS Basic Client. Note that it has the chip type but no identifiers. Also seems odd it says SWD (2-wire data & clock) while I am using SPD.

My suspicion is that User mode with Debug allows debugging of the core but not the ... chip itself. So allows ARM core basics but not the stuff on the outside of that. Ultimately I need to be able to use Memtool again but with TAS/DAS, to flash firmware ver1, and set the bootmode back to a sane value and re-enable boot-pins (the dip switches on board to allow ASC_BSL for updates)

2872718-0

« Last Edit: August 12, 2026, 08:35:54 am by carl0s »
--
Carl
 

Offline carl0sTopic starter

  • Supporter
  • ****
  • Posts: 298
  • Country: gb
Re: XMC1404 SPD1 (P1.3) debugging. Can step but can't flash.
« Reply #1 on: August 12, 2026, 02:54:36 pm »
I used an older version of Memtool, found on dodgy / ad-ridden download-website. This version didn't even have XMC1400 in there, but I chose XMC1303 or something, and it was able to connect with the DAP MiniWiggler on SPD1, and was able to set the Bootmode back to ASC_BSL. I was then able to use the 2025 Memtool in Minimonitor mode with UART as per the factory for this welder. I have learned a lot and got it all fixed.
--
Carl
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->