Hi,
We have our own device with LPC55S28 rev B1. Our current hardware design doesn't support ISP pin & any possibilities to communicate with ISP, so we couldn't execute any ISP command.
We use MCUXpresso IDE v11.3.1 (ubuntu 18.04) + LPC-LINK2 CMSIS-DAP V5.361 (LPCXpresso55S28 rev A2) as debug probe. When CPU has a valid application, firmware uploading with crt_emu_cm_redlink works correctly.
Buf during development we had erased flash on LPC55S28 with crt_emu_cm_redlink and power off this chip. Then after reboot all flash commands of crt_emu_cm_redlink returns error Ef(34): Timed-out initializing flash. We try to use --rst or --vc, but have a same error. Is there something I'm missing? Is there another way to upload application to LPC55S28?
/usr/local/mcuxpressoide/ide/binaries/crt_emu_cm_redlink --flash-load-exec ./build_lpc55s28_Debug/starter/pks-starter.axf -p LPC55S28 --vendor=NXP --bootromstall 0x50000040 --flash-driver= -x ./tools/deps/lpc55s28/flash --flash-hashing 2>&1
Ns: MCUXpresso IDE RedlinkMulti Driver v11.3 (Mar 30 2021 17:55:57 - crt_emu_cm_redlink build 18)
Wc(03). No cache support.
Nc: Found chip XML file in ./tools/deps/lpc55s28/flash/LPC55S28.xml
Nc: Restarted LinkServer process (PID 19879).
Nc: Probe Firmware: LPC-LINK2 CMSIS-DAP V5.361 (NXP Semiconductors)
Nc: Serial Number: GTA0BQEQ
Nc: VID:PID: 1FC9:0090
Nc: USB Path: /dev/hidraw6
Nc: Using memory from core 0 after searching for a good core
Pc: ( 30) Emulator Connected
Pc: ( 40) Debug Halt
Pc: ( 50) CPU ID
Nc: debug interface type = CoreSight DP (DAP DP ID 6BA02477) over SWD TAP 0
Nc: processor type = Cortex-M33 (CPU ID 00000D21) on DAP AP 0
Nc: number of h/w breakpoints = 8
Nc: number of flash patches = 0
Nc: number of h/w watchpoints = 4
Nc: Probe(0): Connected&Reset. DpID: 6BA02477. CpuID: 00000D21. Info: <None>
Nc: Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Ns: Content of CoreSight Debug ROM(s):
Nc: RBASE E00FE000: CID B105100D PID 0000095000 ROM (type 0x1)
Nc: ROM 1 E00FF000: CID B105100D PID 04000BB4C9 ROM (type 0x1)
Nc: ROM 2 E000E000: CID B105900D PID 04000BBD21 CSt ARM ARMv8-M type 0x0 Misc - Undefined
Nc: ROM 2 E0001000: CID B105900D PID 04000BBD21 CSt ARM DWTv2 type 0x0 Misc - Undefined
Nc: ROM 2 E0002000: CID B105900D PID 04000BBD21 CSt ARM FPBv2 type 0x0 Misc - Undefined
Nc: ROM 2 E0000000: CID B105900D PID 04000BBD21 CSt ARM ITMv2 type 0x43 Trace Source - Bus
Nc: ROM 1 E0040000: CID B105900D PID 04000BBD21 CSt type 0x11 Trace Sink - TPIU
Nc: NXP: LPC55S28
Nc: DAP stride is 1024 bytes (256 words)
Wc: XML Error - no license-type XML file 'crt_common.xme' on path.
Nc: note - part information contained no product license-type data
Nc: Inspected v.2 On chip Flash memory using IAP lib LPC55xx.cfx
Nc: Image 'LPC55xx Mar 22 2021 08:12:51'
Nc: Opening flash driver LPC55xx.cfx
Nc: Sending VECTRESET to run flash driver
Nc: AFTER driver startup timeout (302 5ms retries)
Wc: Driver Addresses
Wc: Start: 14000000
Wc: Entry: 1400009D
Wc: End: 14000514
Wc: Stack: 30000800
Wc: Mailbox:30006800
Wc: Driver Register State
Wc: R0: 30006800
Wc: R1: 00000000
Wc: R2: 00000000
Wc: R3: 00000000
Wc: R4: 00000000
Wc: R5: 00000000
Wc: R6: 00000000
Wc: R7: 00000000
Wc: R8: 00000000
Wc: R9: 00000000
Wc: R10: 00000000
Wc: R11: 00000000
Wc: R12: 00000000
Wc: SP: 30004000
Wc: LR: FFFFFFB8
Wc: PC: EFFFFFFE
Wc: xPSR: 29000003
Wc: MSP: 30004000
Wc: PSP: 30000800
Wc: CFBP: 00000001 (CONTROL=0x0, FAULTMASK=0x0, BASEPRI=0x0, PRIMASK=0x1)
Nc: Flash Driver V.2 startup failed - rc Ef(34): Timed-out initializing flash.
Ec: vendor chip initialization failed - Ef(34): Timed-out initializing flash.
Wc: failed to initialize flash driver LPC55xx.cfx
I hope you are doing well, To narrow down this, there are several different things that we could try:
First Is good to check if you have the latest version of LPCscrypt, that can be found here
Try to update the LPC-Link 2 CMSIS firmware. The LPCXpresso EVB has a jumper to set the debug probe in DFU, set that jumper and use the LPCscrypt.
Also ,you can try to update the LPC-Link 2 with the CMSIS firmware. I use to do sanity test by using Segger's J-Link Commander (usually it is installed on your PC when installing MCUXpresso) checking if the utility can connect with the MCU and see if an erase command works.
*If you require more details on how use LPCscrypt to program the LPC-Link2 let me know.
Let me know your findings
Regards!,
Diego