Electric energy meter and method for realizing legal and illegal system separation based on safe area
By adopting the separation scheme between TrustZone and independent EEPROM/NOR FLASH areas in the power meter, the cost and complexity of the separation of the legal system and illegal system of the electricity meter are solved, and the protection of legal area data and independent upgrade of illegal area are realized. It meets the requirements for the separation of legal system and illegal system in WELMEC Guide 7.2.
Patent Information
- Application Number
- CN202410996413.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-24
- Publication Date
- 2024-11-12
AI Technical Summary
Existing power meters have problems of increasing costs and increasing complexity in terms of separation of legal system and illegal system, especially the cost of separation of two chips is high and the separation of one chip cannot meet the requirements of WELMEC Guide 7.2, and illegal functions cannot be protected. Functional operation of legal areas.
Using a security zone separation scheme based on TrustZone, the data interface is provided through the secure zone so that the illegal functional module cannot directly access the peripherals, ensuring that the data and parameters of the legal zone are not destroyed, and the independent EEPROM and NOR FLASH are used to separate the zone, and the ordinary zone is passed through Secure area data interface accesses external devices.
Effectively distinguish between legal and illegal areas, protect the data and parameters of legal areas, realize the independent upgrade between legal and illegal systems, ensure the correctness of data parameters of legal areas, and comply with the requirements of WELMEC Guide 7.2.
Smart Images

Figure CN118939577A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electric energy meters, and more particularly, to an electric energy meter and method for achieving separation of legal and illegal systems based on a safety zone. Background Art
[0002] Currently, the WELMEC Guide 7.2 standard for software testing in the EU MID certification of measuring instruments requires the separation of legal and non-legal functions. Legal functions include raw meter data such as energy, voltage, and current, while non-legal functions include secondary processing functions based on raw data, such as demand and curves. Changes to legal functions require recertification, while changes to non-legal functions do not. Non-legal functions can only access legal data, such as energy and voltage, through limited interfaces. Non-legal functions cannot directly access data and parameters in the secure area.
[0003] Currently, there are electricity meters on the market that use two chips for separation, and there are also electricity meters that use only one chip for separation.
[0004] First, the cost of using two separate chips for electricity meters increases, requiring two MCUs, two EEs, and two nor norflash chips. In addition, the encryption and timeliness of data transmission between the two chips are difficult to guarantee, which increases both cost and complexity.
[0005] Secondly, in a meter with a separate chip, the illegal area can be programmed to access the legal area. For example, the legal area can be directly erased using a known chip erase method, or the illegal area can be programmed to operate an IIC driver that operates the EE, erasing all parameter data in the legal area. However, this approach fails to protect the legal area from functioning properly and fails to meet the separation requirements of WELMEC Guide 7.2 for legal and illegal areas. Summary of the Invention
[0006] This invention addresses the issue of separating legal and illegal functions in electricity meters by proposing a security zone-based electricity meter and method for achieving this separation. When using TrustZone, illegal functions cannot directly access chip peripherals; they must access them through the secure zone data interface provided by the secure zone, ensuring that legal functions, data, and parameters in the secure zone remain intact.
[0007] The technical solution of the present invention is:
[0008] The present invention provides an electric energy meter that realizes separation of legal and illegal systems based on a safety zone, wherein the MCU chip of the electric energy meter includes a safety zone and a common zone;
[0009] The general area is used to store the illegal functional modules of the electric energy meter, including the general area data interface;
[0010] The secure area is used to store the electric energy meter legal function module, including a secure area data interface and a peripheral interface, the peripheral interface is connected to the external device, and the secure area data interface is connected to the common area data interface;
[0011] The external device includes EEPROM and NOR FLASH. The EEPROM is divided into legal EEPROM and non-legal EEPROM corresponding to the security area and the general area, and the legal EEPROM and non-legal EEPROM are separated. The NOR FLASH is divided into legal NOR FLASH and non-legal NOR FLASH corresponding to the security area and the general area, and the legal NOR FLASH and non-legal NOR FLASH are separated.
[0012] When the common area needs to read data stored in the external device, it is connected to the secure area data interface through the common area data interface, and the external device is accessed through the external device interface to obtain the corresponding data.
[0013] Furthermore, the legal function module also includes: a chip bottom driver module, an interrupt module, an IO module, an EE driver module, a nor nor flash driver module, a metering module, an upgrade module, a data security module and a power function module.
[0014] Furthermore, the non-legal function module further includes: a demand module, an event module and a curve module.
[0015] Furthermore, the secure area data interface is a limited interface, and when the data accessed in the common area is out of bounds, access is not supported.
[0016] Furthermore, the peripheral interfaces include IIC, IO and SPI.
[0017] Furthermore, the external device also includes a metering chip for measuring the legal data of the security area.
[0018] Furthermore, the EEPROM and NOR FLASH are both one block or two blocks. If they are the same block, the legal and illegal areas are distinguished according to the addresses.
[0019] A method for achieving separation of legal and illegal electric energy meters based on safety zones,
[0020] The common area and the security area are respectively provided with independent EEPROM and NOR FLASH in the external device;
[0021] When the common area of the electric energy meter needs to read the data stored in the external device, it is connected to the data interface of the secure area through the common area data interface, and the external device is accessed through the external device interface to obtain the corresponding data.
[0022] Furthermore, the common area data interface can perform independent upgrades of the common area.
[0023] Beneficial effects of the present invention:
[0024] The electric energy meter and method proposed in the present invention realize separation of legal and illegal systems based on a security zone, which can effectively distinguish between legal areas and illegal areas. The data, parameters, and measurements in the legal areas are all protected and cannot be directly accessed by illegal areas. In addition, the legal and illegal systems can be upgraded separately.
[0025] The present invention ensures that non-legal systems can only access legal system data, EE, NOR NOR flash, and metering chips through a secure digital interface in the legal area; it is impossible to write a bottom-level driver interface to access legal system data, EE, NOR NOR flash, and metering chips by themselves; and it ensures that legal system data parameters are correct after legal system software authentication, and non-legal systems cannot affect legal area data and parameters.
[0026] Other features and advantages of the present invention will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and other objects, features and advantages of the present invention will become more apparent through a more detailed description of exemplary embodiments of the present invention with reference to the accompanying drawings, wherein like reference numerals generally represent like components throughout the exemplary embodiments of the present invention.
[0028] Figure 1 The principle block diagram of the electric energy meter for realizing separation of legal and illegal systems based on a safety zone according to the present invention is shown. DETAILED DESCRIPTION
[0029] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0030] The embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0031] The present invention provides an electric energy meter that realizes separation of legal and illegal systems based on a safety zone, such as Figure 1The schematic diagram of the electric energy meter is shown. The MCU chip of the electric energy meter includes a safe area and a normal area.
[0032] The general area is used to store the illegal functional modules of the electric energy meter, including the general area data interface;
[0033] The secure area is used to store the electric energy meter legal function module, including a secure area data interface and a peripheral interface, the peripheral interface is connected to the external device, and the secure area data interface is connected to the common area data interface;
[0034] The external device includes EEPROM and NOR FLASH. The EEPROM is divided into legal EEPROM and non-legal EEPROM corresponding to the security area and the general area, and the legal EEPROM and non-legal EEPROM are separated. The NOR FLASH is divided into legal NOR FLASH and non-legal NOR FLASH corresponding to the security area and the general area, and the legal NOR FLASH and non-legal NOR FLASH are separated.
[0035] When the common area needs to read data stored in the external device, it is connected to the secure area data interface through the common area data interface, and the external device is accessed through the external device interface to obtain the corresponding data.
[0036] In this embodiment, the MCU chip is divided into a secure area and a normal area. Metering, power consumption, data security, RTC, upgrades, peripheral interfaces, and the data interface of the secure area are placed in the secure area. Demand, curve, and normal area data interfaces are placed in the normal area of the chip to run non-legal functions. Peripheral interfaces include IIC, IO, and SPI, which are used to communicate with external EE, NOR flash, and metering chips.
[0037] Because the chip's peripherals are protected by TrustZone, the general area cannot directly access the chip's peripherals, nor can it directly access the external EE and NOR flash. Access to the EE and NOR flash is limited through the secure area's data interface. Furthermore, the address ranges accessible to the EE and NOR flash are limited, limiting access to areas allocated for non-authorized use. Therefore, TrustZone protects the secure area's peripherals from general area access, ensuring that non-authorized functions cannot affect authorized data and parameters. This complies with the WELMEC Guide 7.2 requirement for separation of authorized and non-authorized functions, and has promising application prospects.
[0038] A method for achieving legal and illegal separation of electric energy meters based on a security zone, wherein the ordinary area and the security area are respectively provided with independent EEPROM and NOR FLASH in an external device; when the ordinary area of the electric energy meter needs to read data stored in the external device, the ordinary area data interface is connected to the security area data interface, and the external device interface is used to access the external device to obtain the corresponding data; the ordinary area data interface can be used to independently upgrade the ordinary area.
[0039] In this embodiment, the functions of the ordinary area also provide a fixed interface to allow the secure area to access, which is convenient for the secure area not to be upgraded when the ordinary area needs to be upgraded. In addition, the data interface provided by the secure area is a limited interface, and access is not supported when the data accessed by the ordinary area exceeds the boundary.
[0040] While various embodiments of the present invention have been described above, the above description is intended to be illustrative, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments.
Claims
1. An electric energy meter that realizes separation of legal and illegal systems based on a safety zone, characterized by The MCU chip of the electric energy meter includes a safe area and a normal area; The general area is used to store the illegal functional modules of the electric energy meter, including the general area data interface; The secure area is used to store the electric energy meter legal function module, including a secure area data interface and a peripheral interface, the peripheral interface is connected to the external device, and the secure area data interface is connected to the common area data interface; The external device includes EEPROM and NOR FLASH. The EEPROM is divided into legal EEPROM and non-legal EEPROM corresponding to the security area and the general area, and the legal EEPROM and non-legal EEPROM are separated. The NOR FLASH is divided into legal NOR FLASH and non-legal NOR FLASH corresponding to the security area and the general area, and the legal NOR FLASH and non-legal NOR FLASH are separated. When the common area needs to read data stored in the external device, it is connected to the secure area data interface through the common area data interface, and the external device is accessed through the external device interface to obtain the corresponding data.
2. The electric energy meter for realizing separation of legal and illegal systems based on a safety zone according to claim 1, characterized in that: The legal function module also includes: a chip bottom driver module, an interrupt module, an IO module, an EE driver module, a nor norflash driver module, a metering module, an upgrade module, a data security module and a power function module.
3. The electric energy meter for realizing separation of legal and illegal systems based on a safety zone according to claim 1, characterized in that: The non-legal function module further includes: a demand module, an event module and a curve module.
4. The electric energy meter for realizing separation of legal and illegal systems based on a safety zone according to claim 1, characterized in that: The secure area data interface is a limited interface, and when the data accessed in the common area is out of bounds, access is not supported.
5. The electric energy meter for realizing separation of legal and illegal systems based on a safety zone according to claim 1, characterized in that: Peripheral interfaces include IIC, IO and SPI.
6. The electric energy meter for realizing separation of legal and illegal systems based on a safety zone according to claim 1, characterized in that: The external device further includes a metering chip for measuring the legal data of the security area.
7. The electric energy meter for realizing separation of legal and illegal systems based on a safety zone according to claim 1, characterized in that: The EEPROM and NOR FLASH are both one block or two blocks. If they are the same block, the legal and illegal areas are distinguished according to the address.
8. A method for realizing separation of legal and illegal electric energy meters based on a safety zone according to any one of claims 1 to 7, characterized in that: The common area and the security area are respectively provided with independent EEPROM and NOR FLASH in the external device; When the common area of the electric energy meter needs to read the data stored in the external device, it is connected to the data interface of the secure area through the common area data interface, and the external device is accessed through the external device interface to obtain the corresponding data.
9. The method according to claim 8, characterized in that The common area data interface can independently upgrade the common area.
Citation Information
Cited By
Method for realizing legally relevant data protection on the basis of MPU mechanism and electricity meter
WO2026102825A1
