Hi,
We're having issues connecting and launching a new debug session with a running target.
After we enabled the DMA to continuously transfer conversions from the ADC we have been having issues connecting to a running target and programming. If we modify the code so that the DMA no longer transfers the conversions or if we manually reset the target before connecting and programming, there are no issues.
It appears that the debugger is unable to halt the cpu core. We've tried modifying the debug configuration so that the Flash driver reset handling is set to VECTRESET and the reset handling is also set to VECTRESET but this does not seem to help.
Here's the console after trying to launch a debug session:
MCUXpresso IDE RedlinkMulti Driver v11.6 (Jul 12 2022 16:58:24 - crt_emu_cm_redlink build 4)
Found chip XML file in C:/work/bms_module_controller/MCUXpressoIDE/MODULE_CONTROLLER_APP/Debug\MIMXRT1176xxxxx.xml
Reconnected to existing LinkServer process.
============= SCRIPT: RT1170_connect_M7_wake_M4.scp =============
RT1170 Connect M7 and Wake M4 Script
DpID = 6BA02477
APID = 0x84770001
Setting M4 spin code
Setting M4 clock
Resetting M4 core
View cores on the DAP AP
DpID = 6BA02477
TAP 0: 6BA02477 Core 0: M7 APID: 84770001 ROM Table: E00FD003*
TAP 0: 6BA02477 Core 1: M4 APID: 24770011 ROM Table: E00FF003
============= END SCRIPT ========================================
Probe Firmware: MCU-LINK r0FF CMSIS-DAP V0.078 (NXP Semiconductors)
Serial Number: KQGOZKDOWAIEL
VID:PID: 1FC9:0143
USB Path: \\?\hid#vid_1fc9&pid_0143&mi_00#7&2c94bdd8&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Using memory from core 0 after searching for a good core
debug interface type = CoreSight DP (DAP DP ID 6BA02477) over SWD TAP 0
processor type = Cortex-M7 (CPU ID 00000C27) on DAP AP 0
number of h/w breakpoints = 8
number of flash patches = 0
number of h/w watchpoints = 4
Probe(0): Connected&Reset. DpID: 6BA02477. CpuID: 00000C27. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FD000: CID B105100D PID 000008E88C ROM (type 0x1)
ROM 1 E00FE000: CID B105100D PID 04000BB4C8 ROM (type 0x1)
ROM 2 E00FF000: CID B105100D PID 04000BB4C7 ROM (type 0x1)
ROM 3 E000E000: CID B105E00D PID 04000BB00C Gen SCS (type 0x0)
ROM 3 E0001000: CID B105E00D PID 04000BB002 Gen DWT (type 0x0)
ROM 3 E0002000: CID B105E00D PID 04000BB00E Gen (type 0x0)
ROM 3 E0000000: CID B105E00D PID 04000BB001 Gen ITM (type 0x0)
ROM 2 E0041000: CID B105900D PID 04001BB975 CSt ARM ETMv4.0 type 0x13 Trace Source - Core
ROM 2 E0042000: CID B105900D PID 04004BB906 CSt type 0x14 Debug Control - Trigger, e.g. ECT
ROM 1 E0043000: CID B105900D PID 04001BB908 CSt CSTF type 0x12 Trace Link - Trace funnel/router
NXP: MIMXRT1176xxxxx
DAP stride is 1024 bytes (256 words)
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07'
Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
Sending VECTRESET to run flash driver
Flash variant 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07' detected (16MB = 256*64K at 0x30000000)
Closing flash driver MIMXRT1170_SFDP_QSPI.cfx
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07'
Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
Sending VECTRESET to run flash driver
Flash variant 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07' detected (0B = at 0xFFF)
Flash Driver V.2 startup failed - rc Ef(57): Flash Driver supports page size larger than working memory area
chip initialization failed - Ef(57): Flash Driver supports page size larger than working memory area
failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07'
Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
Sending VECTRESET to run flash driver
Waiting for target to stop...
Warning - processor did not halt - gave up waiting
target failed to halt after flash driver reset - (null)
flash start - disabling IRQs failed - rc Ep(08). Cannot access core regs when target running.
chip initialization failed - Ep(08). Cannot access core regs when target running.
failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07'
Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
chip initialization failed - Ep(08). Cannot access core regs when target running.
failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07'
Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
chip initialization failed - Ep(08). Cannot access core regs when target running.
failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07'
Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
chip initialization failed - Ep(08). Cannot access core regs when target running.
failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07'
Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
chip initialization failed - Ep(08). Cannot access core regs when target running.
failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1170_SFDP_QSPI.cfx
Image 'iMXRT1170_SFDP_FlexSPI1_A_QSPI Jul 7 2022 12:15:07'
Opening flash driver MIMXRT1170_SFDP_QSPI.cfx
chip initialization failed - Ep(08). Cannot access core regs when target running.
failed to initialize flash driver MIMXRT1170_SFDP_QSPI.cfx