CN110209433B - Method for identifying concentrators of different models - Google Patents

Method for identifying concentrators of different models Download PDF

Info

Publication number
CN110209433B
CN110209433B CN201910301846.1A CN201910301846A CN110209433B CN 110209433 B CN110209433 B CN 110209433B CN 201910301846 A CN201910301846 A CN 201910301846A CN 110209433 B CN110209433 B CN 110209433B
Authority
CN
China
Prior art keywords
memory
concentrator
type
driver
identifying
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.)
Active
Application number
CN201910301846.1A
Other languages
Chinese (zh)
Other versions
CN110209433A (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.)
Hangzhou Fengrui Intelligent Electrical Research Institute Co ltd
Original Assignee
Hangzhou Fengrui Intelligent Electrical Research Institute 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 Hangzhou Fengrui Intelligent Electrical Research Institute Co ltd filed Critical Hangzhou Fengrui Intelligent Electrical Research Institute Co ltd
Priority to CN201910301846.1A priority Critical patent/CN110209433B/en
Publication of CN110209433A publication Critical patent/CN110209433A/en
Application granted granted Critical
Publication of CN110209433B publication Critical patent/CN110209433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Read Only Memory (AREA)

Abstract

The invention relates to a method for identifying concentrators of different models, which is characterized by comprising the following steps: the method includes, S1, initializing current concentrator software; s2, loading a memory driver and identifying the memory type; s3, determining the memory capacity by adopting a memory capacity identification algorithm; and S4, determining the model of the concentrator. By identifying the type of the concentrator, concentrator software can be universal among concentrators of different types, software development cost is saved, and production efficiency is improved.

Description

