Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM263P4: Core 1 and 3 suddenly disconnect

Part Number: AM263P4

Hi, I am using a AM263P and all the 4 cores. On core 1 I am using MCAN, and a bare metal OS. 

The issue is the following, using 3 scenarios:

1.After running and uploading the SW, after some random time core 1 and 3 randomly disconects. 

2.If I am flashing each core and not run them after some time core 1 and 3 randomly disconects. 

3.If i just press connect target without loading the SW core 3 and 1 randomly disconects. 

 

Cortex_R5_3: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 21.0.0.3955) 
Cortex_R5_3: Unable to determine target status after 20 attempts
Cortex_R5_3: Failed to remove the debug state from the target before disconnecting.  There may still be breakpoint op-codes embedded in program memory.  It is recommended that you reset the emulator before you connect and reload your program before you continue debugging
Cortex_R5_1: Error: (Error -1170 @ 0x0) Unable to access the DAP. Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower TCLK). (Emulation package 21.0.0.3955) 
Cortex_R5_1: Unable to determine target status after 20 attempts
Cortex_R5_1: Failed to remove the debug state from the target before disconnecting.  There may still be breakpoint op-codes embedded in program memory.  It is recommended that you reset the emulator before you connect and reload your program before you continue debugging

  • Hi Ionut,
    Thank you for the additional details across all three scenarios. Providing responses below covering root cause, technical background, and actionable recommendations.
    The core symptom — Cortex_R5_1 (R5FSS0_CORE1) and Cortex_R5_3 (R5FSS1_CORE1) randomly losing DAP access (Error -1170) — is occurring across all scenarios including one where no software is even loaded. This strongly points to a debug/GEL configuration issue, not a software bug on those cores.
    Specifically:
    By default after device reset, both R5FSS0 and R5FSS1 are in lockstep mode.
    In lockstep mode, CORE1 is a shadow of CORE0 — it does not exist as an independent debug entity. Attempting to connect to Cortex_R5_1 or Cortex_R5_3 when the corresponding subsystem is still in lockstep mode will result in exactly the DAP access failure you are seeing.
    "In Lockstep mode: One operating core (CORE0) and One lockstep core (CORE1). CORE1 caches and interrupts are unused in this mode." — AM263Px TRM, Section 7.1.1.1, SPRUJ55D

    Key Technical Points

    1. Dual-Core Mode Must Be Explicitly Configured

    Switching from lockstep to dual-core (split) mode is not automatic. It requires:
    • Writing R5SS[0-1]_CONTROL.LOCK_STEP = 0x0
    • Triggering R5SS[0-1]_CONTROL.RESET_FSM_TRIGGER = 0x7
    • This switch can only be made once per power-on reset cycle. It cannot be re-attempted mid-session.
    "Lockstep to dual core switch can be programmed only once, and cannot be reprogrammed until the device's next power on reset cycle." — AM263Px TRM, Section 6.1.3.2.1.1, SPRUJ55D

    2. GEL File Is Responsible for the Mode Switch on Connection

    When CCS connects to R5FSS0_CORE0 (Cortex_R5_0), the GEL file executes OnTargetConnect(), which by default calls Configure_Dual_Core_mode() to switch both R5FSS0 and R5FSS1 into dual-core mode and unhalt CORE1 of each subsystem. If this GEL function is not executing correctly, or if a secondary GEL file is being assigned to the secondary cores (Cortex_R5_1 / Cortex_R5_3), it can cause the mode switch to conflict or fail — leaving CORE1 inaccessible.
    • Do NOT assign GEL files to CORE1 (Cortex_R5_1, Cortex_R5_3). Only assign the GEL file to Cortex_R5_0 (R5FSS0_CORE0).
    • The single GEL file on R5FSS0_CORE0 is designed to initialize and release both subsystems.
    • After connecting R5FSS0_CORE0, call Unhalt_All_R5F_cores(), MSS_L2_Mem_Init(), and MailBox_MEM_Init() before connecting to other cores.

    Recommended Action Steps

    Step 1 — Verify your Target Configuration (.ccxml):
    • Open your target config in CCS → Advanced Setup → Target Configuration
    • Confirm that only Cortex_R5_0 has an initialization GEL script assigned (e.g., am263px.gel from {CCS_install_path}/ccs_base/emulation/gel/AM263P/)
    • Remove any GEL file assignments from Cortex_R5_1, Cortex_R5_2, Cortex_R5_3
    Step 2 — Connection Sequence:
    1. Power-on the board (full power-on reset, not just software reset)
    2. Launch target configuration
    3. Connect only to Cortex_R5_0 first — this executes the GEL and transitions both R5FSS0 and R5FSS1 into dual-core mode
    4. From CCS Scripts menu on Cortex_R5_0, manually invoke: Unhalt_All_R5F_cores(), MSS_L2_Mem_Init(), MailBox_MEM_Init() (if not already called by the GEL's OnTargetConnect). Then connect to Cortex_R5_1, Cortex_R5_2, Cortex_R5_3
    Step 3 — Confirm Dual-Core Mode Status: You can verify the mode via the status register:
    • R5SS0_STATUS_REG.LOCK_STEP = 0 → dual-core mode
      R5SS1_STATUS_REG.LOCK_STEP = 0 → dual-core mode
    Step 4 — Lower JTAG TCLK (as a secondary mitigation): If DAP errors persist after the above, reduce the TCLK frequency in your target configuration (Advanced Setup → Board or Device Properties → JTAG/SWD) as suggested by the error message itself.

    Regarding Erratum i2485 (TMU Memory Corruption)

    Since you are operating in split/dual-core mode and using all four cores, be aware of erratum i2485:
    • It causes potential memory corruption in ATCM1 Bank0 when R5FSS0_CORE1 or R5FSS1_CORE1 accesses the TMU via the TCM interface
    • Workaround (WA2): Restrict TMU usage to CORE0 (R5FSS0_CORE0 and R5FSS1_CORE0) only — do not use the TMU from CORE1 of either cluster in split mode
    • This erratum is NOT applicable in lockstep mode

    Resources

    Best Regards,
    Zackary Fleenor
    1. Hi

      My procedure is following:

      Power off power on via power supply

      Start project less debug

      I connect to core 0 load program and run and it stops in breakpoint at main

      Repeat for every core the previous step

      Run all cores.

      Should I keep the gel only on core 0? On the other cores I have a cpu reset gel.

      Sometimes it works for hours but most of the time it just disconnects after some various time.

      If I press disconnect and remove the debugger it seems the same cores are also crashing ( i have on core 1 can communication). This happens also randomly as with the debugger.

      Can the debugger configuration also influence the behavior when debbuger is de attached? Thanks 

    2. Hi Ionut,

      Yes — remove the GEL from Core 1 and Core 3 entirely (including the "CPU reset" GEL), and yes, debugger/GEL configuration can affect post-detach behavior because it modifies actual silicon state, not just the debug session.


      1. GEL assignment — remove it from Core 1/3

      Per our guidance on this exact AM263P4 issue, only Cortex_R5_0 should carry an initialization GEL. Cortex_R5_1, R5_2, and R5_3 should have no GEL assigned at all — not even a "CPU reset" GEL 1.

      Why this matters: the lockstep→dual-core switch is a one-time, per-power-cycle operation (R5SSx_CONTROL.LOCK_STEP = 0 + RESET_FSM_TRIGGER = 0x7) 2. If a secondary GEL on Core1/Core3 re-triggers any reset/init logic — even something as simple as a "CPU reset" script — it can collide with the one-shot mode switch already performed by Core0's GEL, or re-assert reset into a core that's mid-transition. That's a very plausible source of your intermittent/random DAP loss across all three scenarios (including "connect only, no load").

      Correct sequence:

      1. Full power-on reset.
      2. Connect to Cortex_R5_0 only, let its GEL's OnTargetConnect() fully execute (dual-core switch, Unhalt_All_R5F_cores(), MSS_L2_Mem_Init(), MailBox_MEM_Init()).
      3. Verify R5SS0_STATUS_REG.LOCK_STEP = 0 and R5SS1_STATUS_REG.LOCK_STEP = 0 before touching other cores 3.
      4. Only then connect to Cortex_R5_1, R5_2, R5_3 — with no GEL/init script on them.

      2. Does debugger config affect behavior after the debugger is detached?

      Yes. The GEL/connect sequence doesn't just configure the debug probe session — it writes directly to device control registers (R5SSx_CONTROL, memory-init registers, etc.) that persist as actual hardware state regardless of whether a debugger is attached 2. If that sequence is incomplete, conflicting, or re-triggered incorrectly (e.g., by a stray reset GEL on Core1/3), the device can be left in an inconsistent mode/memory-init state. That inconsistent state will cause failures whether or not CCS is attached — which matches your observation that the same cores crash even in free-run after disconnecting the debugger. This is strong evidence the root cause is at the device configuration level, not purely a JTAG/DAP debug-session artifact.

      Also check: Erratum i2485

      Since you're running dual-core/split mode on all 4 cores, confirm you are not using the TMU (trig/math unit) from Core1 of either R5FSS cluster — this errata causes TCM memory corruption on CORE1 independent of the debugger state, which could also produce random crashes. Restrict TMU use to CORE0 only 4.


      Resources:

      1. AM263P4 – Not able to connect another subsystem in dev boot mode
      2. AM263Px TRM (SPRUJ55D) – R5SS Lock Step/Dual Core Configuration
      3. AM263Px TRM (SPRUJ55D) – Switching between Dual Core and Lockstep Mode
      4. AM263Px Data Sheet (SPRSP81D) – R5FSS Processor Subsystem

      Best Regards,

      Zackary Fleenor