CRP3 and user code invalid

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

CRP3 and user code invalid

1,151 Views
christian_greni
Contributor I

Hello,

I noticed in the user manual that the LPC1317 uC will enter in ISP mode if the user code is invalid and the code protection is CRP3.  However,  I don't see in the document which ISP commands are available in that mode. 

The table 345 in the user manual mentions the CRP3 as N/A for all ISP commands. But there is no description in that table if the user code is invalid (i.e. the vector is corrupted)...  I'd like to know the list the ISP is available in CRP3 mode.

Best regards

Christian

Labels (1)
0 Kudos
5 Replies

837 Views
christian_greni
Contributor I

Capture.JPG

Here is the table from the application note that you supplied.  As you can see, the ISP command are disabled if CRP3 is enabled.  In my case, you can enter in ISP mode if CRP3 is enabled and user code is not valid (see next figure)...    

In the next image, you can see in the first table that you can enter in ISP mode when CRP3 is enabled. In the last table, it misses a column with CRP3 in ISP mode.  I think the last column is wrong, you can enter in ISP mode if the CRP3 is activated and the user code is not valid(interrupt vector is erased or corrupted).  

Capture 2.JPG

0 Kudos

837 Views
converse
Senior Contributor V

AFAIK, If the checksum is invalid, then CRP does not exist. In other words, the CRP value is ignored if there is no valid vector checksum. To think about it logically - if the checksum is inbvalid, you cannot trust any part of the image, including the CRP.

Note: CRP is implemented by the boot rom - it is not a hardware setting. Simplistically, the boot rom initialises the chip and then checks to see if there is valid code (via the vector checksum). If there is valid code, it then goes on to check CRP etc. So, if there is no valid code, CRP is not checked.

Hope that helps

0 Kudos

837 Views
christian_greni
Contributor I

Capture3.JPG

Hello Converse.

As you can see in the image... you can have a CRP3 available at the address 0x2FC, but the user code not valid.  In that case, you can enter in UART ISP.  I already experimented that.  A firmware in which I set CRP3 and I called a function to erase the page 0.  When I power cycle the micro, it enters in ISP mode...  I cannot read back the internal memory.  So, some ISP commands are disabled,  I cannot erase one page but erasing all memory works.  It's why I think that some information is missing in the document.  I want to have a confirmation about it or misunderstood of that topic. 

Thanks a lot.

Christian

0 Kudos

837 Views
christian_greni
Contributor I

Hello,

What I want to know it's only a confirmation that CRP3 is like CRP2 regarding the ISP commands allowed (see table 345 above).

0 Kudos

837 Views
soledad
NXP Employee
NXP Employee

Hi,

Please check the following application note, this appnote shows a comparison of CRP levels supported by the LPC1100/LPC1300 part families, as well as an overview of using CRP in LPCXpresso.

https://www.nxp.com/docs/en/application-note/AN10968.pdf 

I hope this helps,


Have a great day,
Sol

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos