IMXRT1050: Unable to flash QSPI NOR with either J-Link or LinkServer, and LPC-Link 2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMXRT1050: Unable to flash QSPI NOR with either J-Link or LinkServer, and LPC-Link 2

1,311 Views
mukelarvin
Contributor IV

I am using a larger flash part, AT25QF128A, with MIMXRT1050_SFDP_QSPI.cfx.

I was originally using the LinkServer firmware on my LPC-Link 2 and I was able to debug and flash my custom IMXRT1050 board. Then I added some code to read/write from the flash while running in XIP and now I cannot debug the device at all with the LinkServer firmware.

Reconnected to existing LinkServer process.
============= SCRIPT: RT1050_connect.scp =============
RT1050 Connect Script
DpID = 0BD11477
APID = 0x04770041
Disabling MPU
Configure FlexRAM for 256KB OC RAM, 128KB I-TCM, 128KB D-TCM
Finished
============= END SCRIPT =============================
Probe Firmware: LPC-LINK2 CMSIS-DAP V5.361 (NXP Semiconductors)
Serial Number: NYBSD2MS
VID:PID: 1FC9:0090
USB Path: \\?\hid#vid_1fc9&pid_0090&mi_00#7&1d96df65&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
Using memory from core 0 after searching for a good core
debug interface type = Cortex-M7 (DAP DP ID 0BD11477) 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: 0BD11477. 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 E0040000: CID B105900D PID 04000BB9A9 CSt type 0x11 Trace Sink - TPIU
ROM 1 E0043000: CID B105F00D PID 04001BB101 Sys (type 0x0)
NXP: MIMXRT1052xxxxB
DAP stride is 1024 bytes (256 words)
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID MIMXRT1050_SFDP_QSPI.cfx
Image 'iMXRT1050_SFDP_QSPI Feb 17 2020 13:59:01'
Opening flash driver MIMXRT1050_SFDP_QSPI.cfx
Sending VECTRESET to run flash driver
request to clear DAP error failed - status 5
start - reading XPSR register failed - rc Nn(05). Wire ACK Fault in DAP access
chip initialization failed - Nn(05). Wire ACK Fault in DAP access
failed to initialize flash driver MIMXRT1050_SFDP_QSPI.cfx
request to clear DAP error failed - status 5
request to clear DAP error failed - status 5
error closing down debug session - Nn(05). Wire ACK Fault in DAP access
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

People on the forums suggested switching to J-Link.

I've followed the instructions from BlackNight‌'s blog. I also changed the MaxSize in JLinkDevices.xml to match the larger chip.

<!-- -->
 <!-- NXP (iMXRT105x) -->
 <!-- -->
 <Device>
 <ChipInfo Vendor="NXP" Name="MCIMXRT1051" WorkRAMAddr="0x20000000" WorkRAMSize="0x00080000" Core="JLINK_CORE_CORTEX_M7" JLinkScriptFile="Devices/NXP/iMXRT105x/NXP_iMXRT105x.pex" />
 <FlashBankInfo Name="QSPI Flash" BaseAddr="0x60000000" MaxSize="0x08000000" Loader="Devices/NXP/iMXRT105x/NXP_iMXRT105x_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
 </Device>
 <Device>
 <ChipInfo Vendor="NXP" Name="MIMXRT1051xxxxA" WorkRAMAddr="0x20000000" WorkRAMSize="0x00080000" Core="JLINK_CORE_CORTEX_M7" JLinkScriptFile="Devices/NXP/iMXRT105x/NXP_iMXRT105x.pex" Aliases="MIMXRT1051xxx5A; MIMXRT1051CVL5A; MIMXRT1051xxx6A; MIMXRT1051DVL6A" />
 <FlashBankInfo Name="QSPI Flash" BaseAddr="0x60000000" MaxSize="0x08000000" Loader="Devices/NXP/iMXRT105x/NXP_iMXRT105x_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
 </Device>
 <Device>
 <ChipInfo Vendor="NXP" Name="MIMXRT1051xxxxB" WorkRAMAddr="0x20000000" WorkRAMSize="0x00080000" Core="JLINK_CORE_CORTEX_M7" JLinkScriptFile="Devices/NXP/iMXRT105x/NXP_iMXRT105x.pex" Aliases="MIMXRT1051xxx5B; MIMXRT1051CVL5B; MIMXRT1051xxx6B; MIMXRT1051DVL6B" />
 <FlashBankInfo Name="QSPI Flash" BaseAddr="0x60000000" MaxSize="0x08000000" Loader="Devices/NXP/iMXRT105x/NXP_iMXRT105x_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
 </Device>
 <Device>
 <ChipInfo Vendor="NXP" Name="MCIMXRT1052" WorkRAMAddr="0x20000000" WorkRAMSize="0x00080000" Core="JLINK_CORE_CORTEX_M7" JLinkScriptFile="Devices/NXP/iMXRT105x/NXP_iMXRT105x.pex" />
 <FlashBankInfo Name="QSPI Flash" BaseAddr="0x60000000" MaxSize="0x08000000" Loader="Devices/NXP/iMXRT105x/NXP_iMXRT105x_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
 </Device>
 <Device>
 <ChipInfo Vendor="NXP" Name="MIMXRT1052xxxxA" WorkRAMAddr="0x20000000" WorkRAMSize="0x00080000" Core="JLINK_CORE_CORTEX_M7" JLinkScriptFile="Devices/NXP/iMXRT105x/NXP_iMXRT105x.pex" Aliases="MIMXRT1052xxx5A; MIMXRT1052CVL5A; MIMXRT1052xxx6A; MIMXRT1052DVL6A" />
 <FlashBankInfo Name="QSPI Flash" BaseAddr="0x60000000" MaxSize="0x08000000" Loader="Devices/NXP/iMXRT105x/NXP_iMXRT105x_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
 </Device>
 <Device>
 <ChipInfo Vendor="NXP" Name="MIMXRT1052xxxxB" WorkRAMAddr="0x20000000" WorkRAMSize="0x00080000" Core="JLINK_CORE_CORTEX_M7" JLinkScriptFile="Devices/NXP/iMXRT105x/NXP_iMXRT105x.pex" Aliases="MIMXRT1052xxx5B; MIMXRT1052CVL5B; MIMXRT1052xxx6B; MIMXRT1052DVL6B" />
 <FlashBankInfo Name="QSPI Flash" BaseAddr="0x60000000" MaxSize="0x08000000" Loader="Devices/NXP/iMXRT105x/NXP_iMXRT105x_QSPI.elf" LoaderType="FLASH_ALGO_TYPE_OPEN" />
 </Device> ‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

If I flash over USB, then run in debug, I am able to connect and step through the code. So that is an improvement over the LinkServer. But when I make changes to the code and try to flash/debug over the LPC-Link 2 within the IDE it does not work. It starts, does a compare, but never does an erase or program even though the code has changed.

pastedImage_1.png

Does anyone have any suggestions?

Labels (1)
0 Kudos
1 Reply

1,263 Views
FelipeGarcia
NXP Employee
NXP Employee

Hello Mike,

I recommend you to check the following community blog. The troubleshooting section of the document gives some ideas of how to regain debug access to your board by booting into serial downloader mode and executing a mass erase.

https://community.nxp.com/t5/MCUXpresso-Community-Articles/Overview-of-using-the-MIMXRT1050-EVK-B-wi...

Hope it helps!

Best regards,

Felipe

0 Kudos