Method for identifying concentrators of different models
Technical Field
The invention relates to the technical field of metering instruments, in particular to a method for identifying concentrators of different models.
Background
The concentrator is used as a core device of a metering automation system, and different functions are required to be provided for different application scenarios, such as whether metering is required or not, whether encryption is performed or not, and the like. It is necessary to configure hardware resources of the concentrator differently to meet different functional requirements of the concentrator, and then derive concentrator products of different models, such as concentrators with EERPOM or FRAM memories.
When the existing concentrator is used, software of different versions needs to be provided for the concentrators of different models to perform operations such as upgrading and maintenance, and the like, so that the problems of high development difficulty, low production efficiency, inconvenience in maintenance and the like caused by the fact that product software is not universal are solved.
Disclosure of Invention
In view of the above problems, an object of the present invention is to provide a method for identifying concentrators of different models, which can identify concentrators of different models to enable software of the concentrators to be used universally, save software development and maintenance costs, and improve production efficiency.
In order to achieve the purpose, the invention adopts the technical scheme that: a method of identifying concentrators of different models, comprising: the method comprises the following steps of,
s1, initializing the current concentrator software;
s2, loading a memory driver and identifying the memory type;
s3, determining the memory capacity by adopting a memory capacity identification algorithm;
and S4, determining the model of the concentrator.
Further, in S2, a memory driver is loaded to identify the memory type, specifically,
and if the first driver is loaded successfully, judging that the memory in the current concentrator is a first type memory, and if the second driver is loaded successfully, judging that the memory in the current concentrator is a second type memory, wherein the memory driver comprises a first driver for driving the first type memory and a second driver for driving the second type memory.
Further, in step S3, a memory capacity identification algorithm is used to determine the memory capacity, specifically,
s31, writing data into the memory in sequence, writing the characteristic code into the first m bytes of the current unit when writing one data, wherein the characteristic code value is equal to the serial number of the currently written data, and executing the read-back operation when writing one characteristic code from the second unit;
s32, judging whether the feature code read back by the first unit is equal to the feature code corresponding to the serial number n, if so, judging that the storage capacity x of the memory is K (n-1) (bit), wherein K is the digit of one unit in the memory, and if not, executing S33;
s33, continuing to write the data and the corresponding feature codes, and executing a read-back operation to execute S32.
Further, the method further comprises, after the step S4 is executed, executing the following operations,
s5, loading a software function module corresponding to the concentrator model;
s6, the concentrator identification is ended.
Further, the value of K is 8 kbit.
Further, m is 4.
Further, the first memory is a FRAM.
Further, the second memory is EERPOM.
Further, the FRAM adopts a model of MB85RC64 or MB85RC 128; the EERPOM is of a model M2456 24512R or M24256R.
Further, the first memory or the second memory of the concentrator is connected with the MCU in the concentrator in an I2C mode.
Compared with the prior art, the invention has the advantages that: the method comprises the steps of judging the type of a memory in the concentrator by judging whether the memory drive loading is successful, further judging the capacity of the memory to determine the type of the concentrator, and loading a corresponding function module of concentrator software according to the type of hardware, so that the concentrator software can be universally used for concentrators of different types.
Drawings
Fig. 1 is a schematic block diagram of a concentrator MCU and a memory according to the present invention.
FIG. 2 is a flow chart of a method for identifying concentrators of different models according to the present invention.
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.
As shown in fig. 1, which is a schematic block diagram of the connection between the concentrator MCU and the memory according to the present invention, the concentrator MCU is connected to the memory through I2C, and the memory pins used in the memory are a data pin SDA, a clock pin SCL, and a strobe pin CS, which saves circuit board space and chip pins.
At present, FRAM or EERPOM is generally adopted as the memory of the concentrator in the metering automation system, and it is easy to think that different types of concentrators can adopt different types of memories, each type of memory has its own corresponding capacity, so that the following combination mode exists:
the concentrator of type A adopts FRAM in hardware design, the concentrator of type B, adopt EEPROM in hardware design;
or the concentrators of the model C and the model D adopt FRAM in hardware design, the concentrator of the model C uses FRAM with the capacity C, and the concentrator of the model D uses FRAM with the capacity D; or, the concentrator of the model E and the concentrator of the model F adopt EEPROM in hardware design, the concentrator of the model E uses EEPROM with the capacity of E, and the concentrator of the model F uses EEPROM with the capacity of F.
In this embodiment, the FRAM model is MB85RC64 or MB85RC128, the EERPOM model is M2456 or M242 24512R or M24256R, obviously, the concentrator models are distinguished according to the memory types and the storage capacities, and to identify concentrators of different models, the memory types and the storage capacities of the concentrators need to be determined.
Fig. 2 is a flow chart of a method for identifying concentrators of different models according to the present invention, and as shown in the figure, the method is implemented as follows:
s1, initializing the current concentrator software;
s2, loading a memory driver and identifying the memory type;
s3, determining the memory capacity by adopting a memory capacity identification algorithm;
s4, determining the type of the concentrator;
s5, loading a software function module corresponding to the concentrator model;
s6, the concentrator identification is ended.
In the above S2, the memory driver is loaded to identify the memory type, specifically, if the first driver is loaded successfully, it is determined that the memory in the current concentrator is the first type memory, and if the second driver is loaded successfully, it is determined that the memory in the current concentrator is the second type memory, where the memory driver includes a first driver that drives the first type memory and a second driver that drives the second type memory, and the memory type can be identified by determining whether the memory driver is loaded successfully. In this embodiment, the first type memory is FRAM, and the second type memory is EERPOM.
After identifying the type of memory, a further determination of the capacity of the memory is required to determine the model of the concentrator. The implementation manner of the storage capacity algorithm described in the above S3 is specifically as follows:
s31, writing data into the memory in sequence, writing the characteristic code into the first m bytes of the current unit when writing one data, wherein the characteristic code value is equal to the serial number of the currently written data, and executing the read-back operation when writing one characteristic code from the second unit;
s32, judging whether the feature code read back by the first unit is equal to the feature code corresponding to the serial number n, if so, judging that the storage capacity x of the memory is K (n-1) (bit), wherein K is the digit of one unit in the memory, and if not, executing S33;
s33, continuing to write the data and the corresponding feature codes, and executing a read-back operation to execute S32.
According to the read-write principle of EERPOM and FRAM, the original storage content can be covered again and again during data storage, and in order to obtain the capacity of the memory, the number of the units of the memory is generally required to be known, and the purpose is realized by adopting a characteristic code marking mode in the application, namely when the characteristic code corresponding to the nth storage data is equal to the characteristic code read out by the first unit in the memory for the first time, the memory is indicated to have n-1 units. The first bit of the memory starts with 0, if the memory uses 8kbit as a unit, different feature codes are written in 4 bytes at the beginning of each unit, 0kbit position (marked as position 1) is written in 0x55AA0001, 8kbit position (marked as position 2) is written in 0x55AA0002, 16kbit position (marked as position 3) is written in 0x55AA0003, in other words, 0kbit-7kbit is the first unit, the unit is written in feature codes 1, 8kbit-15kbit is the second unit, the unit is written in feature codes 2, obviously, the size of the feature codes is equal to the serial number of the written data, and so on, the feature codes written in the nth data is 0x55AA0000+ n correspondingly. Starting from the 2 nd position, every time a signature code is written, a read-back operation is executed, and if the read signature code of the first unit 1 is the signature code corresponding to the nth data, the following formula is provided:
storage capacity x ═ 8 × (n-1) (kbit)
The storage capacity X is the storage capacity of the memory.
The method can easily determine the type of the concentrator, further load the software function module corresponding to the type of the concentrator, namely finally determine the type of the concentrator after determining the type of the storage and the capacity of the storage according to the method, and further load the function module corresponding to the concentrator software according to the type of the concentrator, thereby realizing the universality of the same set of software among concentrators with different types, reducing the software development cost, improving the production efficiency, simultaneously facilitating the software maintenance and reducing the maintenance cost.
Of course, it is conceivable that the concentrator identification method adopted by the invention is not only suitable for FRAM and EERPOM type concentrators, but also suitable for identifying other types of concentrators.
In addition to the above-mentioned modifications, other similar modifications are also included in the scope of the modifications of the present invention, and are not described herein in detail. 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 (8)

