Skip to content

TM4C129ENCPDT SWD scan failed after invalid oscillator configuration in firmware #2154

@SlyCedix

Description

@SlyCedix

I recently switched from the EK-TM4C1294XL, which worked wonderfully with the BMP, to a custom board with the same chip.

I was able to scan, attach, program and debug the device one time. I stepped through my code until I got to the oscillator configuration at which point the program hung and the debugger disconnected. I have since discovered that the external oscillator I provided was connected to the wrong oscillator inputs rather than the primary oscillator inputs. Without some very careful soldering I will not be able to connect my 25 MHz oscillator to the correct pins. Fortunately there is an internal oscillator which should be good enough for my purposes.

Since this event:

I get the following whenever I scan:

(gdb) target extended-remote COM3
Remote debugging using COM3
(gdb) monitor swd_scan
Target voltage: 3.3V
SWD scan failed!
Failed

There is a ~3 second pause between Target voltage reporting and SWD scan failed.

If I use BMDA to get a little more information, I get the same output whether the board is powered by the BMP or externally:

blackmagic-bmda -d COM3 -tpv 5
Black Magic Debug App v2.0.0
 for Black Magic Probe, ST-Link v2 and v3, CMSIS-DAP, J-Link and FTDI (MPSSE)
Running in Test Mode
Target voltage: 3.3V
Speed set to 1.951MHz for SWD
Switching from JTAG to dormant
Switching out of dormant state into SWD
DP DPIDR 0x2ba01477 (v1 rev2) designer 0x43b partno 0xba
adiv5: power-down failed
No target found

A couple of times when testing, however, I got the following. I'm unsure what conditions were different:

blackmagic-bmda -d COM3 -tpv 5
Black Magic Debug App v2.0.0
 for Black Magic Probe, ST-Link v2 and v3, CMSIS-DAP, J-Link and FTDI (MPSSE)
Running in Test Mode
Target voltage: 2.3V
Speed set to 1.951MHz for SWD
Switching from JTAG to dormant
Switching out of dormant state into SWD
Deprecated JTAG to SWD sequence
DP DPIDR 0x2ba01477 (v1 rev2) designer 0x43b partno 0xba
AP   0: IDR=24770011 CFG=00000000 BASE=e00ff000 CSW=e3000040 (AHB3-AP var1 rev2)
Halt via DHCSR(00030003): success after 9ms
ROM Table: BASE=0xe00ff000 SYSMEM=1, Manufacturer 43b Partno 4c4 (PIDR = 0x04000bb4c4)
0 0x0e000e000: Generic IP component - Cortex-M4 SCS (System Control Space) (PIDR = 0x04000bb00c DEVTYPE = 0x00 ARCHID = 0x0000)
-> cortexm_probe
CPUID 0x410fc241 (M4 var 0 rev 1)
cortexm_probe: Examining Part ID 0x04c4, AP Part ID: 0x04c4
Calling sam3x_probe
Calling lmi_probe
1 0x0e0001000: Generic IP component - Cortex-M3 DWT (Data Watchpoint and Trace) (PIDR = 0x04003bb002 DEVTYPE = 0x00 ARCHID = 0x0000)
2 0x0e0002000: Generic IP component - Cortex-M3 FBP (Flash Patch and Breakpoint) (PIDR = 0x04002bb003 DEVTYPE = 0x00 ARCHID = 0x0000)
3 0x0e0000000: Generic IP component - Cortex-M3 ITM (Instrumentation Trace Module) (PIDR = 0x04003bb001 DEVTYPE = 0x00 ARCHID = 0x0000)
4 0x0e0040000: Debug component - Cortex-M4 TPIU (Trace Port Interface Unit) (PIDR = 0x04000bb9a1 DEVTYPE = 0x11 ARCHID = 0x0000)
5 0x0e0041000: Debug component - Cortex-M4 ETM (Embedded Trace) (PIDR = 0x04000bb925 DEVTYPE = 0x13 ARCHID = 0x0000)
ROM Table: END
Resuming target
***  1   Tiva-C M4
Attaching to target..
Halting target
remote_v4_adiv5_mem_write_bytes error around 0xe000edf0
remote_v4_adiv5_mem_read_bytes error around 0xe000edf0
Attach failed
Can not attach to target 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions