LPC1114 works great, until CRP & UART

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

LPC1114 works great, until CRP & UART

510 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by coryrc on Mon Nov 07 13:38:36 MST 2011
Hi All,

I have an LPC1114 running an application just fine without CRP enabled. Once CRP2 is enabled (using -flash-protect=2) the device functions normally (responds to discrete and analog inputs appropriately) until it receives a byte from the UART (or tries to respond), at which point it freezes. Receive and response does not involve anything other than the UART and memory accesses.

Same thing after a power cycle.

My understanding of CRP is it only affects external access to the chip. Is there something I am overlooking?

Thanks,
Cory
0 Kudos
2 Replies

446 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by coryrc on Mon Nov 07 15:29:47 MST 2011

Quote: Zero
Does your project include CRP?

If your linker script doesn't define CRP at 0x000002FC, writing CRP to this address will mutilate your code :eek:
See also: http://support.code-red-tech.com/CodeRedWiki/CodeReadProtect?highlight=%28CRP%29



Ah! Thank you!

I then checkbox'd the "Enable Code Read Protect" option in the MCU Linker->Target property, but when I include
__CRP unsigned int CRP_WORD = CRP_NO_ISP ;
I get "./driver/crp.o:(.crp+0x0): multiple definition of `CRP_WORD'"

I found the solution here:
http://knowledgebase.nxp.com/showthread.php?t=2151&langid=2

so I deselected crp.c for the project and it worked!

Thanks!
0 Kudos

446 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ex-Zero on Mon Nov 07 14:09:59 MST 2011
Does your project include CRP?

If your linker script doesn't define CRP at 0x000002FC, writing CRP to this address will mutilate your code :eek:

*(.after_vectors*)
        
        /* Code Read Protect data */
        . = 0x000002FC ;
        PROVIDE(__CRP_WORD_START__ = .) ;
        KEEP(*(.crp))
        PROVIDE(__CRP_WORD_END__ = .) ;
        ASSERT(!(__CRP_WORD_START__ == __CRP_WORD_END__), "Linker CRP Enabled, but no CRP_WORD provided within application");
        /* End of Code Read Protect */
See also: http://support.code-red-tech.com/CodeRedWiki/CodeReadProtect?highlight=%28CRP%29
0 Kudos