MEMORY PROGRAM SECURIZATION METHOD
A method of securization of programs in a memory embedded within a microcontroller includes writing a boot program into a first area of the memory and writing at least one additional program into at least one second area of the memory. One or more values of a first register are modified to provide a write protection of the first and second areas. A prohibition against modification of the one or more values of the first register is then implemented when those values are associated with a write protection state of the first area.
1 . A method of securization of programs in a memory of a microcontroller, comprising:
writing a boot program into a first area of said memory;
writing at least one additional program into at least one second area of said memory;
modifying one or a plurality of values of a first register to provide a write protection of the first and second areas; and
prohibiting modification of said one or a plurality of values of the first register when said one or a plurality of values are associated with a write protection state of the first area.
2 . The method according to claim 1 , wherein said first register associates a write protection state value with one or a plurality of areas of said memory.
3 . The method according to claim 1 , wherein prohibiting modification comprises a modification of a value of a second register.
4 . The method according to claim 3 , wherein the modification of the value of the second register is authorized according to a state of the microcontroller comprising said memory.
5 . The method according to claim 4 , wherein the state of the microcontroller comprising said memory is a state selected from among a regression state, a state open to writing, and a provisioning state.
6 . The method according to claim 3 , wherein the modification of the value of the second register is authorized by the use of a specific security code.
7 . The method according to claim 6 , wherein the second register is configured to take two distinct values each coded over a number of bits greater than or equal to 8, each bit of one of the two distinct values being different from the corresponding bit of the other value.
8 . The method according to claim 7 , wherein the second register is non-volatile.
9 . The method according to claim 8 , wherein the first register is non-volatile.
10 . The method according to claim 1 , wherein prohibiting modification of said one or a plurality of values of the first register is implemented after writing said at least one additional program into the at least one second area of said memory.
11 . The method according to claim 1 , wherein prohibiting modification of said one or a plurality of values of the first register is implemented prior to writing said at least one additional program into the at least one second area of said memory.
12 . The method according to claim 1 , wherein the first area of said memory is defined by two user option bytes.
13 . The method according to claim 1 , wherein the write protection of said boot program is implemented prior to the writing of said at least one additional program.
14 . A microcontroller comprising a memory and configured to implement the program securization method according to claim 1 in said memory.
15 . The microcontroller according to claim 14 , wherein said memory is non-volatile.