1. A method of identifying concentrators of different models, comprising: the method comprises the following steps of,
s1, initializing the current concentrator software;
s2, loading a memory driver and identifying the memory type;
s3, determining the memory capacity by adopting a memory capacity identification algorithm;
s4, determining the type of the concentrator;
wherein, in S2, a memory driver is loaded to identify the memory type, specifically,
the method for identifying the memory type comprises the steps that if a first driver is loaded successfully, the memory in the current concentrator is judged to be a first type memory, and if a second driver is loaded successfully, the memory in the current concentrator is judged to be a second type memory, wherein the memory driver comprises a first driver for driving the first type memory and a second driver for driving the second type memory;
in step S3, a memory capacity identification algorithm is used to determine the memory capacity, specifically,
s31, writing data into the memory in sequence, writing the characteristic code into the first m bytes of the current unit when writing one data, wherein the characteristic code value is equal to the serial number of the currently written data, and executing the read-back operation when writing one characteristic code from the second unit;
s32, judging whether the feature code read back by the first unit is equal to the feature code corresponding to the serial number n, if so, judging that the storage capacity x = K (n-1) (bit) of the memory, wherein K is the digit of one unit in the memory, and if not, executing S33;
s33, continuing to write the data and the corresponding feature codes, and executing the read-back operation, and executing S32.
2. The method of claim 1, further comprising: the method further comprises, after performing step S4, performing the following operations,
s5, loading a software function module corresponding to the concentrator model;
s6, the concentrator identification is ended.
3. The method of claim 1, wherein:
the value of K is 8 kbit.
4. The method of claim 1, further comprising:
and m is 4.
5. The method of claim 1, further comprising:
the first type of memory is a FRAM.
6. The method of claim 5, further comprising:
the second type of memory is an EEPROM.
7. The method of claim 6, further comprising:
the FRAM is of a model MB85RC64 or MB85RC 128;
the EEPROM adopts a model number of M24514 24512R or M24256R.
8. The method of claim 1, further comprising:
the first memory or the second memory of the concentrator is connected with the MCU in the concentrator in an I2C mode.
CN201910301846.1A 2019-04-15 2019-04-15 Method for identifying concentrators of different models Active CN110209433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910301846.1A CN110209433B (en) 2019-04-15 2019-04-15 Method for identifying concentrators of different models

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910301846.1A CN110209433B (en) 2019-04-15 2019-04-15 Method for identifying concentrators of different models

Publications (2)

Publication Number Publication Date
CN110209433A CN110209433A (en) 2019-09-06
CN110209433B true CN110209433B (en) 2022-07-01

Family

ID=67785334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910301846.1A Active CN110209433B (en) 2019-04-15 2019-04-15 Method for identifying concentrators of different models

Country Status (1)

Country Link
CN (1) CN110209433B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113571106B (en) * 2021-07-21 2023-04-25 四川虹美智能科技有限公司 Data reading method and device for charged erasable programmable read-only memory

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512342A (en) * 2002-12-27 2004-07-14 技嘉科技股份有限公司 Upgrading control method for intelligent cured software
CN1920777A (en) * 2006-09-15 2007-02-28 中山大学 System software upgrading method for digital household appliances and updated system
CN1964526A (en) * 2005-11-09 2007-05-16 中兴通讯股份有限公司 A method for hardware drive program of intelligent loading mobile phone
CN102736861A (en) * 2011-04-08 2012-10-17 群联电子股份有限公司 Memory configuration method, memory controller and memory storage device
CN103631615A (en) * 2012-08-22 2014-03-12 通用电气航空系统有限公司 Method and system of implementing data load protocols
CN104160786A (en) * 2011-12-21 2014-11-19 埃尔多实验室控股有限公司 Lighting system and method of retrieving status information of a lighting system
CN104246711A (en) * 2012-04-20 2014-12-24 丰田自动车株式会社 Information processing device, information processing method, and storage medium storing program for executing information processing method
CN104793083A (en) * 2015-04-23 2015-07-22 广西电网有限责任公司电力科学研究院 Communication unit interchangeability testing system and interchanging method thereof
CN105162534A (en) * 2015-09-25 2015-12-16 国网天津市电力公司 System and method of concentrator for testing wireless public network communication
CN105354681A (en) * 2015-11-26 2016-02-24 新疆信息产业有限责任公司 Method for automatically studying, judging and correcting acquisition file of marketing acquisition interface data
CN105786716A (en) * 2014-12-25 2016-07-20 研祥智能科技股份有限公司 Computer system of heterogeneous hybrid memory architecture, control method of computer system and memory detection system
CN106411991A (en) * 2016-05-26 2017-02-15 苏州工业园区驿力机车科技股份有限公司 Vehicle-mounted data real-time acquisition system
EP3182281A1 (en) * 2015-12-11 2017-06-21 Sagemcom Energy & Telecom Sas Method for transferring a new version of a software program to at least one electric meter via a communication network
CN107544818A (en) * 2016-06-28 2018-01-05 北京小米移动软件有限公司 The loading method and device of system software
CN108038425A (en) * 2017-11-28 2018-05-15 无锡十月中宸科技有限公司 One mode identifies directory system and its indexing means
CN108121763A (en) * 2017-11-25 2018-06-05 无锡十月中宸科技有限公司 One mode identifies directory system and its indexing means
CN108958813A (en) * 2018-06-13 2018-12-07 北京无线电测量研究所 file system construction method, device and storage medium
CN109410454A (en) * 2018-11-08 2019-03-01 珠海十亿网络科技有限公司 A kind of management control method and system of water meter

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8316447B2 (en) * 2006-09-01 2012-11-20 Mu Dynamics, Inc. Reconfigurable message-delivery preconditions for delivering attacks to analyze the security of networked systems
US20160098728A1 (en) * 2014-10-04 2016-04-07 Piotr Nawrocki Communication Method And System With DTA Register Architecture

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1512342A (en) * 2002-12-27 2004-07-14 技嘉科技股份有限公司 Upgrading control method for intelligent cured software
CN1964526A (en) * 2005-11-09 2007-05-16 中兴通讯股份有限公司 A method for hardware drive program of intelligent loading mobile phone
CN1920777A (en) * 2006-09-15 2007-02-28 中山大学 System software upgrading method for digital household appliances and updated system
CN102736861A (en) * 2011-04-08 2012-10-17 群联电子股份有限公司 Memory configuration method, memory controller and memory storage device
CN104160786A (en) * 2011-12-21 2014-11-19 埃尔多实验室控股有限公司 Lighting system and method of retrieving status information of a lighting system
CN104246711A (en) * 2012-04-20 2014-12-24 丰田自动车株式会社 Information processing device, information processing method, and storage medium storing program for executing information processing method
CN103631615A (en) * 2012-08-22 2014-03-12 通用电气航空系统有限公司 Method and system of implementing data load protocols
CN105786716A (en) * 2014-12-25 2016-07-20 研祥智能科技股份有限公司 Computer system of heterogeneous hybrid memory architecture, control method of computer system and memory detection system
CN104793083A (en) * 2015-04-23 2015-07-22 广西电网有限责任公司电力科学研究院 Communication unit interchangeability testing system and interchanging method thereof
CN105162534A (en) * 2015-09-25 2015-12-16 国网天津市电力公司 System and method of concentrator for testing wireless public network communication
CN105354681A (en) * 2015-11-26 2016-02-24 新疆信息产业有限责任公司 Method for automatically studying, judging and correcting acquisition file of marketing acquisition interface data
EP3182281A1 (en) * 2015-12-11 2017-06-21 Sagemcom Energy & Telecom Sas Method for transferring a new version of a software program to at least one electric meter via a communication network
CN106411991A (en) * 2016-05-26 2017-02-15 苏州工业园区驿力机车科技股份有限公司 Vehicle-mounted data real-time acquisition system
CN107544818A (en) * 2016-06-28 2018-01-05 北京小米移动软件有限公司 The loading method and device of system software
CN108121763A (en) * 2017-11-25 2018-06-05 无锡十月中宸科技有限公司 One mode identifies directory system and its indexing means
CN108038425A (en) * 2017-11-28 2018-05-15 无锡十月中宸科技有限公司 One mode identifies directory system and its indexing means
CN108958813A (en) * 2018-06-13 2018-12-07 北京无线电测量研究所 file system construction method, device and storage medium
CN109410454A (en) * 2018-11-08 2019-03-01 珠海十亿网络科技有限公司 A kind of management control method and system of water meter

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"基于ARM9的远程抄表系统集中器的设计与实现";丘森辉 等;《计算机工程与设计》;20130516;第34卷(第5期);第1640-1646页 *

