[SOLVED] Problem to erase a protected Infineon-ARM M4

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • [SOLVED] Problem to erase a protected Infineon-ARM M4

    Hi.

    On a Infineon XMC4700 Arm processor, i've activate the sector read/write protection with a password -> XMC_FLASH_InstallProtection(0, PROTECT_RP_WPS0, (uint32_t)PW1, (uint32_t)PW2);


    Now I have no way to erase the whole chip.

    The connection with JLink is ok, but if i try to unlock the device, JLink show's a error.

    is there a way to delete the chip if i know the passwords?



    Here the output from JLink:

    J-Link>connect
    Device "XMC4700-1536" selected.

    Connecting to target via SWD
    Performing XMC4500 connection sequence.
    AP map detection skipped. Manually configured AP map found.
    AP[0]: AHB-AP (IDR: Not set)
    AP[0]: Core found
    AP[0]: AHB-AP ROM base: 0xE00FF000
    CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
    Found Cortex-M4 r0p1, Little endian.
    FPUnit: 6 code (BP) slots and 2 literal slots
    CoreSight components:
    ROMTbl[0] @ E00FF000
    ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
    ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
    ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
    ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
    ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
    ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
    Cortex-M4 identified.


    J-Link>unlock Kinetis
    Found SWD-DP with ID 0x2BA01477
    Unlocking device...ERROR: Read from DP/AP register failed!


    J-Link>erase
    Erasing device (XMC4700-1536)...


    **************************
    WARNING: CPU could not be halted
    **************************



    ****** Error: Can not read register 16 (XPSR) while CPU is running
    Can not read register 20 (CFBP) while CPU is running
    Can not read register 0 (R0) while CPU is running
    Can not read register 1 (R1) while CPU is running
    Can not read register 2 (R2) while CPU is running
    Can not read register 3 (R3) while CPU is running
    Can not read register 4 (R4) while CPU is running
    Can not read register 5 (R5) while CPU is running
    Can not read register 6 (R6) while CPU is running
    Can not read register 7 (R7) while CPU is running
    Can not read register 8 (R8) while CPU is running
    Can not read register 9 (R9) while CPU is running
    Can not read register 10 (R10) while CPU is running
    Can not read register 11 (R11) while CPU is running
    Can not read register 12 (R12) while CPU is running
    Can not read register 14 (R14) while CPU is running
    Can not read register 15 (R15) while CPU is running
    Can not read register 17 (MSP) while CPU is running
    Can not read register 18 (PSP) while CPU is running



    ****** Error: Failed to prepare for programming.
    Could not preserve target memory.
    ERROR: Erase returned with error code -1.
    J-Link>
  • Hi,
    Thank you for your inquiry.
    If you locked your device with a password, there is no way for the J-Link to unlock your device without it.
    You will have to unlock the device manually (e.g. via the J-Link Commander).

    The necessary registers should be writable after connecting to the device.
    For all necessary commands (e.g. w4) please refer to the following article:
    wiki.segger.com/J-Link_Commander#Commands

    Does this resolve the problem?

    Best regards,
    Fabian
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.