[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN111444034A - Method for preventing initialization failure of Dflash of instrument - Google Patents

Method for preventing initialization failure of Dflash of instrument Download PDF

Info

Publication number
CN111444034A
CN111444034A CN202010215616.6A CN202010215616A CN111444034A CN 111444034 A CN111444034 A CN 111444034A CN 202010215616 A CN202010215616 A CN 202010215616A CN 111444034 A CN111444034 A CN 111444034A
Authority
CN
China
Prior art keywords
dflash
initialization
entering
failure
preventing
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.)
Pending
Application number
CN202010215616.6A
Other languages
Chinese (zh)
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.)
Jiangling Motors Corp Ltd
Original Assignee
Jiangling Motors Corp 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 Jiangling Motors Corp Ltd filed Critical Jiangling Motors Corp Ltd
Priority to CN202010215616.6A priority Critical patent/CN111444034A/en
Publication of CN111444034A publication Critical patent/CN111444034A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0751Error or fault detection not based on redundancy
    • G06F11/0754Error or fault detection not based on redundancy by exceeding limits
    • G06F11/076Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Instrument Panels (AREA)

Abstract

The invention discloses a method for preventing Dflash initialization failure of an instrument, which is characterized by comprising the following steps: the method for preventing the initialization failure of the Dflash of the instrument comprises the following steps: firstly, initializing Dflash; secondly, judging whether the Dflash mode flag bit is initialized successfully or not, if YES, entering a third step, and if NO, entering a fourth step; reading Dflash data and comparing whether preset flag bytes are consistent or not, if YES, entering a sixth step, and if NO, entering a fifth step; step four, judging whether the initialization is carried out for the Nth time or not, if NO, entering the step one, and if YES, entering the step three; fifthly, writing default data in the ROM into the RAM and writing Dflash once; after the fifth step is finished, entering a sixth step; and sixthly, jumping to work normally. The method for preventing the Dflash initialization failure of the instrument can obviously increase the fault tolerance of software and effectively prevent the instrument from displaying and indicating errors caused by the Dflash initialization failure.

Description

Method for preventing initialization failure of Dflash of instrument
Technical Field
The invention relates to the technical field of automobile electronics, in particular to a method for preventing initialization failure of a Dflash of an instrument.
Background
Data Flash (Data memory, abbreviated as Dflash) is a memory chip used for storing important Data of a whole vehicle instrument in the instrument, and the stored Data comprises: ODO data, header data, configuration information, and some data that is required to be not lost upon power loss.
When the automobile instrument is powered on Battery, the initialization process including Dflash initialization, MCU clock initialization, port initialization, RTC clock initialization, timed interrupt initialization, ADC initialization, motor module initialization, L CD module initialization, CAN module initialization and the like exists in the instrument.
Generally speaking, the instrument initialization is to restore the data state and configuration information of the instrument before the whole vehicle is powered off. In the process of reading and writing the data memory, occasionally, data cannot be read or written, so that the Dflash initialization fails, and data before last power-off cannot be recovered, thereby causing data loss or confusion. Once the initialization of the Dflash fails, the RAM cannot read the data and configuration stored in the Dflash, and at this time, the Dflash can directly restore the default data and configuration information in the ROM, and the data state and configuration information after the initialization of the meter directly become the default information stored in the ROM, thereby causing the loss of the stored data and the error of the functional configuration. And then display the wrong information to the customer, resulting in a poor driving experience.
Disclosure of Invention
The invention aims to: the method for preventing the Dflash initialization failure of the instrument overcomes the defects in the prior art, solves the problems in the prior art, and provides the method for preventing the Dflash initialization failure of the instrument, so that the wrong display and indication caused by the Dflash initialization failure of the instrument are prevented from bringing bad impression to customers.
The technical scheme of the invention is as follows:
a method for preventing initialization failure of a Dflash of a meter is characterized by comprising the following steps: the method for preventing the initialization failure of the Dflash of the instrument comprises the following steps:
firstly, initializing Dflash;
secondly, judging whether the Dflash mode flag bit is initialized successfully or not, if YES, entering a third step, and if NO, entering a fourth step;
reading Dflash data and comparing whether preset flag bytes are consistent or not, if YES, entering a sixth step, and if NO, entering a fifth step;
step four, judging whether the initialization is carried out for the Nth time or not, if NO, entering the step one, and if YES, entering the step three;
fifthly, writing default data in the ROM into the RAM and writing Dflash once, and entering a sixth step after the fifth step is finished;
and sixthly, jumping to work normally.
As a further improvement of this solution, in N times in the fourth step, N is a natural number greater than or equal to 2.
As a further improvement of this solution, in N times in the fourth step, N is 3.
The method is further improved by judging whether the Dflash initialization frequency reaches 3 times, if not, the Dflash initialization is carried out again until the Dflash initialization is successful, the probability of failure of the Dflash initialization is very small, and if the 3 Dflash initialization fails, the internal block area of the instrument is damaged or the hardware has quality problems.
The invention has the advantages that:
1. the method for preventing the initialization failure of the Dflash of the instrument disclosed by the invention has the advantages that a logic judgment is added in the process after the initialization failure of the Dflash occurs, if the initialization failure of the Dflash occurs, the initialization step of the Dflash is returned to the initialization step of the Dflash, and the initialization step of the Dflash is carried out again, so that the fault tolerance of software can be obviously improved, and the condition of the initialization failure of the Dflash can be effectively prevented.
2. Therefore, the fault tolerance rate can be greatly increased, and the phenomenon that due to accidental factors, one Dflash initialization failure occurs, the default data in the whole instrument data recovery ROM is caused, and error display and indication occur. The error display and indication caused by the failure of Dflash initialization of the prevention meter bring bad impression to customers.
Drawings
The invention is further described with reference to the following figures and examples:
fig. 1 is a schematic diagram of a software flow for preventing Dflash initialization failure in the prior art.
FIG. 2 is a schematic diagram of the software flow for preventing Dflash initialization failure according to the present invention.
Detailed Description
The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and preferred embodiments.
As shown in fig. 2, the present invention discloses a method for preventing initialization failure of a meter Dflash, which comprises the following steps: firstly, initializing Dflash; secondly, judging whether the Dflash mode flag bit is initialized successfully or not, if YES, entering a third step, and if NO, entering a fourth step;
reading Dflash data and comparing whether preset flag bytes are consistent or not, if YES, entering a sixth step, and if NO, entering a fifth step; step four, judging whether the initialization is carried out for the Nth time or not, if NO, entering the step one, and if YES, entering the step three; fifthly, writing default data in the ROM into the RAM and writing Dflash once; after the fifth step is finished, entering a sixth step; and sixthly, jumping to work normally. The method for preventing the initialization failure of the Dflash of the instrument disclosed by the invention has the advantages that a logic judgment is added in the process after the initialization failure of the Dflash occurs, if the initialization failure of the Dflash occurs, the initialization step of the Dflash is returned to the initialization step of the Dflash, and the initialization step of the Dflash is carried out again, so that the fault tolerance of software can be obviously improved, and the condition of the initialization failure of the Dflash can be effectively prevented.
As a further improvement of this solution, in N times in the fourth step, N is a natural number greater than or equal to 2. Therefore, the fault tolerance rate can be greatly increased, and the phenomenon that due to accidental factors, one Dflash initialization failure occurs, the default data in the whole instrument data recovery ROM is caused, and error display and indication occur. The error display and indication caused by the failure of Dflash initialization of the prevention meter bring bad impression to customers.
As a further improvement of this solution, in N times in the fourth step, N is 3. And if the initialization is successful, the flag bit value is judged to be valid, and if the returned flag bit is not initialized successfully, the reinitialization judgment step is continuously executed. Because the Dflash initialization failure belongs to the sporadic phenomenon with extremely low probability, if the Dflash initialization failure exceeds 3 times, the hardware can be determined to generate faults/damages, so the Dflash initialization is repeatedly initialized twice (till initialization is carried out for three times) after the Dflash initialization failure, and the fault tolerance is increased. When N is 3, the method is most economical and effective, can prevent error display and indication caused by Dflash initialization failure of the instrument, and can reduce the running time.
The method is further improved by judging whether the Dflash initialization frequency reaches 3 times, if not, the Dflash initialization is carried out again until the Dflash initialization is successful, the probability of failure of the Dflash initialization is very small, and if the 3 Dflash initialization fails, the internal block area of the instrument is damaged or the hardware has quality problems. Therefore, the fault tolerance rate can be greatly increased, and the phenomenon that due to accidental factors, one Dflash initialization failure occurs, the default data in the whole instrument data recovery ROM is caused, and error display and indication occur. The error display and indication caused by the failure of Dflash initialization of the prevention meter bring bad impression to customers.
As shown in fig. 1, a software flow diagram for preventing the Dflash initialization failure is not added in the prior art. Initializing Dflash, judging whether the initialization of the Dflash mode flag bit is successful, if YES, entering the second step, and if NO, entering the third step; reading Dflash data and comparing whether preset flag bytes are consistent or not, if YES, entering a fourth step, and if NO, entering a third step; writing default data in the ROM into the RAM and writing the Dflash once; and fourthly, skipping to work normally. Therefore, if the Dflash initialization fails, the default data in the ROM is directly written into the RAM and the Dflash is written once, so that error display and indication caused by the Dflash initialization failure can occur, and bad impression is easily brought to a client. The method for preventing the initialization failure of the Dflash of the instrument disclosed by the invention adds a logic judgment in the process after the initialization failure of the Dflash occurs, and returns to the step of the initialization of the Dflash to perform the initialization step of the Dflash again if the initialization failure of the Dflash occurs.
While the invention has been described with reference to a preferred embodiment, it will be understood by those skilled in the art that various changes may be made and equivalents may be substituted for elements thereof without departing from the spirit and scope of the invention. The present invention is not to be limited by the specific embodiments disclosed herein, and other embodiments that fall within the scope of the claims of the present application are intended to be within the scope of the present invention. The invention has various embodiments, and all technical solutions formed by adopting equivalent transformation or equivalent transformation are within the protection scope of the invention.

