Click here to Skip to main content
11,575,925 members (56,956 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: Microcontroller
I'm currently assigned to a project at the University,
where we are teamed up with students from other fields of study.
I have a hard time explaining how code is stored in a microprocessor.

They asked me a question, which I do not know how to answer:

"If a program has been stored in the microprocessor, is it then possible for other firms to take that microprocessor and read the program code in order to make a copy of it?"

Thanks you in advance
Posted 20-Nov-12 5:36am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Yes and no. It highly depends on many factors. In principle, in some processors architectures, code can be isolated the way it cannot be read in any other way except actually executing this code, which is, of course, does not fully reveal the content of the code memory.

(Some changes of state of the processor can be done strictly one-way. For example, with Intel x86/I64 architectures, it's possible to protect some memory segment which nothing can ever read, no matter in what protection ring. The segment can only be removed, by re-setting the processor or removing power supply.)

In simple processors, this is not the case. Also, the answer depends on what do you call "stored" and what is "in microprocessor". The code executed in microprocessor is not normally stored on it at all. It is stored in RAM, outside the processor. The exclusion is microcode (please see the reference below). Are your talking about some non-volatile memory? Usually, the RAM information which can be protected the way I explained, is stored only when the power is supplied. Some code can be stored in non-volatile memory which is logically act as RAM (example is BIOS, which has volatile and non-volatile memory, another thing is UEFI, which can be considered as BIOS alternative).

So, non-volatile memory outside processor can be read by at least one simple reason: it does not have to be attached to the CPU at all, at the same time, it is preserved when power is off. However, microcode could be totally protected, as its functionality does not require reading its context at all; its execution is engaged only when processor's instructions are get executed, so the presence of microcode is completely hidden from an outside observer.

Some information, just for general understanding:[^],[^],[^],[^],[^],[^].

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Depends on the microcontroller, and on how the data has been written to it.

Some have a security bit which when set corrupts some or all of the data when it is transferred out of the device (PIC devices do this -they are called the Code Protection Bits[^]) You explicitly set these bits once you have verified the information in the device against your master file to prevent subsequent access.
Some devices do not have anything like this - the older EPROM based ones in particular are very vulnerable in general.

BNe aware that most of these system can be broken in some way - the info is out there on the net, so this probably shouldnt be your only security mechanism if IP theft is a significant risk with your devices.


  Print Answers RSS
0 Sergey Alexandrovich Kryukov 370
1 Dave Kreskowiak 204
2 F-ES Sitecore 145
3 OriginalGriff 125
4 Abhinav S 98
0 OriginalGriff 705
1 Sergey Alexandrovich Kryukov 600
2 Abhinav S 438
3 F-ES Sitecore 410
4 Suvendu Shekhar Giri 365

Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 20 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid
