AnsweredAssumed Answered

LPC54114 NO_ISP setting for CRP

Question asked by Luke Beno on Jan 29, 2018
Latest reply on Feb 1, 2018 by Kerry Zhou

I am using PIO0_31 in my product which also happens to be the pin that is used to put the MCU into ISP mode at boot.  Due to pin constraints, it is really difficult to use a different pin and I do not really intend jumping to the ISP modes using this pin.


Reading the User guide, it appeard that I can disable the ISP modes using the CRP register location in Flash.  Reading through the documents here  Page 119, it sounds like the following code can instruct the linker to load in this setting to Flash:

__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;


The doc also refers to a gui setting in the "linker tab" which I have been unable to find.  I did find the code snippet in my startup_lpc5411x.c file.  So I edited that file to:

// Variable to store CRP value in. Will be placed automatically
// by the linker when "Enable Code Read Protect" selected.
// See crp.h header for more information
#if !defined (CORE_M0PLUS)
#include <NXP/crp.h>
__CRP const unsigned int CRP_WORD = CRP_NO_ISP;

Re-build and program the device, it seems like the ISP is still enabled.  I test by driving the PIO0_31 pin low (enables ISP) and I can see with the debugger that the CPU jumps to a bootloader.  If I drive the pin high, code runs as expected.


So I'm confident that my method for changing CRP is not working, what is the recommended way, is there some GUI function that overrides it?