Claims (4)

1. A method for preventing initialization failure of a Dflash of a meter is characterized by comprising the following steps: the method for preventing the initialization failure of the Dflash of the instrument comprises the following steps:
the first step, the initialization of the Dflash,
secondly, judging whether the Dflash mode flag bit is initialized successfully or not, if YES, entering a third step, and if NO, entering a fourth step;
reading Dflash data and comparing whether preset flag bytes are consistent or not, if YES, entering a sixth step, and if NO, entering a fifth step;
step four, judging whether the initialization is carried out for the Nth time or not, if NO, entering the step one, and if YES, entering the step three;
fifthly, writing default data in the ROM into the RAM and writing Dflash once; after the fifth step is finished, entering a sixth step;
and sixthly, jumping to work normally.
2. The method of claim 1 for preventing a Dflash initialization failure of a meter, comprising: in the fourth step, N is a natural number more than or equal to 2 in the N times.
3. The method of claim 1 for preventing a Dflash initialization failure of a meter, comprising: in the N times in the fourth step, N is 3.
4. The method of claim 1 for preventing a Dflash initialization failure of a meter, comprising: and judging whether the Dflash initialization frequency reaches 3 times, if not, performing the Dflash initialization again until the Dflash initialization succeeds, wherein the Dflash initialization has low failure probability, and if the 3 Dflash initialization fails, the internal block area of the instrument is damaged or the hardware has quality problems.
CN202010215616.6A 2020-03-25 2020-03-25 Method for preventing initialization failure of Dflash of instrument Pending CN111444034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010215616.6A CN111444034A (en) 2020-03-25 2020-03-25 Method for preventing initialization failure of Dflash of instrument

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010215616.6A CN111444034A (en) 2020-03-25 2020-03-25 Method for preventing initialization failure of Dflash of instrument

Publications (1)

Publication Number Publication Date
CN111444034A true CN111444034A (en) 2020-07-24

Family

ID=71629654

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010215616.6A Pending CN111444034A (en) 2020-03-25 2020-03-25 Method for preventing initialization failure of Dflash of instrument

Country Status (1)

