IP Library Granted Patent US 10,102,155
Granted Patent B2
US 10,102,155 · App. 15/505,926 · Granted Oct 16, 2018

Method and device of information protection for micro control unit chip

Inventors: Baokui Li (Beijing, CN); Jinghua Wang (Beijing, CN); Nanfei Wang (Beijing, CN)
Assignee: GIGADEVICE SEMICONDUCTOR (BEIJING) INC.
G06F12/1425G06F12/14G06F12/1441G06F21/79G06F21/85G06F2221/2141
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,102,155
App. No.
15/505,926
Granted
Oct 16, 2018
Kind
B2
Abstract

The disclosure discloses a method and a device of information protection for a micro control unit (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, if the instruction bus accesses the second sub-area, entering the transition state; determining whether the time at transition state reaches a preset waiting time; if yes, entering the second sub-area working state; the disclosure is used to protect program from being stolen by users and prevent the cooperative companies stealing program from each other.

Claims (63)

1. An information protection method for a micro control unit (MCU) chip, 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; the information protection method comprising:

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

if the instruction bus accesses the first sub-area, entering a 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 a time in the transition state reaches a preset waiting time;

if the time in the transition state reaches the preset waiting time, entering a 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 information protection method according to claim 1 , wherein the information protection 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 information protection method according to claim 1 , wherein 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.

4. The information protection method according to claim 1 , wherein the MCU chip comprises an information area of the flash memory, the information area comprises option bytes; the information protection method further comprising:

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

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

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

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

5. The information protection method according to claim 4 , wherein

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 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.

6. The information protection method according to claim 1 , wherein an on-chip private peripheral is implemented on the MCU chip, a first peripheral is a private peripheral which only works normally when a first sub-area enabling signal is high, a second peripheral is a private peripheral which only works normally when a second sub-area enabling signal is high; wherein

in the first sub-area working state, or, in the first sub-area transition state, the first sub-area enabling signal is high, in other states, the first sub-area enabling signal is low; in the second sub-area working state, or, in the second sub-area transition state, the second sub-area enabling signal is high, in other states, the second sub-area enabling signal is low.

7. The information protection method according to claim 6 , wherein the private peripheral comprises a static random access memory (SRAM).

8. The information protection method according to claim 1 , wherein the first sub-area is located in a first half of an address space in the user area, the second sub-area is located in a second half of the address space in the user area.

9. An information protection device for an MCU chip, 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; the information protection device comprising:

a memory having instructions stored thereon;

a processor configured to execute the instructions to perform operations for information protection, comprising:

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

if the instruction bus accesses the first sub-area, entering a 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 a time in the transition state reaches a preset waiting time;

if the time in the transition state reaches the preset waiting time, entering a 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.

10. The information protection device according to claim 9 , wherein the operations that the processor is further configured to execute the instructions to perform 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.

11. The information protection device according to claim 9 , wherein, the MCU chip comprises an information area of a flash memory, the information area comprises option bytes; the operations that the processor is further configured to execute the instructions to perform comprises:

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

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

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

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

12. The information protection device according to claim 11 , wherein

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 reading protection state to the zero-level reading protection state 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.

13. The information protection device according to claim 9 , wherein, an on-chip private peripheral is implemented on the MCU chip, a first peripheral is a private peripheral which only works normally when a first sub-area enabling signal is high, a second peripheral is a private peripheral which only works normally when a second sub-area enabling signal is high; wherein

in the first sub-area working state, or, in a first sub-area transition state, the first sub-area enabling signal is high; in other states, the first sub-area enabling signal is low;

in the second sub-area working state, or, in a second sub-area transition state, the second sub-area enabling signal is high, in other states, the second sub-area enabling signal is low.

14. A non-transitory computer readable recording medium having computer programs stored thereon for protecting information of an MCU chip, 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, when the computer programs are executed by one or more processors of an electronic apparatus, the electronic apparatus is caused to perform:

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

if the instruction bus accesses the first sub-area, entering a 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 the time in transition state reaches the preset waiting time, 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.

15. The non-transitory computer readable recording medium according to claim 14 , wherein, the electronic apparatus is further caused to perform:

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.

16. The non-transitory computer readable recording medium according to claim 14 , wherein, the MCU chip comprises an information area of a flash memory, the information area comprises option bytes; the electronic apparatus is further caused to perform:

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

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

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

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

17. The non-transitory computer readable recording medium according to claim 16 , wherein,

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 reading protection state to zero-level reading protection state 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.

18. The non-transitory computer readable recording medium according to claim 14 , wherein, an on-chip private peripheral is implemented on the MCU chip, a first peripheral is a private peripheral which only works normally when a first sub-area enabling signal is high, a second peripheral is a private peripheral which only works normally when a second sub-area enabling signal is high; wherein

in the first sub-area working state, or, in the first sub-area transition state, the first sub-area enabling signal is high, in other states, the first sub-area enabling signal is low; in the second sub-area working state, or, in the second sub-area transition state, the second sub-area enabling signal is high, in other states, the second sub-area enabling signal is low.

Assignments (2)
CHANGE OF NAME & ADDRESS Recorded Oct 13, 2022
From: GIGADEVICE SEMICONDUCTOR (BEIJING) INC.
To: GIGADEVICE SEMICONDUCTOR INC.
Reel/Frame 061668/0819 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 23, 2017
From: LI, BAOKUI; WANG, JINGHUA; WANG, NANFEI
To: GIGADEVICE SEMICONDUCTOR (BEIJING) INC.
Reel/Frame 041348/0532 →
Priority Claims (1)
CN 2014 1 0851200 · Dec 30, 2014 · national
Continuity (1)
Related Publication 20180217945A1 · Aug 2, 2018