(19)
(11)EP 3 242 214 B1

(12)EUROPEAN PATENT SPECIFICATION

(45)Mention of the grant of the patent:
27.11.2019 Bulletin 2019/48

(21)Application number: 15874604.0

(22)Date of filing:  26.01.2015
(51)International Patent Classification (IPC): 
G06F 12/14(2006.01)
(86)International application number:
PCT/CN2015/071556
(87)International publication number:
WO 2016/106911 (07.07.2016 Gazette  2016/27)

(54)

METHOD AND DEVICE FOR PROTECTING INFORMATION OF MCU CHIP

VERFAHREN UND VORRICHTUNG ZUM SCHUTZ DER INFORMATIONEN AUF EINEM MCU-CHIP

PROCÉDÉ ET DISPOSITIF DE PROTECTION D'INFORMATIONS POUR PUCE MCU


(84)Designated Contracting States:
AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

(30)Priority: 30.12.2014 CN 201410851200

(43)Date of publication of application:
08.11.2017 Bulletin 2017/45

(73)Proprietor: Gigadevice Semiconductor (Beijing) Inc.
Beijing 100083 (CN)

(72)Inventors:
  • LI, Baokui
    Beijing 100083 (CN)
  • WANG, Jinghua
    Beijing 100083 (CN)
  • WANG, Nanfei
    Beijing 100083 (CN)

(74)Representative: KIPA AB 
P O Box 1065
251 10 Helsingborg
251 10 Helsingborg (SE)