Also Published As

Publication number Publication date
CN110209433A (en) 2019-09-06

Similar Documents

Publication Publication Date Title
CN101366182B (en) A nand flash memory controller exporting a nand interface
CN110335635B (en) Method for managing a memory device, memory device and controller
US20130013853A1 (en) Command executing method, memory controller and memory storage apparatus
US8151039B2 (en) System and method for controlling flash memory without using ready/busy signal
US11294586B2 (en) Method for performing read acceleration, associated data storage device and controller thereof
US9552287B2 (en) Data management method, memory controller and embedded memory storage apparatus using the same
CN104658612B (en) Method for accessing storage unit in flash memory and device using the same
US20060224821A1 (en) System for parallel updating flash memory and method for the same
US9063888B2 (en) Program code loading and accessing method, memory controller, and memory storage apparatus
CN112131172A (en) PCIe equipment chip initialization method for reducing time delay
CN110765032A (en) Method for reading and writing I2C memory based on system management bus interface
CN102955751A (en) Storer storage device, storer controller and data write-in method
CN103019969A (en) Flash memory storage device and determination method of bad storage area thereof
CN106649137B (en) Nand Flash bad block management method and device and memory
CN110209433B (en) Method for identifying concentrators of different models
CN115080471A (en) Nand flash interface controller based on FPGA and read-write method
US7404026B2 (en) Multi media card with high storage capacity
TWI467579B (en) Electronic device, method for controlling memory thereof and associated computer-readable storage medium
US7685343B2 (en) Data access method for serial bus
CN105528314A (en) Data processing method and control equipment
CN107168650B (en) Method and device for processing data in memory of BIOS
CN110362526B (en) SPI slave device, storage and adaptation method and computer storage medium
CN102591738A (en) Data management method, memory controller and embedded memory storage device
CN112634964A (en) Data writing method, device and equipment of electronic control unit and storage medium
CN104714892A (en) Data access command execution method and flash memory device using the same

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