Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Microcontroller
Hi.
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
Br.
Nikolai
Posted 20-Nov-12 5:36am
Rate this: bad
good
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:
http://en.wikipedia.org/wiki/Ring_%28computer_security%29[^],
http://en.wikipedia.org/wiki/RAM[^],
http://en.wikipedia.org/wiki/Non-volatile_memory[^],
http://en.wikipedia.org/wiki/Micro-code[^],
http://en.wikipedia.org/wiki/BIOS[^],
http://en.wikipedia.org/wiki/UEFI[^].
 
—SA
  Permalink  
Rate this: bad
good
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.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 668
1 OriginalGriff 396
2 Tadit Dash 345
3 sanket saxena 329
4 Peter Leow 193
0 Sergey Alexandrovich Kryukov 12,109
1 OriginalGriff 7,326
2 Peter Leow 5,003
3 Abhinav S 4,003
4 Maciej Los 3,575


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