(56)References cited: : 
EP-A1- 0 859 319
CN-A- 1 595 517
CN-A- 101 315 608
CN-A- 103 229 157
CN-A- 1 196 524
CN-A- 1 604 791
CN-A- 101 566 972
US-A1- 2007 136 576
  
      
    Note: Within nine months from the publication of the mention of the grant of the European patent, any person may give notice to the European Patent Office of opposition to the European patent granted. Notice of opposition shall be filed in a written reasoned statement. It shall not be deemed to have been filed until the opposition fee has been paid. (Art. 99(1) European Patent Convention).


    Description

    TECHNICAL FIELD



    [0001] The present disclosure relates to the field of electronic circuit and, more particularly, to an information protection method for an MCU chip and an information protection device for an MCU chip.

    BACKGROUND



    [0002] With the improvement of integrated circuit (IC), the application of an MCU chip becomes more widely used from toys to construction machinery. An MCU chip usually comprises a central processing unit (CPU), a flash, a static random access memory (SRAM) and a variety of peripherals. When the MCU chip is power down, flash content is not lost, while SRAM content is. A flash memory is usually composed of two distinct areas: one is a user area, used to store user's program, the other is an information area, used to store configuration information of the MCU chip. SRAM is usually used as an on-chip memory.

    [0003] For an MCU application solution provider, a manufacturer who develops program and PCB (printed circuit board) based on the MCU chip, the program will be recorded on the user area of a flash memory. The core value of the application solution provider is the program. Thus, the program should be protected from being stolen by others. The information protection method of an MCU chip is to protect the program stored in the user area of a flash memory from being stolen by others. The current information protection method for an MCU chip is only available to protect the program in the user area as a whole, but not able to protect a program developed by two or more cooperative companies. Because the current method can only be used to protect the program in the user area from being stolen by users, not be used to prevent the cooperative companies stealing the program from each other.

    [0004] EP0859319 A1 discloses a memory access control circuit giving a high degree of protection against a fraudulent access.

    [0005] Therefore, an urgent technical problem to be solved for the technicians in this field is: providing an information protection method for an MCU chip to protect the program from being stolen by users and prevent the companies who developed the program together stealing program from each other.

    SUMMARY



    [0006] The invention is set out in the appended set of claims. The dependent claims set out particular embodiments. The embodiments or examples of the following description which are not covered by the appended claims are considered as not being part of the invention according to this description.

    DESCRIPTION OF THE DRAWINGS



    [0007] 

    FIG 1 illustrates a flow diagram of an information protection method for an MCU chip according to an embodiment of the present disclosure;

    FIG 2 depicts a system schematic of an MCU chip based on a CPU with a Harvard architecture according to the present disclosure;

    FIG 3 shows a work flow schematic of a flash controller in an MCU chip according to the present disclosure;

    FIG 4 shows a structure diagram of an information protection device for an MCU chip according to the present disclosure.


    DESCRIPTION OF THE EMBODIMENTS



    [0008] In view of the above problems, the present disclosure discloses an information protection method for an MCU chip, the MCU chip comprises: an instruction bus, a data bus, a flash controller and a user area of a flash memory; the flash controller is used to divide the user area into a first sub-area and a second sub-area; the method comprising:

    when the instruction bus accesses the user area, determining whether the instruction bus accesses the first sub-area;

    if yes, entering the first sub-area working state; in the first sub-area working state, allowing the instruction bus to access the user area; allowing the data bus to access the first sub-area but prohibiting the data bus from accessing the second sub-area;

    when the flash controller is in the first sub-area working state, if the instruction bus accesses the second sub-area, entering a transition state; in the transition state, temporarily prohibiting the instruction bus from accessing the user area, allowing the data bus to access the first sub-area, but prohibiting the data bus from accessing the second sub-area;

    determining whether the time in the transition state reaches a preset waiting time;

    if yes, entering the second sub-area working state, in the second sub-area working state, allowing the instruction bus to access the user area, prohibiting the data bus from accessing the first sub-area, but allowing the data bus to access the second sub-area.



    [0009] Preferably, the method further comprises:
    after resetting the MCU chip, entering an initial state; in the initial state, allowing the instruction bus to access the user area, prohibiting the data bus from accessing the first sub-area or the second sub-area.

    [0010] Preferably, the MCU chip comprises a central processing unit (CPU) with a Harvard architecture; the preset waiting time is correlated with features of the CPU; if the CPU is ARM Cortex-M3, the preset waiting time is 20 CPU clock cycles.

    [0011] Preferably, the MCU chip comprises an information area of a flash memory, the information area comprises option bytes; the method further comprising:

    determining the reading protection state of the user area according to the option bytes;

    if in a zero-level reading protection state, allowing to perform reading, writing and erasing on the user area;

    if in a first-level reading protection state, allowing to perform reading, writing and erasing on the first sub-area, only when the MCU chip boots from the user area, allowing to perform reading, writing and erasing on the second sub-area;

    if in a second-level reading protection state, only when the MCU chip boots from the user area, allowing to perform reading, writing and erasing on the first sub-area and second sub-area.



    [0012] Preferably,
    in the zero-level reading protection state, allowing the option byte to be modified;
    in the first-level reading protection state, allowing the option bytes to be modified, if the reading protection state is modified from the first-level to the zero-level by modifying the option bytes, all information in the user area is erased;
    in the second-level reading protection state, prohibiting the option bytes from being modified.

    [0013] Preferably, an on-chip private peripheral can be implemented on the MCU chip, the private peripheral which only works normally when a first sub-area enabling signal is high is a first peripheral, the private peripheral which only works normally when a second sub-area enabling signal is high is a second peripheral; the method further comprising:
    in the first sub-area working state, or, in the first sub-area transition state, the first sub-area enabling signal is high; in the second sub-area working state, or, in the second sub-area transition state, the second sub-area enabling signal is high.

    [0014] Preferably, the private peripheral comprises a static random access memory (SRAM).

    [0015] Preferably, the first sub-area is located in the first half of an address space in the user area, the second sub-area is located in the second half of the address space in the user area.

    [0016] The present disclosure further discloses an information protection device for an MCU chip, the MCU chip comprises an instruction bus, a data bus, a flash controller and a user area; the flash controller is used to divide the user area into a first sub-area and a second sub-area, the device comprising:

    a first determining module, configured to, when the instruction bus accesses the user area, determine whether the instruction bus accesses the first sub-area; if yes, invoke a first entering module;

    a first entering module, configured to, enter the first sub-area working state; in the first sub-area working state, allow the instruction bus to access the user area; allow the data bus to access the first sub-area but prohibiting the data bus from accessing the second sub-area;

    a second entering module, configured to, when the flash controller is in the first sub-area working state, if the instruction bus accesses the second sub-area, enter a transition state; in the transition state, temporarily prohibit the instruction bus from accessing the user area, allow the data bus to access the first sub-area, but prohibit the data bus from accessing the second sub-area;

    a second determining module, configured to, determine whether the time in the transition state reaches a preset waiting time; if yes, invoke a third entering module;

    the third entering module, configured to, enter the second sub-area working state, in the second sub-area working state, allow the instruction bus to access the user area, prohibit the data bus from accessing the first sub-area, but allow the data bus to access the second sub-area.



    [0017] Preferably, the device further comprises:
    a fourth entering module, configured to, after resetting the MCU chip, enter an initial state; in the initial state, allow the instruction bus to access the user area, prohibit the data bus from accessing the first sub-area or the second sub-area.

    [0018] Preferably, the MCU chip comprises an information area of a flash memory, the information area comprises option bytes; the device further comprises:

    a determining module, configured to, determine the reading protection state of the user area according to the option bytes;

    a first protection module, configured to, if in a zero-level reading protection state, allow to perform reading, writing and erasing on the user area;

    a second protection module, configured to, if in a first-level reading protection state, allow to perform reading, writing and erasing on the first sub-area, only when the MCU chip boots from the user area, allow to perform reading, writing and erasing on the second sub-area;

    a third protection module, configured to, if in a second-level reading protection state, only when the MCU chip boots from the user area, allow to perform reading, writing and erasing on the first sub-area and the second sub-area.



    [0019] Preferably,
    in the zero-level reading protection state, the option bytes are allowed to be modified;
    in the first-level reading protection state, the option bytes are allowed to be modified, if the reading protection state is modified from the first-level to the zero-level by modifying the option bytes, all information in the user area is erased;
    in the second-level reading protection state, the option bytes are prohibited from being modified.

    [0020] Preferably, an on-chip private peripheral is implemented on the MCU chip, the private peripheral which only works normally when an first sub-area enabling signal is high is a first peripheral, the private peripheral which only works normally when an second sub-area enabling signal is high is a second peripheral; the device further comprising:

    a first output module, configured to, in the first sub-area working state, or, in the first sub-area transition state, the first sub-area enabling signal is high;

    a second output module, configured to, in the second sub-area working state, or, in the second sub-area transition state, the second sub-area enabling signal is high.



    [0021] The embodiment of the present application also discloses a computer readable recording medium on which a program for carrying out the method according to claim 1 is recorded.

    [0022] Compared with the conventional technology, the present disclosure has the following advantages:
    in the present disclosure, the flash controller in the MCU chip divides the user area into the first sub-area and the second sub-area, when the instruction bus accesses the user area, the user area can be normally accessed by the instruction bus, but data bus to access sub-area is restricted. For instance, when the instruction bus accesses the first sub-area, the data bus is only allowed to access the first sub-area, not allowed to access the second sub-area. If the instruction bus turns to access the second sub-area from the first sub-area, the instruction bus is temporarily prohibited from accessing user area, and when the time at transition state reaches a preset waiting time, the instruction bus is allowed to access user area again. By now, the data bus is prohibited from accessing the first sub-area, but allowed to access the second sub-area. When the instruction bus accesses the user area, in the present disclosure, the data bus is only allowed to access the sub-area accessed by the instruction bus to protect the program in the user area from being stolen by cooperative company.

    [0023] In the present disclosure, a reading protection level is set for the MCU chip. The reading protection level is determined according to the option bytes in the information area to restrict the operations on the user area. During the cooperative development process of the MCU chip program, in order to prevent cooperative companies stealing program from each other, when one company is about to accomplish the development, the reading protection level of the user area may be increased to restrict program recorded on the user area to be read by other company. In addition, if someone attempts to steal the authority of accessing programs in the user area by lowering the reading protection level, all the programs in the user area are erased, which may further protect the company's development efforts.

    [0024] In the embodiment of the present disclosure, sub-areas may be allocated to different cooperative companies; a peripheral may be designed as a private peripheral of a sub-area; each sub-area has a corresponding sub-area enabling signal, the sub-area enabling signal may control the corresponding private peripheral. For instance, part or all of the functions of a private peripheral may be enabled or disenabled according to corresponding sub-area enabling signal, which may prevent the intermediate results processed by program from being obtained by other cooperative companies.

    [0025] In order to understand the objects, features and advantages of the present disclosure described above more apparently, specific description in conjunction with the accompanying drawings are provided hereinafter.

    [0026] An embodiment of the present disclosure of an information protection method for MCU is described below.

    [0027] The reading protection level of the flash controller is controlled by a number of control bytes in an information area of the flash memory. The reading protection level of the flash controller is divided into three levels, characterizations of each level are as follows:

    zero-level reading protection: a user area of the flash memory is completely accessible, allowed to perform reading, writing and erasing on the user area; the information area is completely accessible as well.

    first-level reading protection: the user area can be accessed normally when the MCU chip boots from the user area; other booting methods (including booting from other areas and joint test action group (JTAG) and other debugging methods) cannot access user area, reading, writing, erasing or other operations are not allowed to be performed. At this level, information area is allowed to be accessed. But if the reading protection level of flash controller is changed to zero level by modifying control bytes, all the information in user area is erased.

    second-level reading protection: the user area can be accessed normally when the MCU chip boots from the user area; other booting methods (including booting from other areas and joint test action group (JTAG) and other debugging methods) are all disenabled. At this level, the information area is read-only, cannot be written or erased.



    [0028] In the above-mentioned information protection method of the MCU chip, the user area is protected as a whole. If the program of MCU chip is developed by one company, this method is able to meet the demand. But the MCU chip is becoming increasingly complex, so as the program in the MCU chip. The program is required to be developed by two or more companies. The current information protection method is failing to satisfy the requirements. The current method is only able to protect the user area from being stolen by users, but not able to prevent cooperative companies stealing from each other. Based on the above-mentioned requirements, a new information protection method for an MCU chip is further provided by the present disclosure.

    [0029] The information protection method for an MCU chip proposed by the embodiment of the present disclosure is able to meet the protection needs for program of MCU chips developed by two cooperative companies. In the embodiment of the present disclosure, the user area of the flash memory is divided into two sub-areas, and programs of the cooperative companies can be written separately in their own sub-areas. The embodiment of the present disclosure is able to ensure that the programs developed by the two companies not only mutually invoke each other normally, but also prevent them from stealing the other's program in the other sub-area. Meanwhile, it is also able to prevent the program stored in the user area from being stolen by the users. Besides, if SRAM or other peripherals are shared by the two cooperative companies, program might be stolen by the other company through the shared resources. In the embodiment of the present application, it may also allocate a specific SRAM or a peripheral to one company as a private device to broaden the application range of the embodiment of the present disclosure.

    [0030] FIG. 1 illustrates a flow diagram of an information protection method for an MCU chip according to an embodiment of the present disclosure, the MCU chip comprises an instruction bus, a data bus, a flash controller and a user area of the flash memory; the flash controller is used to divide the user area into a first sub-area and a second sub-area;

    [0031] FIG. 2 depicts a system schematic of an MCU chip based on a CPU with a Harvard architecture for the present disclosure, the MCU chip usually comprises a CPU, a bus, a flash, a flash controller, SRAM, a variety of master peripherals and slave peripherals and so on. The bus may comprise an instruction bus, a data bus and a system bus. In the specific implementation, CPU is connected with bus interconnected matrix through the instruction bus, data bus and system bus. The instruction bus is responsible for reading the instructions; the data bus is responsible for data access; the system bus is responsible for accessing peripherals.

    [0032] The flash controller of the MCU chip is a bridge for connecting the bus and the flash. The flash controller is connected with bus interconnected matrix also through the three buses. The instruction bus is responsible for accepting instruction access from the CPU, the data bus is responsible for accepting CPU data access. The configuration registers of the flash controller are accessed through the system bus. SRAM and all kinds of peripherals are both connected with bus interconnected matrix. In the embodiment of present disclosure, if the MCU chip is cooperatively developed by two companies, two sub-areas can be allocated to each company. A peripheral can be designed as the private peripheral for one sub-area. Each sub-area has the corresponding sub-area enabling signal. The private peripheral is controlled by the sub-area enabling signal output by the flash controller.

    [0033] In the specific implementation, "access" comprises all kinds of operations. The operations for bus of MCU chip comprising reading and writing which means that the bus access comprises operations of reading and writing. The flash comprises reading, writing and erasing operations, meaning the access to flash comprises operations including reading, writing and erasing.

    [0034] The above-mentioned method specifically comprises the following steps :

    step 101, when the instruction bus accesses the user area, determining whether the instruction bus accesses the first sub-area; if yes, step 102 is performed;

    step 102, entering the first sub-area working state; in the first sub-area working state, allowing the instruction bus to access the user area; allowing the data bus to access the first sub-area but prohibiting the data bus from accessing the second sub-area;

    step 103, in the first sub-area working state, if the instruction bus accesses the second sub-area, entering a transition state; in the transition state, temporarily prohibiting the instruction bus from accessing the user area, allowing the data bus to access the first sub-area, but prohibiting the data bus from accessing the second sub-area;

    step 104, determining whether the time at transition state reaches a preset waiting time; if yes, step 105 is performed;

    step 105, entering the second sub-area working state, in the second sub-area working state, allowing the instruction bus to access the user area, prohibiting the data bus from accessing the first sub-area, but allowing the data bus to access the second sub-area.



    [0035] The application of the present embodiment at least has the following two advantages: firstly, the content in flash is protected from being stolen by users; secondly, the cooperative companies which develop the program together are prevented stealing the program from each other.

    [0036] There is definitely a master company which develops the main program, and the other is to develop library function. The master company which develops the main program is called the master company while the others which develop library function are called the slave companies hereinafter. Each company can be allocated a sub-area. The master sub-area is located in the beginning of the address space in the user area, the slave sub-areas are located in the following address space in the user area. When the MCU chip boots, the program developed by the master company is performed. The information protection method for an MCU chip in the present embodiment can be described in three parts: the first part is sub-area protection method; the second part is definition and application method of reading protection; the third part is the implementation method of private peripheral. The first part and the second part are implemented in the flash controller while the third part is implemented in the private peripheral on the basis of the sub-area enabling signal output by the flash controller.

    [0037] The first part: sub-area protection method.

    [0038] When the MCU chip boots from the user area, the user area may be normally accessed by the CPU instruction bus and restrictedly accessed by the CPU data bus, but cannot be accessed by other master peripheral. According to the work flow schematic of a flash controller in an MCU chip for the present disclosure depicted by FIG. 3, the specific steps are as follows:
    1. 1. After resetting the MCU chip, the flash controller staying in an initial state; in the initial state, allowing the instruction bus to access both sub-areas, prohibiting the data bus from accessing either of the sub-area.
    2. 2. determining whether the instruction bus accesses the user area; if yes, performing step 3, if not, returning to step 1.
    3. 3. determining whether the instruction bus accesses the first sub-area; if yes, step 4 is performed, if not, performing step 9.
    4. 4. entering the first sub-area working state, in the first sub-area working state, the instruction bus is allowed to access both sub-areas, the data bus is allowed to access the first sub-area but not allowed to access the second sub-area (if the data bus is trying to access the second sub-area, returning an error response).
    5. 5. determining whether the instruction bus accesses the user area; if not, returning to step 4, which means, if the instruction bus doesn't access the user area, staying in the current working state (the first sub-area working state); if yes, performing step 6.
    6. 6. determining whether the instruction bus accesses the other sub-area (the second sub-area); if the instruction bus accesses the current working sub-area (the first sub-area), staying in the current working state, which means, returning to step 4, if the instruction bus accesses the other sub-area (the second sub-area), performing step 7.
    7. 7. entering the first sub-area transition state, in the first sub-area transition state, temporarily prohibiting the instruction bus from accessing the user area, allowing the data bus to access the first sub-area, but not allowing the data bus to access the second sub-area (if the data bus is trying to access the second sub-area, returning an error response);
    8. 8. determining whether the time in the first sub-area transition state reaches the preset waiting time; if yes, performing step 9; if not, returning to step 7.
    9. 9. entering the second sub-area working state, in the second sub-area working state, the instruction bus is allowed to access both sub-areas, the data bus is allowed to access the second sub-area but not allowed to access the first sub-area (if the data bus is trying to access the first sub-area, returning an error response).
    10. 10. determining whether the instruction bus accesses the user area; if not, returning to step 9, which means if instruction bus doesn't access the user area, staying in the current state (the second sub-area working state); if yes, performing step 11.
    11. 11. determining whether the instruction bus accesses the other sub-area (the first sub-area); if the instruction bus accesses the current working sub-area (the second sub-area), staying in the current state, which means returning to step 9, if the instruction bus accesses the other sub-area (the first sub-area), performing step 12.
    12. 12. entering the second sub-area transition state; in the second sub-area transition state, temporarily prohibiting the instruction bus from accessing the user area, allowing the data bus to access the second sub-area, but not allowing the data bus to access the first sub-area (if the data bus is trying to access the first sub-area, returning an error response).
    13. 13. determining whether the time in the second sub-area transition state reaches the preset waiting time; if yes, performing step 4; if not, returning to step 12.


    [0039] In a preferred embodiment of the present disclosure, the preset waiting time in the transition state is correlated with the CPU features of the MCU chip. The CPU with a Harvard architecture reads the instructions through instruction bus, accesses data through data bus. The instruction bus and data bus work in parallel. The CPU obtains the instruction ought to perform through instruction bus, then determines whether to access data, and data of which address is ought to be accessed through instruction parsing, then accomplishes corresponding data accessing through data bus.

    [0040] The procedure from reading instructions by instruction bus to accomplishing corresponding data accessing by data takes through a number of cycles. The transition state is to make sure that the data accessing for current working sub-area is accomplished, meanwhile prevent the instruction bus from accessing to other sub-areas. When the data accessing for current working sub-area is accomplished, a new working sub-area is jumped to. The waiting time needs to be long enough to ensure the data accessing of the current working sub-area is completely accomplished. Take ARM Cortex-M3 as an example, the waiting time can be set as 20 CPU clock cycles.

    [0041] The second part: definition and application method of reading protection level.

    [0042] In a preferred embodiment, wherein, the MCU chip comprises an information area, the information area comprises option bytes; the method comprises the following steps:

    step S11, determining the reading protection level of the user area according to the option bytes;

    step S12, if the reading protection state is at zero-level, allowing to perform reading, writing and erasing operations on the user area;

    step S13, if the reading protection state is at first-level, allowing to perform reading, writing and erasing operations on the first sub-area; allowing to perform reading, writing and erasing operations on the second sub-area only when the MCU chip boots from the user area.

    step S14, if the reading protection state is at second-level, only when the MCU chip boots from the user area, allowing to perform reading, writing and erasing operations on the first sub-area and second sub-area.



    [0043] In a preferred embodiment,
    in the zero-level reading protection state, allowing the option bytes to be modified;
    in the first-level reading protection state, allowing the option bytes to be modified, if the reading protection state is modified from first level to zero level by modifying the option bytes, all information in the user area is erased (to protect the contents in the user area from being stolen by users, the zero-level reading protection state is turned to after the content in user area is erased completely);
    in the second-level reading protection state, prohibiting the option bytes from being modified.

    [0044] In specific implementation, reading protection level may be controlled by some bytes in the information area of the flash memory, the bytes are option bytes. The control method in this embodiment is optional, as long as the method is able to separate different reading protection level and easily to switch from one level to another. For example, controlling with one byte, when the byte is A5, the reading protection state is at zero level; when the byte is CC, the reading protection state is at second level; when the byte is other values besides A5 and CC, the reading protection state is at first level.

    [0045] During the development of program for the MCU chip, the method of reading protection level can be as follows. Firstly, the manufactured MCU chips are sent to the second company, by then the reading protection state is at zero level, the user area of the flash memory is empty. The second company records their program in the second sub-area of the user area. The program can be debugged in the zero-level reading protection state by the second company. Before giving the chips to the first company, the second company modifies the reading protection state into first level. The first company records their program in the first sub-area of the user area. By then, the first sub-area of the user area stores the program developed by the first company, and the second sub-area of the user area stores the program developed by the second company, the reading protection state is at first level. The first company accomplishes the cooperative debugging in the first-level reading protection state. For formal production, before giving the chip to the user, the first company modifies the reading protection state into second level.

    [0046] The third part: implementation method of private peripheral.

    [0047] In a preferred embodiment of the present disclosure, an on-chip private peripheral can be implemented on the MCU chip for specific requirement. The private peripheral which only works normally when the first sub-area enabling signal is high is the first peripheral, the private peripheral which only works normally when the second sub-area enabling signal is high is the second peripheral. The method comprises the following steps:

    step S21, in the first sub-area working state, or, in the first sub-area transition state, the first sub-area enabling signal is high;

    step S22, in the second sub-area working state, or, in the second sub-area transition state, the second sub-area enabling signal is high.



    [0048] In the present embodiment, the private peripheral is the peripheral controlled by the sub-area enabling signal output by flash controller. Each sub-area may correspond to a 1-bit sub-area enabling signal. The sub-area enabling signal indicates that the corresponding sub-area is in working state. The sub-area enabling signal is high in the corresponding sub-area's sub-area working state and sub-area transition state, while it is low in the other states. The controlling method is to enable or disable parts or all of the functions of the corresponding peripheral according to the state of the sub-area enabling signal.

    [0049] For instance, to ensure one SRAM is only allowed to be read by the program of the master company, the master sub-area enabling signal can be used as the reading enabling signal of the SRAM; to make sure the operation results register of one private peripheral is only allowed to be read by the program of a slave company, the sub-area enabling signal corresponding to the slave company can be used as the reading enabling signal for the operation results register; to make sure one private peripheral is only allowed to be configured by the program of the master company, the master sub-area enabling signal can be used as the configuration enabling signal for the peripheral register.

    [0050] Apparently, private peripheral may not be implemented in practice. That is, all of the peripherals may be shared. The present embodiment is not restricted hereto.

    [0051] It should be noted that, for the convenience of description, the embodiments of the present disclosure are all depicted as series of action combination. But one skilled in the art shall be aware that the embodiment is not restricted to the action sequence, because some of the steps may be performed in other sequences or simultaneously according to the embodiments. Besides, one skilled in the art shall also aware that the embodiments depicted in the detailed description part are all preferred embodiments, the related actions may not be necessary for the embodiments of the present disclosure.

    [0052] FIG. 4 shows a structure diagram of an information protection device for an MCU chip for the present disclosure, the MCU chip may comprise an instruction bus, a data bus, a flash controller and a user area. The flash controller is used to divide the user area into a first sub-area and a second sub-area, the device may comprise the specific modules:

    a first determining module 201, configured to, when the instruction bus accesses the user area, determine whether the instruction bus accesses the first sub-area; if yes, invoke a first entering module 202;

    the first entering module 202, configured to, enter a first sub-area working state; in the first sub-area working state, allow the instruction bus to access the user area, allow the data bus to access the first sub-area, but prohibit the data bus from accessing the second sub-area;

    in a preferred embodiment, the first sub-area is located in the first half of the address space in the user area, while the second sub-area is located in the second half of the address space in the user area.



    [0053] A second entering module 203, configured to, when the flash controller is in the first sub-area working state, the instruction bus accesses the second sub-area, enter a transition state; in the transition state, temporarily prohibit the instruction bus from accessing the user area, allow the data bus to access the first sub-area, but prohibit the data bus from accessing the second sub-area;
    a second determining module 204, configured to, determine whether the time at transition state reaches preset waiting time; if yes, invoke a third entering module 205;
    the third entering module 205, configured to, enter a second sub-area working state, in the second sub-area working state, allow the instruction bus to access the user area, prohibit the data bus from accessing the first sub-area, but allow the data bus to access the second sub-area.

    [0054] In a preferred embodiment, the MCU chip comprises a CPU, the CPU has a Harvard architecture; the preset waiting time is correlated with the CPU features; the CPU is ARM Cortex-M3, the preset waiting time is 20 CPU clock cycles.

    [0055] In a preferred embodiment, the device further comprises the following module:
    a fourth entering module, configured to, when the MCU chip resets, enter an enabling state; in the enabling state, allow the instruction bus to access the user area, prohibit the data bus from accessing the first sub-area or the second sub-area.

    [0056] In a preferred embodiment, the MCU chip comprises an information area, the information area comprises option bytes; the device further comprises the following modules:

    a determining module, configured to, determine a reading protection state of the user area according to the option bytes;

    a first protection module, configured to, in a zero-level reading protection state, allow to perform reading, writing and erasing on the user area;

    a second protection module, configured to, in a first-level reading protection state, allow to perform reading, writing and erasing on the first sub-area, only when the MCU chip boots from the user area, allow to perform reading, writing and erasing on the second sub-area;

    a third protection module, configured to, in a second-level reading protection state, allow to perform reading, writing and erasing on the first sub-area and the second sub-area, only when the MCU chip boots from the user area.



    [0057] In a preferred embodiment,
    in the zero-level reading protection state, allowing the option bytes to be modified;
    in the first-level reading protection state, allowing the option bytes to be modified, if the reading protection state is modified from the first level to zero level by modifying the option bytes, all information in the user area is erased;
    in the second-level reading protection state, prohibiting the option bytes from being modified.

    [0058] In a preferred embodiment, the MCU chip may be designed with private peripherals according to specific requirements. A private peripheral which only works normally when the output is an effective first sub-area enabling signal is a first peripheral, a private peripheral which only works normally when the output is an effective second sub-area enabling signal is a second peripheral. The device further comprising:

    a first output module, configured to, in the first sub-area working state, or, in the first sub-area transition state, output the first sub-area enabling signal;

    a second output module, configured to, in the second sub-area working state, or, in the second sub-area transition state, output the second sub-area enabling signal.



    [0059] In a preferred embodiment, the peripheral may comprise a static random access memory (SRAM).

    [0060] For the embodiments of device, considering that the theories are similar with the mentioned embodiments, the description is relatively simple. The similar parts may be referred to the descriptions for embodiments of the method.

    [0061] The embodiment of the present disclosure further provides a computer readable recording medium recorded with a program for executing the program of the above embodiments.

    [0062] The computer readable recording medium comprises all kinds of mechanisms for information storing and transmitting. The mechanisms shall be in form of machine-readable (e.g., computer readable). For instance, the machine-readable medium includes read-only memory (ROM), random access memory (RAM), disk memory media, optical memory media, flash media; electrical, optical, acoustic or other forms of propagated signals (e.g., carrier signal, infrared signal, digital signal, etc.) etc.

    [0063] The embodiments in the present disclosure are disclosed progressively, each embodiment mainly emphasizes the differences from other embodiments, while similar parts between different embodiments may be referred to each other.

    [0064] One skilled in the art shall be aware that, the embodiments of the present disclosure may provide as mentioned, device or program for computers. Therefore, the embodiments of the present disclosure may implemented only by hardware, only by software or by the form with combination of both software and hardware. In addition, the embodiment of the present disclosure may be adopted in the form of computer program. The computer program may be implemented on one or more computer-usable storage media which comprise computer-usable program codes (including but not limited to disk memory, CD-ROM, optical memory etc.).

    [0065] The embodiments are described on the basis of the flow diagrams and/or block diagrams of the method, terminal device (system) and computer program products of the present disclosure. It should be understood that, each of the flow (or block) or the combinations of several flows (or blocks) for flow diagrams (or block diagrams), may be implemented by the computer instructions. The computer program instructions may be implemented to the processor of general-purpose computers, special-purpose computers, embedded processor or other programmable data processing terminal devices to generate a machine. The machine may generate a device which can realize specific functions by implementing one or more flows (or blocks) from the flow diagram (or block diagram) through implementing the processor instructions.

    [0066] The computer program instructions may also be stored in computer readable memory. The computer readable memory may guide a computer or other programmable data processing terminal devices to work in a specific way, so that the instructions stored in the computer readable memory may generate products comprising instruction devices. The instruction devices may realize specific functions according to one or more flows (or blocks) in the flow diagram or (block diagram).

    [0067] The computer program instructions may also be loaded onto computers or other programmable data processing terminal devices. A series of operation steps are implemented on the computer or other programmable data processing terminal devices to resulting in a computer-implemented process. Thus the instructions implemented on the computer or other programmable data processing terminal devices may provide steps to realize specific functions for one or more flows (or blocks) on the flow diagram (or block diagram).

    [0068] Although preferred embodiments have been described in the present disclosure, one skilled in the art shall also be noted that, modifications and improvements may be obtained according to basic concept of creativity. Therefore, the appended claims are intended to be construed as embodying the preferred embodiments and all modifications and improvements that fall within the scope of the present disclosure.

    [0069] Finally, it should be noted that, in the present disclosure, "the first", "the second" and terms like that are only used to separate the entities or actions from each other. The terms are not necessary and do not imply any relationship or sequence between the entities or actions. Besides, the term "comprising", "including" or any other variation that intended to encompass a non-exclusive inclusion of a series of elements comprises not only the elements mentioned but also other elements not listed in specific and other inherent elements. The elements may comprise procedures, methods, entities, items and terminal devices. In the absence of more restrictions, the elements restricted by sentences with "comprises a ..." do not preclude the presence of other elements in the procedures, methods, items or terminal devices which comprise the mentioned elements.

    [0070] The disclosure discloses an information protection method for an MCU chip and an information protection device for an MCU chip in detail. The disclosure applies specific embodiments to explain the theory and implementation method and describe the method and core ideas. Meanwhile, one skilled in the art may make modification or improvement on the basis of the present disclosure on the implementation methods or application scope. To sum up, the description above may not be taken as restriction to the disclosure.


    Claims

    1. An information protection method for a micro control unit, MCU, chip to protect programs from being stolen by users and cooperative companies, wherein, the MCU chip comprises an instruction bus, a data bus, a flash controller and a user area of a flash memory; the flash controller is used to divide the user area into a first sub-area and a second sub-area and programs of the cooperative companies are written separately in their own sub-areas; wherein the MCU chip comprises a central processing unit, CPU, with a Harvard architecture; the method comprising:

    when the instruction bus accesses the user area, determining (101) whether the instruction bus accesses the first sub-area;

    if yes, entering (102) the first sub-area working state; in the first sub-area working state, allowing the instruction bus to access the user area; allowing the data bus to access the first sub-area but prohibiting the data bus from accessing the second sub-area;

    when the flash controller is in the first sub-area working state, if the instruction bus accesses the second sub-area, entering (103) a transition state; in the transition state, temporarily prohibiting the instruction bus from accessing the user area, allowing the data bus to access the first sub-area, but prohibiting the data bus from accessing the second sub-area;

    determining (104) whether the time in the transition state reaches a preset waiting time set to ensure the data accessing of the first working sub-area is completely accomplished;

    if yes, entering (105) the second sub-area working state, in the second sub-area working state, allowing the instruction bus to access the user area, prohibiting the data bus from accessing the first sub-area, but allowing the data bus to access the second sub-area.


     
    2. The method according to claim 1, wherein, the method further comprises:
    after resetting the MCU chip, entering an initial state; in the initial state, allowing the instruction bus to access the user area, prohibiting the data bus from accessing the first sub-area or the second sub-area.
     
    3. The method according to claim 1, wherein, the preset waiting time is correlated with features of the CPU; if the CPU is ARM Cortex-M3, the preset waiting time is 20 CPU clock cycles.
     
    4. The method according to claim 1, wherein, an on-chip private peripheral is implemented on the MCU chip, the private peripheral which only works normally when a first sub-area enabling signal is high is a first peripheral, the private peripheral which only works normally when a second sub-area enabling signal is high is a second peripheral; the method further comprising:
    in the first sub-area working state, or, in the first sub-area transition state, the first sub-area enabling signal is high; in the second sub-area working state, or, in the second sub-area transition state, the second sub-area enabling signal is high.
     
    5. The method according to claim 4, wherein, the private peripheral comprises a static random access memory, SRAM.
     
    6. The method according to claim 1, wherein, the first sub-area is located in the first half of an address space in the user area, the second sub-area is located in the second half of the address space in the user area.
     
    7. An information protection device for a micro control unit, MCU, chip to protect programs from being stolen by users and cooperative companies, wherein, the MCU chip comprises an instruction bus, a data bus, a flash controller and a user area of a flash memory; the flash controller is used to divide the user area into a first sub-area and a second sub-area and programs of the cooperative companies are written separately in their own sub-areas; the MCU chip comprises a central processing unit, CPU, with a Harvard architecture; the device comprising:

    a first determining module (201), configured to, when the instruction bus accesses the user area, determine whether the instruction bus accesses the first sub-area;

    if yes, invoke a first entering module;

    a first entering module (202), configured to, enter the first sub-area working state; in the first sub-area working state, allow the instruction bus to access the user area; allow the data bus to access the first sub-area but prohibiting the data bus from accessing the second sub-area;

    a second entering module (203), configured to, when the flash controller is in the first sub-area working state, if the instruction bus accesses the second sub-area, enter a transition state; in the transition state, temporarily prohibit the instruction bus from accessing the user area, allow the data bus to access the first sub-area, but prohibit the data bus from accessing the second sub-area;

    a second determining module (204), configured to, determine whether the time in the transition state reaches a preset waiting time set to ensure the data accessing of the first working sub-area is completely accomplished; if yes, invoke a third entering module;

    the third entering module (205), configured to, enter the second sub-area working state, in the second sub-area working state, allow the instruction bus to access the user area, prohibit the data bus from accessing the first sub-area, but allow the data bus to access the second sub-area.


     
    8. The device according to claim 7, wherein, the device further comprises:
    a fourth entering module, configured to, after resetting the MCU chip, enter an initial state; in the initial state, allow the instruction bus to access the user area, prohibit the data bus from accessing the first sub-area or the second sub-area.
     
    9. The device according to claim 7, wherein, an on-chip private peripheral is implemented on the MCU chip, the private peripheral which only works normally when an first sub-area enabling signal is high is a first peripheral, the private peripheral which only works normally when an second sub-area enabling signal is high is a second peripheral; the device further comprising:

    a first output module, configured to, in the first sub-area working state, or, in the first sub-area transition state, the first sub-area enabling signal is high;

    a second output module, configured to, in the second sub-area working state, or, in the second sub-area transition state, the second sub-area enabling signal is high.


     
    10. A computer readable recording medium, recorded with a program for executing the method of claim 1.
     


    Ansprüche

    1. Ein Datenschutzverfahren für einen Mikrocontroller (MCU) zum Schutz von Programmen durch Diebstahl durch Anwender und mitwirkende Unternehmen, wobei der MCU-Chip einen Befehlsbus, einen Datenbus, einen Flash-Controller und einen Benutzerbereich eines Flash-Speichers aufweist und der Flash-Controller zur Unterteilung des Benutzerbereichs in einen ersten Unterbereich und einen zweiten Unterbereich verwendet wird; Programme der mitwirkenden Unternehmen werden in eigene Unterbereiche geschrieben; wobei der MCU-Chip einen Hauptprozessor (CPU) in Harvard-Architektur besitzt und das Verfahren Folgendes beinhaltet:

    wenn der Befehlsbus auf den Benutzerbereich zugreift, wird ermittelt (101), ob der Befehlsbus auf den ersten Unterbereich zugreift,

    wenn ja, Übergang (102) in den Arbeitszustand der ersten Untereinheit; im Arbeitszustand des ersten Unterbereichs wird es dem Befehlsbus gestattet, auf den Benutzerbereich zuzugreifen, dem Datenbus gestattet, auf den ersten Unterbereich zuzugreifen, dem Datenbus hingegen nicht gestattet, auf den zweiten Unterbereich zuzugreifen;

    wenn der Flash-Controller sich im Arbeitszustand des ersten Unterbereichs befindet und der Befehlsbus auf den zweiten Unterbereich zugreift, Übergang (103) in einen Übergangszustand; im Übergangszustand wird es dem Befehlsbus vorübergehend nicht gestattet, auf den Benutzerbereich zuzugreifen, dem Datenbus gestattet, auf den ersten Unterbereich zuzugreifen, dem Datenbus hingegen nicht gestattet, auf den zweiten Unterbereich zuzugreifen;

    Ermittlung (104), ob die Zeit im Übergangszustand eine voreingestellte Wartezeit erreicht, um sicherzustellen, dass der Datenzugriff auf den ersten Arbeitsunterbereich vollständig abgeschlossen ist;

    wenn ja, Übergang (105) in den Arbeitszustand des zweiten Unterbereichs; im Arbeitszustand des zweiten Unterbereichs wird es dem Befehlsbus gestattet, auf den Benutzerbereich zuzugreifen, dem Datenbus nicht gestattet, auf den ersten Unterbereich zuzugreifen, dem Datenbus hingegen gestattet, auf den zweiten Unterbereich zuzugreifen.


     
    2. Das Verfahren gemäß Anspruch 1, wobei das Verfahren weiterhin Folgendes beinhaltet:
    nach dem Zurücksetzen des MCU-Chips, Übergang in den Ausgangszustand, in dem der Befehlsbus auf den Benutzerbereich zugreifen kann, der Datenbus hingegen am Zugriff auf den ersten oder zweiten Unterbereich gehindert wird.
     
    3. Das Verfahren gemäß Anspruch 1, wobei die voreingestellte Wartezeit mit technischen Daten der CPU korreliert; wenn es sich bei der CPU um eine ARM Cortex-M3 handelt, beträgt die voreingestellte Wartezeit 20 CPU-Taktzyklen.
     
    4. Das Verfahren gemäß Anspruch 1, wobei eine eigene Peripherie auf dem MCU-Chip vorgesehen ist und die eigene Peripherie, die nur normal arbeitet, wenn ein Enable-Signal für den ersten Unterbereich auf 1 steht, eine erste Peripherie darstellt und die eigene Peripherie, die nur normal arbeitet, wenn ein Enable-Signal für den zweiten Unterbereich auf 1 steht, eine zweite Peripherie darstellt, wobei das Verfahren weiterhin Folgendes beinhaltet:
    im Arbeitszustand des ersten Unterbereichs oder im Übergangszustand des ersten Unterbereichs steht das Enable-Signal für den ersten Unterbereich auf 1; im Arbeitszustand des zweiten Unterbereichs oder im Übergangszustand des zweiten Unterbereichs steht das Enable-Signal für den zweiten Unterbereich auf 1.
     
    5. Das Verfahren gemäß Anspruch 4, wobei die eigenen Peripherien einen statischen Arbeitsspeicher (RAM) aufweisen.
     
    6. Das Verfahren gemäß Anspruch 1, wobei der erste Unterbereich sich in der ersten Hälfte eines Adressbereichs im Benutzerbereich befindet, der zweite Unterbereich in der zweiten Hälfte des Adressbereichs im Benutzerbereich.
     
    7. Ein Datenschutzgerät für einen Mikrocontroller (MCU) zum Schutz von Programmen durch Diebstahl durch Anwender und mitwirkende Unternehmen, wobei der MCU-Chip einen Befehlsbus, einen Datenbus, einen Flash-Controller und einen Benutzerbereich eines Flash-Speichers aufweist und der Flash-Controller zur Unterteilung des Benutzerbereichs in einen ersten Unterbereich und einen zweiten Unterbereich verwendet wird; Programme der mitwirkenden Unternehmen werden in eigene Unterbereiche geschrieben; wobei der MCU-Chip einen Hauptprozessor (CPU) in Harvard-Architektur besitzt und das Gerät Folgendes beinhaltet:

    ein erstes Ermittlungsmodul (201), das so konfiguriert ist, dass es bei Zugreifen des Befehlsbusses auf den Benutzerbereich ermittelt, ob der Befehlsbus auf den ersten Unterbereich zugreift,

    wenn ja, ein erstes Übergangsmodul aufruft;

    ein erstes Übergangsmodul (202), das so konfiguriert ist, dass der Arbeitszustand des ersten Unterbereichs erreicht wird; im Arbeitszustand des ersten Unterbereichs es dem Befehlsbus gestattet wird, auf den Benutzerbereich zuzugreifen, dem Datenbus gestattet wird, auf den ersten Unterbereich zuzugreifen, dem Datenbus hingegen nicht gestattet wird, auf den zweiten Unterbereich zuzugreifen;

    ein zweites Übergangsmodul (203), das so konfiguriert ist, dass wenn der Flash-Controller sich im Arbeitszustand des ersten Unterbereichs befindet und der Befehlsbus auf den zweiten Unterbereich zugreift, ein Übergangszustand erreicht ist; im Übergangszustand wird es dem Befehlsbus vorübergehend nicht gestattet, auf den Benutzerbereich zuzugreifen, dem Datenbus gestattet, auf den ersten Unterbereich zuzugreifen, dem Datenbus hingegen nicht gestattet, auf den zweiten Unterbereich zuzugreifen;

    ein zweites Ermittlungsmodul (204), das so konfiguriert ist, dass es ermittelt, ob die Zeit im Übergangszustand eine voreingestellte Wartezeit erreicht, um sicherzustellen, dass der Datenzugriff auf den ersten Arbeitsunterbereich vollständig abgeschlossen ist; wenn ja, ein drittes Übergangsmodul aufruft;

    das dritte Übergangsmodul (205) ist so konfiguriert, dass der Arbeitszustand des zweiten Unterbereichs erreicht wird; im Arbeitszustand des zweiten Unterbereich wird es dem Befehlsbus gestattet, auf den Benutzerbereich zuzugreifen, dem Datenbus nicht gestattet, auf den ersten Unterbereich zuzugreifen, dem Datenbus hingegen gestattet, auf den zweiten Unterbereich zuzugreifen.


     
    8. Das Gerät gemäß Anspruch 7, wobei das Gerät weiterhin Folgendes beinhaltet:
    ein viertes Übergangsmodul, das so konfiguriert ist, dass nach dem Zurücksetzen des MCU-Chips der Ausgangszustand erreicht wird, in dem der Befehlsbus auf den Benutzerbereich zugreifen kann, der Datenbus hingegen am Zugriff auf den ersten oder zweiten Unterbereich gehindert wird.
     
    9. Das Gerät gemäß Anspruch 7, wobei eine eigene Peripherie auf dem MCU-Chip vorgesehen ist, und die eigene Peripherie, die nur normal arbeitet, wenn ein Enable-Signal für den ersten Unterbereich auf 1 steht, eine erste Peripherie darstellt, und die eigene Peripherie, die nur normal arbeitet, wenn ein Enable-Signal für den zweiten Unterbereich auf 1 steht, eine zweite Peripherie darstellt, wobei das Gerät weiterhin Folgendes beinhaltet:

    ein erstes Ausgangsmodul, das so konfiguriert ist, dass im Arbeitszustand des ersten Unterbereichs oder im Übergangszustand des ersten Unterbereichs das Enable-Signal des ersten Unterbereichs auf 1 steht,

    ein zweites Ausgangsmodul, das so konfiguriert ist, dass im Arbeitszustand des zweiten Unterbereichs oder im Übergangszustand des zweiten Unterbereichs das Enable-Signal des zweiten Unterbereichs auf 1 steht.


     
    10. Ein computerlesbares Aufzeichnungsmedium mit einem Programm zur Anwendung des Verfahrens gemäß Anspruch 1.
     


    Revendications

    1. Procédé de protection d'informations pour une puce de microcontrôleur, MCU, permettant de protéger des programmes pour empêcher qu'ils ne soient volés par des utilisateurs ou des sociétés partenaires, où la puce de MCU comprend un bus d'instructions, un bus de données, un contrôleur de mémoire flash et une zone utilisateur d'une mémoire flash ; le contrôleur de mémoire flash est utilisé pour diviser la zone utilisateur en une première sous-zone et une seconde sous-zone et des programmes des sociétés partenaires sont écrits séparément dans leurs propres sous-zones ; où la puce de MCU comprend une unité centrale, UC, avec une architecture Harvard ; le procédé comprenant :

    lorsque le bus d'instructions accède à la zone utilisateur, le fait de déterminer (101) si le bus d'instructions accède à la première sous-zone ;

    si oui, le fait d'entrer (102) l'état de travail de première sous-zone ; dans l'état de travail de première sous-zone, le fait d'autoriser le bus d'instructions à accéder à la zone utilisateur, d'autoriser le bus de données à accéder à la première sous-zone mais d'empêcher le bus de données d'accéder à la seconde sous-zone ;

    lorsque le contrôleur de mémoire flash se trouve dans l'état de travail de première sous-zone, si le bus d'instructions accède à la seconde sous-zone, le fait d'entrer (103) un état de transition ; dans l'état de transition, le fait d'empêcher temporairement le bus d'instructions d'accéder à la zone utilisateur, d'autoriser le bus de données à accéder à la première sous-zone mais d'empêcher le bus de données d'accéder à la seconde sous-zone ;

    le fait de déterminer (104) si le temps passé dans l'état de transition atteint un délai d'attente préétabli fixé de sorte à garantir que l'accès aux données de la première sous-zone de travail est entièrement accompli ;

    si oui, le fait d'entrer (105) l'état de travail de seconde sous-zone, dans l'état de travail de seconde sous-zone, le fait d'autoriser le bus d'instructions à accéder à la zone utilisateur, d'empêcher le bus de données d'accéder à la première sous-zone mais d'autoriser le bus de données à accéder à la seconde sous-zone.


     
    2. Procédé selon la revendication 1, où le procédé comprend en outre :
    après réinitialisation de la puce de MCU, le fait d'entrer un état initial ; dans l'état initial, le fait d'autoriser le bus d'instructions à accéder à la zone utilisateur, et d'empêcher le bus de données d'accéder à la première sous-zone ou à la seconde sous-zone.
     
    3. Procédé selon la revendication 1, dans lequel le délai d'attente préétabli est corrélé aux caractéristiques de l'UC ; si l'UC est ARM Cortex-M3, le délai d'attente préétabli est de 20 cycles d'horloge d'UC.
     
    4. Procédé selon la revendication 1, dans lequel un périphérique privé sur puce est exécuté sur la puce de MCU, le périphérique privé qui ne travaille normalement que lorsqu'un signal d'autorisation d'accès à la première zone est haut est un premier périphérique, le périphérique privé qui ne travaille normalement que lorsqu'un signal d'autorisation d'accès à la seconde zone est haut est un second périphérique ; le procédé comprenant en outre :
    dans l'état de travail de première sous-zone, ou, dans l'état de transition de première sous-zone, le signal d'autorisation d'accès à la première zone est haut ; dans l'état de travail de seconde sous-zone, ou, dans l'état de transition de seconde sous-zone, le signal d'autorisation d'accès à la seconde zone est haut.
     
    5. Procédé selon la revendication 4, dans lequel le périphérique privé comprend une mémoire vive statique (SRAM).
     
    6. Procédé selon la revendication 1, dans lequel la première sous-zone est située dans la première moitié d'un espace d'adressage dans la zone utilisateur, la seconde sous-zone est située dans la seconde moitié de l'espace d'adressage dans la zone utilisateur.
     
    7. Dispositif de protection d'informations pour une puce de microcontrôleur, MCU, permettant de protéger des programmes pour empêcher qu'ils ne soient volés par des utilisateurs ou des sociétés partenaires, où la puce de MCU comprend un bus d'instructions, un bus de données, un contrôleur de mémoire flash et une zone utilisateur d'une mémoire flash ; le contrôleur de mémoire flash est utilisé pour diviser la zone utilisateur en une première sous-zone et une seconde sous-zone et des programmes des sociétés partenaires sont écrits séparément dans leurs propres sous-zones ; la puce de MCU comprend une unité centrale, UC, avec une architecture Harvard ; le dispositif comprenant :

    un premier module de détermination (201) configuré pour, lorsque le bus d'instructions accède à la zone utilisateur, déterminer (101) si le bus d'instructions accède à la première sous-zone ; et si oui, pour invoquer un premier module d'entrée ;

    un premier module d'entrée (202) configuré pour entrer l'état de travail de première sous-zone ; dans l'état de travail de première sous-zone, pour autoriser le bus d'instructions à accéder à la zone utilisateur, autoriser le bus de données à accéder à la première sous-zone mais empêcher le bus de données d'accéder à la seconde sous-zone ;

    un deuxième module d'entrée (203) configuré pour, lorsque le contrôleur de mémoire flash se trouve dans l'état de travail de première sous-zone, si le bus d'instructions accède à la seconde sous-zone, entrer un état de transition ; dans l'état de transition, pour empêcher temporairement le bus d'instructions d'accéder à la zone utilisateur, autoriser le bus de données à accéder à la première sous-zone mais empêcher le bus de données d'accéder à la seconde sous-zone ;

    un second module de détermination (204) configuré pour déterminer si le temps passé dans l'état de transition atteint un délai d'attente préétabli fixé de sorte à garantir que l'accès aux données de la première sous-zone de travail est entièrement accompli ; et si oui, pour invoquer un troisième module d'entrée ;

    le troisième module d'entrée (205) configuré pour entrer l'état de travail de seconde sous-zone, dans l'état de travail de seconde sous-zone, pour autoriser le bus d'instructions à accéder à la zone utilisateur, empêcher le bus de données d'accéder à la première sous-zone mais autoriser le bus de données à accéder à la seconde sous-zone.


     
    8. Dispositif selon la revendication 7, où le dispositif comprend en outre :
    un quatrième module d'entrée configuré pour après réinitialisation de la puce de MCU, entrer un état initial ; dans l'état initial, pour autoriser le bus d'instructions à accéder à la zone utilisateur, et empêcher le bus de données d'accéder à la première sous-zone ou à la seconde sous-zone.
     
    9. Dispositif selon la revendication 7, dans lequel un périphérique privé sur puce est exécuté sur la puce de MCU, le périphérique privé qui ne travaille normalement que lorsqu'un signal d'autorisation d'accès à la première zone est haut est un premier périphérique, le périphérique privé qui ne travaille normalement que lorsqu'un signal d'autorisation d'accès à la seconde zone est haut est un second périphérique ; le dispositif comprenant en outre :

    un premier module de sortie configuré pour que, dans l'état de travail de première sous-zone, ou, dans l'état de transition de première sous-zone, le signal d'autorisation d'accès à la première zone soit haut ;

    un second module de sortie configuré pour que, dans l'état de travail de seconde sous-zone, ou, dans l'état de transition de seconde sous-zone, le signal d'autorisation d'accès à la seconde zone soit haut.


     
    10. Support d'enregistrement lisible par ordinateur sur lequel est enregistré un programme destiné à exécuter le procédé de la revendication 1.
     




    Drawing

















    Cited references

    REFERENCES CITED IN THE DESCRIPTION



    This list of references cited by the applicant is for the reader's convenience only. It does not form part of the European patent document. Even though great care has been taken in compiling the references, errors or omissions cannot be excluded and the EPO disclaims all liability in this regard.

    Patent documents cited in the description