Skip to content

Not able to read from Flash On EFM32PG22 Series 2 MCU #1296

@kmeinhar

Description

@kmeinhar

I have a similar problem as issue #759 . But I was not able to resolve it with the suggested solution of running the BMP in hosted mode.

Below you can see that the ROM table is correctly read and efm32_probe is called. In there I tried to read the Device Information register and some Peripheral Register but all target_mem_read32 calls just return 0.

Calling target_halt_resume(t, 0) also did not change this behavior.

The second AP (AP 1: IDR=54770002 ) is a Debug Challenge Interface (DCI Documentation) and I verified that it does not have the Debug Lock set. For me it sounds like DCI is the successor of the EFM32 Authentication AP that is implemented in efm32_aap_probe.
I have some rough code for handling the DCI that I could upstream when I can confirm debugging works on PG22.

I am currently a bit lost what else to try to make reading the Flash work. Are there any hints on what could be preventing me from reading flash. Or better ways of testing what fails?

$ make PROBE_HOST=hosted BMP_HOSTED_ONLY=0 && sudo ./src/blackmagic -t
 GEN include/version.h
  CC      command.c
  CC      target/efm32.c
  CC      remote.c
  CC      platforms/hosted/cli.c
  CC      platforms/hosted/bmp_remote.c
  CC      platforms/hosted/bmp_libusb.c
  LD      blackmagic
Black Magic Debug App v1.8.0-709-g5092cd14-dirty
 for Black Magic Probe, ST-Link v2 and v3, CMSIS-DAP, JLink and libftdi/MPSSE
Using 1d50:6018 98B6C98B Black Magic Debug
 Black Magic Probe  v1.8.2
Running in Test Mode
Target voltage: 3.3V Volt
Speed set to  3.2727 MHz for SWD
remote_target_clk_output_enable failed, error 1
scan_multidrop: true
DP DPIDR 0x6ba02477 (v2 rev0) designer 0x43b partno 0xba
26016e7
TARGETID 0x026016e7 designer 0x673 partno 0x2601
Please update BMP firmware for substantial speed increase!
DONE?
RESET_SEQ failed
AP   0: IDR=84770001 CFG=00000000 BASE=e00fe003 CSW=43800040 (AHB-AP var0 rev8)
Halt via DHCSR: success 05130003 after 213ms
ROM: Table BASE=0xe00fe000 SYSMEM=0x00000001, Manufacturer 673 Partno 601
ROM: Table BASE=0xe00ff000 SYSMEM=0x00000001, Manufacturer 43b Partno 4c9
 0 0xe000e000: Debug component - Cortex-M33 (System Control Space) (PIDR = 0x00000004000bbd21  DEVTYPE = 0x00 ARCHID = 0x2a04)
 -> cortexm_probe
CPUID 0x410fd214 (M33 var 0 rev 4)
Calling efm32_probe
fe08000: 0
fe08004: 0
fe081fc: 0
Reading CMU CLKEN1 0
Reading CMU IPVER 0
Reading EMU DECBOD 0
Reading EMU Status 0
Please report unknown device with Designer 0x673 Part ID 0x2601
 1 0xe0001000: Debug component - Cortex-M33 (Data Watchpoint and Trace) (PIDR = 0x00000004000bbd21  DEVTYPE = 0x00 ARCHID = 0x1a02)
 2 0xe0002000: Debug component - Cortex-M33 (Breakpoint Unit) (PIDR = 0x00000004000bbd21  DEVTYPE = 0x00 ARCHID = 0x1a03)
 3 0xe0000000: Debug component - Cortex-M33 (Instrumentation Trace Macrocell) (PIDR = 0x00000004000bbd21  DEVTYPE = 0x43 ARCHID = 0x1a01)
 4 Entry 0xfff41002 -> Not present
 5 0xe0041000: Debug component - Cortex-M33 (Embedded Trace) (PIDR = 0x00000004002bbd21  DEVTYPE = 0x13 ARCHID = 0x4a13)
 6 0xe0042000: Debug component - Cortex-M33 (Cross Trigger) (PIDR = 0x00000004000bbd21  DEVTYPE = 0x14 ARCHID = 0x1a14)
 7 Entry 0xfff44002 -> Not present
 ROM: Table END
1 0xe0040000: Debug component - Cortex-M33 (Trace Port Interface Unit) (PIDR = 0x00000004000bbd21  DEVTYPE = 0x11 ARCHID = 0x0000)
ROM: Table END
AP   1: IDR=54770002 CFG=00000000 BASE=00000003 CSW=80000040 (AHB-AP var0 rev5)
*** 1 Unknown ARM Cortex-M Designer 673 Part ID 2601 M33
remote_target_clk_output_enable failed, error 1
remote_target_clk_output_enable failed, error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugConfirmed bugNew TargetNew debug target

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions