Hi NXP,
Our customer will disable ISP mode before booting, below is the code to modify the CMPA register.
But after running the code, LPC55 will disable ISP and SWD (debug) function.
Question:
1> Why the code will affect the debug funtion ?
2>How to recover the debug function ?
3>How to disable ISP mode only ?
Thanks very much.
Hello, my name is Pavel, and I will be supporting your case, I reviewed your case see questions below,
1> Why the code will affect the debug function?
Maybe the register was not written correct, what was the hex number you use to write?
2>How to recover the debug function?
For that need to do a mass erase, could use the SPT tool or the BLHOST tool.
3>How to disable ISP mode only?
Let me research more information about this.
Best regards,
Pavel
Hi, Pavel,
1>from the code, you can see that I have read the orignal data via the function FFR_GetCustomerData, then change the first byte to 0x70, and then write it back to the flash via FFR_CustFactoryPageWrite. And I
have took a quick look at the original data when debug, there were all 0x00.
2>Is the SPT tool or the BLHOST tool could work without debug port? and where can I get those tools?
Hello, my apologize I never use it before that function FFR_CustFactoryPageWrite. I saw the CMPA information, and the disabled ISP is on address 0x9E400 and need to put 0x70 to active the 6:4 bits.
So, I reviewed your function FFR_CustFactoryPageWrite your data configuration seems to be well, offset 0 and len 512, and the same with the FFR_CustFactoryPageWrite.
Could you please share me this part of your code to get more details?
-To use the BLHOST I recommend install the SPSDK, this has a bunch of tools in same places.
I make on the past a similar document with other LPC maybe could help you.
attached below, only change the LPC for the LPC55s69, and the address that you need to modify.
Best regards,
Pavel
Thanks @Pavel_Hernandez , that document was helpful. Your document contains the information absent from both the reference manual and the BLHOST manual, but which ought to be included in those manuals.
1>the original data is as below:
I have modified the 0x2000186c to 0x70, and then write it back.
2>I have installed the spsdk, and connect the board via cmsis-dap,but I got a different result from the manual when I use the "nxpdevscan" command:
Hello, about the communication with the Blhost you need to use a UART and USB to Serial. I mean connect your board to the PC push the bottom ISP and then Reset to enter in ISP mode.
On the board the debugger has UART interface you can use the same debug link port P6.
Best regards,
Pavel
Hello, if the ISP is disable and the SWD is active, you could use the flash IAP to restore that.
Here is a thread that could help you about that
[LPC55]: Disable ISP and SWD to utilize code protection - NXP Community
Best regards,
Pavel
My problem is When I disabled the ISP(modified the first byte to 0x70), the SWD also been disabled. So the chip is unable to recover.
Hello, my apologize for the delayed response, how the SWD was locked too? Did you write other number instead of 0x70? to recovery need to do a mas erase but, in this case, maybe could use the mailbox.
Updated Debug Mailbox commands for LPC55S69 - NXP Community
Best regards,
Pavel