Hi Omid,
What was previously programmed to the MCU? Have you tried using the "Program Flash" option in LPCXpresso to see if the same problem is present?
I have done some tests on my LPCXpresso4367 board and don't have any problem:
C:\Users\b38285>cd C:\nxp\LPCScrypt\scripts
C:\nxp\LPCScrypt\scripts>boot_lpcscrypt.cmd
Booting LPCScrypt target with "LPCScrypt_140.bin.hdr"
LPCScrypt target booted
C:\nxp\LPCScrypt\scripts>cd C:\nxp\LPCScrypt\bin
C:\nxp\LPCScrypt\bin>lpcscrypt querypart
partID = 0x8001c030 0
decode = LPC4367: BankA 512KB, BankB 512KB
Core Clock = 180000000
C:\nxp\LPCScrypt\bin>lpcscrypt queryflash
Number of Flash Devices = 4
Name = SPIFI
Base = 0x14000000
Size = 0x100000
Page = 0x100
Sector = 0x10000
Blank = 0xff
Buffer = 0x8000
Name = BankA
Base = 0x1a000000
Size = 0x80000
Page = 0x1000
Sector = 8-64KB
Blank = 0xff
Buffer = 0x8000
Name = BankB
Base = 0x1b000000
Size = 0x80000
Page = 0x1000
Sector = 8-64KB
Blank = 0xff
Buffer = 0x8000
Name = EEPROM
Base = 0x20040000
Size = 0x3f80
Page = 0x80
Sector = NA
Blank = 0x0
Buffer = 0x8000
C:\nxp\LPCScrypt\bin>lpcscrypt program ..\images\periph_blinky.bin BankA
.
Programmed 8612 bytes to 0x1a000000 in 0.031s (271.295KB/sec)
C:\nxp\LPCScrypt\bin>lpcscrypt verify ..\images\periph_blinky.bin BankA
.
Verified 8612 bytes to 0x1a000000 in 0.006s (1401.693KB/sec)
C:\nxp\LPCScrypt\bin>lpcscrypt gotoimage BankA
After programming the image I erased it and programmed it again without any problem:
C:\nxp\LPCScrypt\bin>cd C:\nxp\LPCScrypt\scripts
C:\nxp\LPCScrypt\scripts>boot_lpcscrypt.cmd
Booting LPCScrypt target with "LPCScrypt_140.bin.hdr"
LPCScrypt target booted
C:\nxp\LPCScrypt\scripts>cd C:\nxp\LPCScrypt\bin
C:\nxp\LPCScrypt\bin>lpcscrypt querypart
partID = 0x8001c030 0
decode = LPC4367: BankA 512KB, BankB 512KB
Core Clock = 180000000
C:\nxp\LPCScrypt\bin>lpcscrypt blankcheck BankA
Not blank at 0x1a000000
C:\nxp\LPCScrypt\bin>lpcscrypt erase BankA
Erasing BankA ... completed in 0.201s
C:\nxp\LPCScrypt\bin>lpcscrypt program ..\images\periph_blinky.bin BankA
.
Programmed 8612 bytes to 0x1a000000 in 0.030s (280.282KB/sec)
C:\nxp\LPCScrypt\bin>lpcscrypt verify ..\images\periph_blinky.bin BankA
.
Verified 8612 bytes to 0x1a000000 in 0.004s (2102.014KB/sec)
C:\nxp\LPCScrypt\bin>lpcscrypt gotoimage BankA
I'm flashing the blinky example that comes with the LPCOpen package for the LPCXpresso4337 and LPCXpresso43S37 boards (Compatible with LPCXpresso4367 and LPCXpresso43S67 boards):
LPCOpen Software for LPC43XX|NXP
Hope it helps!
Best Regards,
Carlos Mendoza
Technical Support Engineer