Keil Logo Arm Logo

How can i Set CRP in LPC2148....what to do with write at location 0x000001FC.

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Details Message
Read-Only
Author
shailesh patel
Posted
24-Sep-2013 06:37 GMT
Toolset
ARM
New! How can i Set CRP in LPC2148....what to do with write at location 0x000001FC.

I Know all the values and Location to Set desired CRP(CODE READ PROTECTION)...but doesn't know how can i set this in my program or is there any other way to SET CRP.....

Read-Only
Author
Per Westermark
Posted
24-Sep-2013 08:13 GMT
Toolset
ARM
New! RE: How can i Set CRP in LPC2148....what to do with write at location 0x000001FC.

Just specify in the startup file that you have a constant to store at that specific absolute address.

Read-Only
Author
shailesh patel
Posted
24-Sep-2013 09:07 GMT
Toolset
ARM
New! RE: How can i Set CRP in LPC2148....what to do with write at location 0x000001FC.

But Actually i don't know how to do it......if you will specify in brief than it will be better for me.....how to do it......

Read-Only
Author
Per Westermark
Posted
24-Sep-2013 14:56 GMT
Toolset
ARM
New! RE: How can i Set CRP in LPC2148....what to do with write at location 0x000001FC.

There are a few times when getting the final solution quickly is the best alternative.

But it is often better to _not_ get the solution directly but instead having to spend some own time looking for it. Why? Because of all the additional things people tend to learn while googling for something.

The only way we can keep up with constantly progressing technologies is by keeping our eyes open for new things to learn.

It really shouldn't take long time to manage to find some information about how to specify an absolute code area in the startup file, and how to there declare a 4-byte constant with one of the CPR values specified in the processor user manual.

So one instruction line for the assembler to tell the address and that the constant should be read-only in a code segment.
And one line to tell that it is a 32-bit value and what value it is.

Read-Only
Author
shailesh patel
Posted
25-Sep-2013 07:18 GMT
Toolset
ARM
New! RE: How can i Set CRP in LPC2148....what to do with write at location 0x000001FC.

Got it the solutions...thank you.....

just few lines and got best result


;//   <h> Code Read Protection level (CRP)
;//     <o>    CRP_Level:
;//                     <0xFFFFFFFF=> Disabled
;//                     <0x12345678=> CRP1
;//                     <0x87654321=> CRP2
;//                     <0x43218765=> CRP3 (Are you sure?)
;//   </h>
CRP_Level               EQU     0x12345678


                IF      :LNOT::DEF:NO_CRP
                AREA    |.ARM.__at_0x01FC|, CODE, READONLY
CRP_Key         DCD     CRP_Level
                ENDIF


                AREA    |.text|, CODE, READONLY


Read-Only
Author
Per Westermark
Posted
25-Sep-2013 14:58 GMT
Toolset
ARM
New! RE: How can i Set CRP in LPC2148....what to do with write at location 0x000001FC.

Nice that you got it working.

The good thing with the above is that you now left one more hint for others to pick up with Google (if they decide to try Google).

Next Thread | Thread List | Previous Thread Start a Thread | Settings

Keil logo

Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings