Hello,
I was trying to enable flash protect on LPC55s28 with the solution marked as working from Erik_M and after reset I am unable to connect to the board, but the board runs correctly (I can see that on the UART output). This is the debugger output when trying to connect:
paplewski_1-1644949640880.png
Output from the UART suggests that the CMPA page was written correctly:
paplewski_2-1644950213853.png
---
On the other hand I've previously tried the code from original poster bas_v on custom hardware with LPC5528 it seems to be bricked after reset (on output on the UART, no LED turns on)...
Could you please help me with enabling the flash protection on these platforms?? Also is there a way to recover access any of this boards?
Output from the Jlink commander for LPC5528:
SEGGER J-Link Commander V7.60c (Compiled Jan 7 2022 16:15:01)
DLL version V7.60c, compiled Jan 7 2022 16:13:45
Connecting to J-Link via USB...O.K.
Firmware: J-Link V11 compiled Dec 9 2021 14:14:49
Hardware version: V11.00
S/N: 601012298
License(s): RDI, FlashBP, FlashDL, JFlash, GDB
USB speed mode: High speed (480 MBit/s)
VTref=2.806V
Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. <Default>: LPC5528
Type '?' for selection dialog
Device>
Please specify target interface:
J) JTAG (Default)
S) SWD
T) cJTAG
TIF>s
Specify target interface speed [kHz]. <Default>: 4000 kHz
Speed>
Device "LPC5528" selected.
Connecting to target via SWD
ConfigTargetSettings() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
ConfigTargetSettings() end
InitTarget() start
Enabling debug access failed (timeout).
InitTarget() end
ConfigTargetSettings() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
ConfigTargetSettings() end
InitTarget() start
Enabling debug access failed (timeout).
InitTarget() end
ConfigTargetSettings() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
ConfigTargetSettings() end
InitTarget() start
ERROR: Wrong DM-AP IDCODE detected: 0xFFFFFFFF
InitTarget() end
ConfigTargetSettings() start
Disabling flash programming optimizations: Compare, SkipBlankDataOnProg
ConfigTargetSettings() end
InitTarget() start
Enabling debug access failed (timeout).
InitTarget() end
Cannot connect to target.