Problem with IAP blanking flash - LPC824

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Problem with IAP blanking flash - LPC824

1,302 次查看
josefrval
Contributor I
I ported my project that ran on LPCXPresso version 7.9.2 to MCUXpresso 11.6. The project worked normally, however I had a failure in a feature. In this functionality, at some point I run the software only in RAM and completely erase the flash and then write a new version to the flash. The process fails with a hard fault error when I try to delete the flash. I am using the IAP_ENTRY functions. I suspect the boot sector is protected but I can't figure out how to unlock it.
0 项奖励
回复
7 回复数

1,242 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @josefrval 

Maybe the flash memory you erased is still used by project.

You can try to erase  other memory that your flash not used.

 

BR

Alice

0 项奖励
回复

1,234 次查看
josefrval
Contributor I
Hi Alice,
The memory I'm erasing is the entire flash. When I try to delete it, the code is running in RAM. I'm trying to do this so that new code can be written to flash. This code works perfectly in LPCXpresso version 7.9.2. IDE. I can't figure out why after importing the project, it doesn't work in MCUXpresso.
0 项奖励
回复

1,228 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @josefrval 

It is works on LPCxpresso, so how about run project standalone without IDE?

How about send your project to me ? I help to check on my side.

 

BR

Alice

0 项奖励
回复

1,274 次查看
josefrval
Contributor I
Thanks Alice, but it isn't the question. We need to erase the flash on the flight, in run time, for updating with a new code, why we need to use IAP functions. If you want, I can post the code.
0 项奖励
回复

1,261 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @josefrval 

Recommend you use this tool to erase to check whether the flash can erased, because you said "boot sector is protected", also we can eliminate hardware issue firstly.

 

BR

Alice

0 项奖励
回复

1,257 次查看
josefrval
Contributor I

Hi @Alice_Yang , I checked but we didn't have any problem:

Executing flash operation 'Erase' (Erase flash) - Mon Mar 20 16:10:42 BRT 2023
Checking MCU info...
Scanning for targets...
Executing flash action...
MCUXpresso IDE RedlinkMulti Driver v11.6 (Oct 3 2022 08:09:13 - crt_emu_cm_redlink.exe build 9)
( 0) Reading remote configuration
Wc(03). No cache support.
Found chip XML file in C:/Desenvolvimento/Dankia/mcuxpresso/Workspace/fmw8gavstop/fmwdriverlpc82x/GavLaserScan-Release\LPC824.xml
( 5) Remote configuration complete
Reconnected to existing LinkServer process.
Probe Firmware: LPC-Link Probe v1.3 (NXP - LPC-Link)
Serial Number: WIN64HS12
VID:PID: 1FC9:0009
USB Path:
Using memory from core 0 after searching for a good core
On debug connection - reset using system reset
( 30) Emulator Connected
( 40) Debug Halt
( 50) CPU ID
debug interface type = CoreSight DP (DAP DP ID 0BC11477) over SWD TAP 0
processor type = Cortex-M0+ (CPU ID 00000C60) on DAP AP 0
number of h/w breakpoints = 4
number of flash patches = 0
number of h/w watchpoints = 2
Probe(0): Connected&Reset. DpID: 0BC11477. CpuID: 00000C60. Info: <None>
Debug protocol: SWD. RTCK: Disabled. Vector catch: Enabled.
Content of CoreSight Debug ROM(s):
RBASE F0000000: CID B105100D PID 0500081000 ROM (type 0x1)
ROM 1 0x14000000: (dev #2) no valid device here - powered down?
ROM 1 E00FF000: CID B105100D PID 04000BB4C0 ROM (type 0x1)
ROM 3 E000E000: CID B105E00D PID 04000BB008 Gen SCS (type 0x0)
ROM 3 E0001000: CID B105E00D PID 04000BB00A Gen DWT (type 0x0)
ROM 3 E0002000: CID B105E00D PID 04000BB00B Gen FPB (type 0x0)
NXP: LPC824
DAP stride is 1024 bytes (256 words)
Inspected v.2 On-chip Flash Memory LPC800_32.cfx
Image 'LPC800 (32K) Sep 19 2022 09:11:41'
( 65) Chip Setup Complete
Connected: was_reset=false. was_stopped=true
( 70) License Check Complete
Opening flash driver LPC800_32.cfx
Sending SYSRESETREQ to run flash driver
Flash device supported (32KB = 32*1K at 0x0)
Mass Erase flash at 0x0
Closing flash driver LPC800_32.cfx
MassErase completed (in 136ms)
 

0 项奖励
回复

1,283 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello @josefrval 

How about use "GUI Flash Tool" to erase:

Alice_Yang_0-1679049028624.png

 

BR

Alice

0 项奖励
回复