LPC5536 error finishing flash operation (but flashing is successful)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC5536 error finishing flash operation (but flashing is successful)

ソリューションへジャンプ
421件の閲覧回数
leannee
Contributor II

Hello! I am using MCU-Link with a custom board with LPC5536. I can flash the target, but the flash operation ends with error (can't reset I guess).

The RESET pin is connected to the appropriate SWD pin, I checked.

It is strange: AFAIK the programming operation starts with reset, isn't it?

Output from gdb (with LinkServer):

 

(gdb) load
Loading section .text, size 0x1d330 lma 0x0
Loading section .ARM.exidx, size 0x8 lma 0x1d330
Loading section .data, size 0x1f4 lma 0x1d338
Loading section .exception_ram, size 0x64 lma 0x1d52c
Error finishing flash operation

 

 Output from MCUXpresso:

 

Executing flash operation 'Program' (Program file into flash: lpcxpresso55s36__hello_world_virtual_com.axf) - Mon Feb 05 11:01:19 CET 2024
Checking MCU info...
Scanning for targets...
Executing flash action...
MCUXpresso IDE RedlinkMulti Driver v11.8 (Jul 12 2023 16:09:15 - crt_emu_cm_redlink.exe build 2)
(  0) Reading remote configuration
Wc(03). No cache support.
Found chip XML file in C:/Users/*/Documents/MCUXpressoIDE_11.8.0_1165/flex/lpcxpresso55s36__hello_world_virtual_com/Debug\LPC55S36.xml
(  5) Remote configuration complete
Reconnected to existing LinkServer process.
Probe Firmware: MCU-LINK (r0FF) CMSIS-DAP V3.133 (NXP Semiconductors)
Serial Number:  CJFGYDNXMOTNO
VID:PID:  1FC9:0143
USB Path: 0002:000b:00
Using memory from core 0 after searching for a good core
( 30) Emulator Connected
( 40) Debug Halt
( 50) CPU ID
debug interface type      = CoreSight DP (DAP DP ID 6BA02477) over SWD TAP 0
processor type            = Cortex-M33 (CPU ID 00000D21) 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: 00000D21. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Disabled.
Content of CoreSight Debug ROM(s):
RBASE E00FE000: CID B105100D PID 0000095000 ROM (type 0x1)
ROM 1 E00FF000: CID B105100D PID 04000BB4C9 ROM (type 0x1)
ROM 2 E000E000: CID B105900D PID 04000BBD21 CSt ARM ARMv8-M type 0x0 Misc - Undefined
ROM 2 E0001000: CID B105900D PID 04000BBD21 CSt ARM DWTv2 type 0x0 Misc - Undefined
ROM 2 E0002000: CID B105900D PID 04000BBD21 CSt ARM FPBv2 type 0x0 Misc - Undefined
ROM 2 E0000000: CID B105900D PID 04000BBD21 CSt ARM ITMv2 type 0x43 Trace Source - Bus
ROM 2 E0041000: CID B105900D PID 04002BBD21 CSt ARM ETMv4.0 type 0x13 Trace Source - Core
ROM 2 E0042000: CID B105900D PID 04000BBD21 CSt ARM CTIv2 type 0x14 Debug Control - Trigger, e.g. ECT
ROM 1 E0040000: CID B105900D PID 04000BBD21 CSt type 0x11 Trace Sink - TPIU
NXP: LPC55S36
DAP stride is 1024 bytes (256 words)
Inspected v.2 On chip Flash memory using IAP lib LPC553x.cfx
Image 'LPC553x Jul 25 2023 08:59:06'
Opening flash driver LPC553x.cfx
VECTRESET requested, but not supported on ARMv8-M CPUs. Using SOFTRESET instead.
Using SOFT reset to run the flash driver
Flash variant 'LPC553x (246KB)' detected (246KB = 492*512 at 0x0)
Closing flash driver LPC553x.cfx
Inspected v.2 External Flash Device on SPI using SFDP JEDEC ID LPC553x_FlexSPI_A_MXIC_OPI.cfx
Image 'LPC553X_FlexSPI_A_MXIC_OPI Jul 25 2023 09:16:51'
Opening flash driver LPC553x_FlexSPI_A_MXIC_OPI.cfx
VECTRESET requested, but not supported on ARMv8-M CPUs. Using SOFTRESET instead.
Using SOFT reset to run the flash driver
Flash variant 'JEDEC_FlexSPI_Device' detected (64MB = 1024*64K at 0x8000000)
Closing flash driver LPC553x_FlexSPI_A_MXIC_OPI.cfx
( 65) Chip Setup Complete
Connected: was_reset=true. was_stopped=false
( 70) License Check Complete
Loading 'lpcxpresso55s36__hello_world_virtual_com.axf' ELF 0x00000000 len 0xAB98
Opening flash driver LPC553x.cfx
VECTRESET requested, but not supported on ARMv8-M CPUs. Using SOFTRESET instead.
Using SOFT reset to run the flash driver
Flash variant 'LPC553x (246KB)' detected (246KB = 492*512 at 0x0)
Writing 43928 bytes to address 0x00000000 in Flash
(  0) Mass erasing Flash
Mass erased flash in 11msec
1 of 1 (  0) Writing sectors 0-85 at 0x00000000 with 43928 bytes
(  0) at 00000000: 0 bytes - 0/43928
( 27) at 00000000: 12288 bytes - 12288/43928
( 55) at 00003000: 12288 bytes - 24576/43928
( 83) at 00006000: 12288 bytes - 36864/43928
(100) at 00009000: 7168 bytes - 44032/43928
Sectors written: 86, unchanged: 0, total: 86
Wrote sector 0-85 with 43928 bytes in 331msec
Closing flash driver LPC553x.cfx
(100) Finished writing Flash successfully.
Flash Write Done
Loaded 0xAB98 bytes in 452ms (about 97kB/s)
Reset target (romstall)
============= SCRIPT: LPC553x_reset.scp =============
LPC553x Reset Script
Reset PMC LDO (PMC.LDOPMU,DCDC0,LDOCORE0)
Sending CMSYSRESETREQ
Error: Wire Ack Fault - target connected?
DpID = 6BA02477
Error: Wire Ack Fault - target connected?
============= END SCRIPT ============================
state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access
state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access

state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access

state - running or following reset request - re-read of state failed - rc Nn(05). Wire ACK Fault in DAP access

error closing down debug session - Nn(05). Wire ACK Fault in DAP access

 

 

What can I do and what is wrong? Maybe because the reset script is for LPC55s36?

 

Or is the only possible reason is no connection to the RESET pin from SWD connector?

ラベル(1)
0 件の賞賛
返信
1 解決策
358件の閲覧回数
leannee
Contributor II

It was connected, as I said in my post.

I actually can connect using LinkServer + cortex-debug set to "servertype" : "external" in VS code.

Important: I had to remove reset-script from the .json file for the target I use.

In MCUXpresso you can do the same (remove reset script from debug configuration).

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
407件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suppose that you must connect the Reset pin of LPC5536 to the SWD connector, the tools will drive the Reset pin when the tools downloads application code.

Pls have a try

BR

XiangJun Rong

 

0 件の賞賛
返信
359件の閲覧回数
leannee
Contributor II

It was connected, as I said in my post.

I actually can connect using LinkServer + cortex-debug set to "servertype" : "external" in VS code.

Important: I had to remove reset-script from the .json file for the target I use.

In MCUXpresso you can do the same (remove reset script from debug configuration).

0 件の賞賛
返信