Country Link
CN (1) CN111444034A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008309069A (en) * 2007-06-14 2008-12-25 Fujitsu Ten Ltd Electronic control device for vehicle, electronic control system for vehicle and starting method of electronic control device for vehicle
US20090112941A1 (en) * 2007-10-31 2009-04-30 Asustek Computer Inc. Computer system and firmware recovery method for computer system
US20100242570A1 (en) * 2009-03-25 2010-09-30 Denso Corporation Method for initializing indicating instrument for vehicle
CN108073474A (en) * 2016-11-18 2018-05-25 大陆汽车电子(芜湖)有限公司 Suitable for the data processing method of automobile instrument
US20180293121A1 (en) * 2016-06-14 2018-10-11 Hangzhou Hikvision Digital Technology Co., Ltd. Method, apparatus and system for processing data
CN109241800A (en) * 2018-09-17 2019-01-18 苏州浪潮智能软件有限公司 A kind of self-aided terminal and its operation method
US20190188084A1 (en) * 2016-09-13 2019-06-20 Psa Automobiles Sa Device for controlling the reinitialization of a computer on board an automobile

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008309069A (en) * 2007-06-14 2008-12-25 Fujitsu Ten Ltd Electronic control device for vehicle, electronic control system for vehicle and starting method of electronic control device for vehicle
US20090112941A1 (en) * 2007-10-31 2009-04-30 Asustek Computer Inc. Computer system and firmware recovery method for computer system
US20100242570A1 (en) * 2009-03-25 2010-09-30 Denso Corporation Method for initializing indicating instrument for vehicle
US20180293121A1 (en) * 2016-06-14 2018-10-11 Hangzhou Hikvision Digital Technology Co., Ltd. Method, apparatus and system for processing data
US20190188084A1 (en) * 2016-09-13 2019-06-20 Psa Automobiles Sa Device for controlling the reinitialization of a computer on board an automobile
CN108073474A (en) * 2016-11-18 2018-05-25 大陆汽车电子(芜湖)有限公司 Suitable for the data processing method of automobile instrument
CN109241800A (en) * 2018-09-17 2019-01-18 苏州浪潮智能软件有限公司 A kind of self-aided terminal and its operation method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
丁爱峰等: "某车型仪表Dflash数据篡改故障分析" *

Similar Documents

Publication Publication Date Title
US7639537B2 (en) Method for writing data in a non volatile memory unit
CN101558452B (en) Method and device for reconfiguration of reliability data in flash eeprom storage pages
JPH09330273A (en) Memory card, and error correcting method therefor
US8122303B2 (en) Data structure for flash memory and data reading/writing method thereof
EP0806726A1 (en) On-line memory monitoring system and methods
US7450436B2 (en) Device recoverable purge for flash storage device
TWI512742B (en) Non-volatile memory flash memory erase-abnormal block repair method and device applying the same
TW202001881A (en) Variable resistance random-access memory
JPH02278449A (en) Fault tolerant memory system
CN102117662A (en) Error correction mechanisms for 8-bit memory devices
JP3184738B2 (en) Error-correctable memory device
US20100318874A1 (en) Electronic memory device and method for error correcting thereof
CN111785315B (en) Method, system, storage medium and terminal for reducing erasing interference and erasing time
JPH10240873A (en) Ic card
CN111444034A (en) Method for preventing initialization failure of Dflash of instrument
CN112802534A (en) Automatic error correction data storage method for electronic detonator chip
CN111124739A (en) Anti-tearing protection system for non-volatile memory
CN113342571A (en) Method for preventing EEPROM data from losing in case of power failure applied to embedded system
CN110659150B (en) Method for detecting micro-control unit memory and related device
US20200159613A1 (en) Device and method for generating error correction information
JP4950214B2 (en) Method for detecting a power outage in a data storage device and method for restoring a data storage device
CN105868120A (en) A data storage method based on substitution of FLASH in a chip for EEPROM
CN116954985A (en) ECC (error correction code) check management method and device of vehicle-mounted chip and storage medium
JPH02278355A (en) Fault tolerant memory system
CN109271275A (en) Bad block marking method, device, equipment and medium in solid state disk

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
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200724

WD01 Invention patent application deemed withdrawn after publication