CN112114193A - Method for upgrading module terminal metering core without losing electric quantity - Google Patents

Method for upgrading module terminal metering core without losing electric quantity Download PDF

Info

Publication number
CN112114193A
CN112114193A CN202010752836.2A CN202010752836A CN112114193A CN 112114193 A CN112114193 A CN 112114193A CN 202010752836 A CN202010752836 A CN 202010752836A CN 112114193 A CN112114193 A CN 112114193A
Authority
CN
China
Prior art keywords
metering
core board
chip microcomputer
single chip
upgrade
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010752836.2A
Other languages
Chinese (zh)
Other versions
CN112114193B (en
Inventor
赵雨婷
邹连明
刘宁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ningbo Sanxing Electric Co Ltd
Original Assignee
Ningbo Sanxing Electric Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ningbo Sanxing Electric Co Ltd filed Critical Ningbo Sanxing Electric Co Ltd
Priority to CN202010752836.2A priority Critical patent/CN112114193B/en
Publication of CN112114193A publication Critical patent/CN112114193A/en
Application granted granted Critical
Publication of CN112114193B publication Critical patent/CN112114193B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R22/00Arrangements for measuring time integral of electric power or current, e.g. electricity meters
    • G01R22/06Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods
    • G01R22/061Details of electronic electricity meters
    • G01R22/063Details of electronic electricity meters related to remote communication
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Power Sources (AREA)

Abstract

The invention relates to a method for upgrading the terminal metering core of the module and not losing the electric quantity, this method is through making the core plate and metering MCU communicate with UART, have realized 698 and self-defining upgrading agreement, and when the metering singlechip is unusual, the core plate can control the electronic switch, read and write the metering chip directly, measure, SPI is switched over by the core plate at the same time, the core plate exchanges the electric quantity with the metering singlechip before and after upgrading, and choose the electricity consumption minimum time of a day to upgrade, have guaranteed effectively that the metering accuracy is high, have realized the upgrading process does not lose the electric quantity.

Description

Method for upgrading module terminal metering core without losing electric quantity
Technical Field
The invention relates to the technical field of electric energy meters, in particular to a method for upgrading the metering core of a module terminal without losing electric quantity.
Background
At present, the power acquisition terminal is divided into a single-core mode and a multi-core mode. The single-core mode is that only one microprocessor singlechip of one terminal is responsible for processing the communication electric quantity operation and the service processing of the metering chip; the multi-core mode is that a special single chip microcomputer is used for metering aiming at the metering function, and other services are realized by a high-performance processor.
Because the single-core mode can lead to unable measurement electric quantity because of the singlechip stop work in software upgrading, terminal restart process, causes the electric quantity to lose, so generally adopt the multicore mode at module terminal more, include measurement chip, SPI, measurement singlechip, UART, nuclear core plate promptly. However, a problem also arises in that, along with the requirement of service expansion, the firmware of the metering single chip microcomputer needs to be upgraded, and the problem of electric quantity loss occurs in the upgrading process, and if the metering single chip microcomputer is not upgraded for accurate electric quantity metering, the metering single chip microcomputer cannot adapt to the market requirement.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method for upgrading a module terminal to prevent a metering core from losing power, which can ensure that a power meter can normally meter power even when a metering single chip microcomputer stops working in an upgrading process, and prevent power loss after upgrading is completed.
In order to achieve the purpose, the technical scheme of the invention is as follows: the utility model provides a method of upgrading module terminal measurement singlechip is not lost electric quantity, the module terminal includes nuclear core plate, the measurement singlechip that links to each other with nuclear core plate communication, the Dataflash module that links to each other with the measurement singlechip, the measurement chip is all connected to nuclear core plate and measurement singlechip, its characterized in that: the metering single chip microcomputer internally comprises a boot area and an app area, the method comprises the following steps,
s1, performing startup detection, and if the app area of the metering single chip microcomputer is normal, skipping to execute S2, otherwise, skipping to execute S3;
s2, the metering singlechip receives the upgrade message data sent by the core board, stores the upgrade message data in an upgrade exchange area in DataFlash, and continues to execute S4-S7;
s3, upgrading according to the abnormal mode;
s4, sending the current real-time electric quantity and the residual pulse number of the electric meter at the time of minimum electric quantity in one day to a core board in a self-defined message mode according to the experience value of the minimum demand occurrence time in the previous m days by the metering single chip microcomputer, and restarting upgrading;
s5, the metering single chip microcomputer enters a boot area after being restarted, an upgrade file of the upgrade switching area is detected, and the upgrade file is moved to the on-chip program area;
s6, the metering single chip microcomputer enters an app area, the version number is actively reported to the core board, the core board waits for the control authority of the metering chip to be released so as to take over the metering chip, and the electric energy generated in the previous step is recorded for accumulation processing;
and S7, restoring the system to normal work after the upgrade is finished.
Further, the upgrading process performed in S3 according to the abnormal mode specifically includes:
s31, the boot area of the metering singlechip receives boot upgrade handshake signals sent by the core board and enters an upgrade state;
s32, the metering single chip microcomputer receives the upgrade file data sent by the core board and directly writes the upgrade file data into an app area;
s33, after the upgrading of the metering single chip microcomputer is finished, entering an app area to normally work, actively reporting the version number to the core board, releasing the control authority of the metering chip by the core board to take over the metering chip, and recording the electric energy generated in the previous steps for accumulation processing;
and S34, restoring the system to work normally.
Further, the upgrade message data in S2 is 698 upgrade message data, and is sent to the metering single chip microcomputer by the core board through the UART.
Furthermore, nuclear core plate and measurement singlechip link to each other with the measurement chip through SPI, and nuclear core plate accessible control electronic switch makes measurement chip and nuclear core plate or measurement chip and measurement singlechip communicate whether.
Further, the method performs the following operations before S5 and before S31,
and S41, the core board controls the electronic switch to enable the metering chip to communicate with the electronic switch to take over the metering chip, the metering is carried out normally, and the electric energy is stored in the EMMC module in the core board in real time.
Further, in S6 and S33, the metering single-chip microcomputer reports the version model to the core board through the UART.
Further, the metering single chip microcomputer stores the electric energy in an external EEPROM module connected through the IIC.
Furthermore, the metering single chip microcomputer is connected with the Dataflash module through the SPI.
Further, a boot area in the metering single chip microcomputer is 8k, and an app area in the metering single chip microcomputer is 512k-8 k.
Further, the core board comprises a high-performance CPU module, a large memory module RAM and a large-capacity memory module EMMC.
Compared with the prior art, the invention has the advantages that:
by adopting the method, the metering singlechip can also normally meter when the metering singlechip stops working in the upgrading process, the electric quantity is not lost after the upgrading is finished, and the metering precision is high.
Drawings
Fig. 1 is a schematic view of a module terminal structure according to the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention, and are not to be construed as limiting the present invention.
Fig. 1 is a schematic diagram of a module terminal structure according to the present application, and as shown in the above diagram, the core board includes a high-performance CPU module, a large memory module RAM, and a large-capacity memory module EMMC for processing a complex service APP; correspondingly, the metering single chip microcomputer is a low-end Cortex-M0 single chip microcomputer, the IIC is connected with an external EEPROM module to store real-time electric energy, and the SPI is connected with a DataFlash module to store frozen data and upgrade files.
Simultaneously, nuclear core plate and measurement singlechip pass through SPI and communicate with same measurement chip, and wherein, nuclear core plate can realize through control electronic switch that measurement chip communicates with nuclear core plate or communicates with the measurement singlechip. The core board and the metering single chip microcomputer communicate through UART, so that 698 and a custom upgrading protocol are realized.
The metering single chip microcomputer comprises a boot (8k) area and an app (512k-8k) area, the boot area and the app area are simultaneously burned into the single chip microcomputer during factory production, the boot is not upgraded any more after burning, and the app can be upgraded through the boot. The following description is the process of upgrading the metering single chip microcomputer through the app.
S1, performing startup detection, and if the app area of the metering single chip microcomputer is normal, skipping to execute S2, otherwise, skipping to execute S3;
s2, the metering singlechip receives the upgrade message data sent by the core board, stores the upgrade message data in an upgrade exchange area in DataFlash, and continues to execute S4-S7; the upgrading message data in the S2 is 698 upgrading message data, and the upgrading message data is sent to the metering single chip microcomputer by the core board through the UART;
s3, upgrading according to the abnormal mode;
s4, sending the current real-time electric quantity and the residual pulse number of the electric meter at the time of minimum electric quantity in one day to a core board in a self-defined message mode according to the experience value of the minimum demand occurrence time in the previous m days by the metering single chip microcomputer, and restarting upgrading;
s5, the metering single chip microcomputer enters a boot area after being restarted, an upgrade file of the upgrade switching area is detected, and the upgrade file is moved to the on-chip program area;
s6, the metering single chip microcomputer enters an app area, the version number is actively reported to the core board, the core board waits for the control authority of the metering chip to be released so as to take over the metering chip, and the electric energy generated in the previous step is recorded for accumulation processing; here, the metering singlechip reports the version model to the core board through the UART;
and S7, restoring the system to normal work after the upgrade is finished.
Specifically, the upgrading process performed in S3 according to the abnormal mode specifically includes:
s31, the boot area of the metering singlechip receives boot upgrade handshake signals sent by the core board and enters an upgrade state;
s32, the metering single chip microcomputer receives the upgrade file data sent by the core board and directly writes the upgrade file data into an app area;
s33, after the upgrading of the metering single chip microcomputer is finished, entering an app area to normally work, actively reporting the version number to the core board, releasing the control authority of the metering chip by the core board to take over the metering chip, and recording the electric energy generated in the previous steps for accumulation processing; here, the metering singlechip also reports the version model to the core board through the UART;
and S34, restoring the system to work normally.
Meanwhile, the method carries out the following operations before S5 and before S31,
and S41, the core board controls the electronic switch to enable the metering chip to communicate with the electronic switch to take over the metering chip, the metering is carried out normally, and the electric energy is stored in the EMMC module in the core board in real time.
Therefore, the method realizes 698 and a user-defined upgrading protocol by enabling the core board and the metering MCU to communicate through the UART, when the metering singlechip is abnormal, the core board can control the electronic switch to directly read and write the metering chip for metering, meanwhile, the SPI is switched by the core board, the core board and the metering singlechip exchange electric quantity before and after upgrading, and the upgrading is carried out at the moment of selecting the minimum daily electric quantity, so that the high metering precision is effectively ensured, and the electric quantity is not lost in the upgrading process.
While embodiments of the invention have been shown and described, it will be understood by those skilled in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (10)

1. The utility model provides a method of upgrading module terminal measurement singlechip is not lost electric quantity, the module terminal includes nuclear core plate, the measurement singlechip that links to each other with nuclear core plate communication, the Dataflash module that links to each other with the measurement singlechip, the measurement chip is all connected to nuclear core plate and measurement singlechip, its characterized in that: the metering single chip microcomputer internally comprises a boot area and an app area, the method comprises the following steps,
s1, performing startup detection, and if the app area of the metering single chip microcomputer is normal, skipping to execute S2, otherwise, skipping to execute S3;
s2, the metering singlechip receives the upgrade message data sent by the core board, stores the upgrade message data in an upgrade exchange area in DataFlash, and continues to execute S4-S7;
s3, upgrading according to the abnormal mode;
s4, sending the current real-time electric quantity and the residual pulse number of the electric meter at the time of minimum electric quantity in one day to a core board in a self-defined message mode according to the experience value of the minimum demand occurrence time in the previous m days by the metering single chip microcomputer, and restarting upgrading;
s5, the metering single chip microcomputer enters a boot area after being restarted, an upgrade file of the upgrade switching area is detected, and the upgrade file is moved to the on-chip program area;
s6, the metering single chip microcomputer enters an app area, the version number is actively reported to the core board, the core board waits for the control authority of the metering chip to be released so as to take over the metering chip, and the electric energy generated in the previous step is recorded for accumulation processing;
and S7, restoring the system to normal work after the upgrade is finished.
2. The method of claim 1, further comprising: in S3, the upgrading process is performed according to an abnormal mode, specifically including,
s31, the boot area of the metering singlechip receives boot upgrade handshake signals sent by the core board and enters an upgrade state;
s32, the metering single chip microcomputer receives the upgrade file data sent by the core board and directly writes the upgrade file data into an app area;
s33, after the upgrading of the metering single chip microcomputer is finished, entering an app area to normally work, actively reporting the version number to the core board, releasing the control authority of the metering chip by the core board to take over the metering chip, and recording the electric energy generated in the previous steps for accumulation processing;
and S34, restoring the system to work normally.
3. The method of claim 1, further comprising:
the upgrade message data in the S2 is 698 upgrade message data, and is sent to the metering single chip microcomputer by the core board through the UART.
4. The method of claim 1, further comprising:
the core board and the metering single chip microcomputer are connected with the metering chip through the SPI, and the core board can control the electronic switch to enable the metering chip to be communicated with the core board or the metering chip to be communicated with the metering single chip microcomputer or not.
5. The method of claim 4, further comprising:
the method proceeds before S5 and before S31 with the following operations,
and S41, the core board controls the electronic switch to enable the metering chip to communicate with the electronic switch to take over the metering chip, the metering is carried out normally, and the electric energy is stored in the EMMC module in the core board in real time.
6. The method of claim 2, further comprising:
in S6 and S33, the metering single chip microcomputer reports the version model to the core board through UART.
7. The method of claim 2, further comprising:
and the metering single chip microcomputer stores the electric energy in an external EEPROM module connected through the IIC.
8. The method of claim 1, further comprising:
and the metering single chip microcomputer is connected with the Dataflash module through the SPI.
9. The method of claim 1, further comprising:
the boot area in the metering single chip microcomputer is 8k, and the app area is 512k-8 k.
10. The method of claim 1, further comprising:
the core board comprises a high-performance CPU module, a large memory module RAM and a large-capacity memory module EMMC.
CN202010752836.2A 2020-07-30 2020-07-30 Method for metering single chip microcomputer power loss prevention through upgrading module terminal Active CN112114193B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010752836.2A CN112114193B (en) 2020-07-30 2020-07-30 Method for metering single chip microcomputer power loss prevention through upgrading module terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010752836.2A CN112114193B (en) 2020-07-30 2020-07-30 Method for metering single chip microcomputer power loss prevention through upgrading module terminal

Publications (2)

Publication Number Publication Date
CN112114193A true CN112114193A (en) 2020-12-22
CN112114193B CN112114193B (en) 2022-06-03

Family

ID=73799045

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010752836.2A Active CN112114193B (en) 2020-07-30 2020-07-30 Method for metering single chip microcomputer power loss prevention through upgrading module terminal

Country Status (1)

Country Link
CN (1) CN112114193B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998054591A1 (en) * 1997-05-30 1998-12-03 General Electric Company Automated communication of electricity meter data
CA2350242A1 (en) * 1998-11-25 2000-06-08 Schlumbergersema Inc. Improved memory integrity for meters
CN102063318A (en) * 2010-12-22 2011-05-18 Tcl通力电子(惠州)有限公司 Upgrading method of power supply MCU (Micro Control Unit)
CN202041634U (en) * 2011-04-01 2011-11-16 盛隆电气集团有限公司 Online upgrade multifunctional electric meter and system
CN105511918A (en) * 2015-12-06 2016-04-20 江苏林洋能源股份有限公司 Automatic data storage format maintenance method of intelligent electric energy meter
CN106526314A (en) * 2016-12-09 2017-03-22 惠州市丝鹭新能源科技有限公司 Metering module special for charging pile

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1998054591A1 (en) * 1997-05-30 1998-12-03 General Electric Company Automated communication of electricity meter data
CA2350242A1 (en) * 1998-11-25 2000-06-08 Schlumbergersema Inc. Improved memory integrity for meters
CN102063318A (en) * 2010-12-22 2011-05-18 Tcl通力电子(惠州)有限公司 Upgrading method of power supply MCU (Micro Control Unit)
CN202041634U (en) * 2011-04-01 2011-11-16 盛隆电气集团有限公司 Online upgrade multifunctional electric meter and system
CN105511918A (en) * 2015-12-06 2016-04-20 江苏林洋能源股份有限公司 Automatic data storage format maintenance method of intelligent electric energy meter
CN106526314A (en) * 2016-12-09 2017-03-22 惠州市丝鹭新能源科技有限公司 Metering module special for charging pile

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
巫钟兴等: ""基于IR46的智能电能表升级技术研究"", 《电测与仪表》 *

Also Published As

Publication number Publication date
CN112114193B (en) 2022-06-03

Similar Documents

Publication Publication Date Title
CN100495041C (en) Remote automatic centralized control monitoring meter reading system
CN106774038B (en) Environment monitoring or monitoring data acquisition and transmission instrument
CN110829590B (en) Intelligent monitoring system, method, platform and storage medium for line loss of transformer area
CN110136209B (en) Camera calibration method and device and computer readable storage medium
CN102945594B (en) Meter-bus data collector with ultra-low power loss
CN103795786A (en) Embedded concentrator system with web service function
CN102081118A (en) Real-time metering two-way communication intelligent ammeter
CN109459960B (en) NB-IoT-based Internet of things acquisition control system and control method
CN104681835A (en) Double-unit backup controller of proton exchange membrane fuel cell and control method of double-unit backup controller
CN204143628U (en) Wireless collector for collecting energy of electric energy meter
CN111984487A (en) Method and device for recording fault hardware position off-line
CN102930877A (en) Digital monitoring system suitable for light module controller and implementation method of digital monitoring system
CN104731736A (en) Time synchronization device, method and system
CN112114193B (en) Method for metering single chip microcomputer power loss prevention through upgrading module terminal
WO2020192669A1 (en) Gas meter intelligent controller and firmware upgrade start-up method therefor
CN114384787A (en) Calibration method and device for electric energy meter clock
CN109374075A (en) Matrix form NB-IoT remote transmission intelligent water meter
CN104699553A (en) Clock self-recovery method after failure in acquiring terminal clock battery with electrical information
CN104991193B (en) Rechargeable battery uses efficiency tracing system and method
CN103439554B (en) A kind of data readback and storage device and system thereof
CN102122262A (en) Monitoring system and monitoring method for solid-state memory equipment
CN111521966A (en) Method and device for monitoring time out-of-tolerance of district electric meter, monitoring terminal and storage medium
CN211015480U (en) FPGA-based edge computing device
CN202976445U (en) Counter bus data collector with ultralow power consumption
CN115480975A (en) Wiring checking method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant