CN105302482A - Parameter storage method and apparatus as well as automobile controller - Google Patents

Parameter storage method and apparatus as well as automobile controller Download PDF

Info

Publication number
CN105302482A
CN105302482A CN 201510664959 CN201510664959A CN105302482A CN 105302482 A CN105302482 A CN 105302482A CN 201510664959 CN201510664959 CN 201510664959 CN 201510664959 A CN201510664959 A CN 201510664959A CN 105302482 A CN105302482 A CN 105302482A
Authority
CN
Grant status
Application
Patent type
Prior art keywords
same
parameters
memory
parameter
packet
Prior art date
Application number
CN 201510664959
Other languages
Chinese (zh)
Inventor
李萌
曾庆臣
Original Assignee
北京友信宏科电子科技有限公司
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

Links

Abstract

The invention provides a parameter storage method and apparatus as well as an automobile controller. The method comprises: dividing a system memory into a plurality of N-byte storage pages, and grouping the storage pages, wherein every three storage pages are in a group; and storing the same parameters in the same addresses of three different storage pages in the same group respectively, reading all storage pages of the group, in which the parameters are located, into a main control chip from the system memory when high-voltage frequent switching and high current do not exist between the system memory and the main control chip, and performing arbitrative comparison on the parameters of different storage pages with the same addresses in the same group. According to the parameter storage method and apparatus, the error rate of parameter storage is reduced in a single-datum multi-address storage mode through storage by staggering working time; the paging storage eliminates a blind area of power-failure data loss caused by power failure of a controller during data storage; and the data are arbitrated by adopting principles of the obedience of minority to majority and address priority, so that the data correction capability is improved.

Description

一种参数存储方法、装置及汽车控制器 A parametric method of storage, and a vehicle control apparatus

技术领域 FIELD

[0001] 本发明属于汽车控制技术领域,尤其涉及一种参数存储方法、装置及汽车控制器。 [0001] The present invention belongs to the technical field of automotive control, particularly to a method for parameter storage, and a vehicle control means.

背景技术 Background technique

[0002] 随着新能源的发展,新能源汽车在近两年也得到了快速的发展,在新能源汽车领域,纯电动汽车占据了主导地位,它完全依靠电力作为车的驱动能源。 [0002] With the development of new energy, new energy vehicles in the past two years has also been a rapid development in the field of new energy vehicles, pure electric vehicles occupy a dominant position, it is totally dependent on electricity as the driving energy vehicles. 纯电动车控制器工作环境为高压或者大电流,或者两者都存在,工作环境比较恶劣,同时控制器里面存储了很多系统的标定参数。 Pure electric vehicle controller or the high-pressure working environment for a large current, or both are present, the working environment is poor, while the controller which stores the calibration parameters in many systems.

[0003]目前,纯电动车控制器刚上电时,将标定参数从系统存储器中读取到主控芯片中,然后按照主控芯片中的数据进行运行;如果在运行的过程中主控芯片中数据有修改,则将修改内容存储到系统存储器中,其操作过程参见图1,具体的,系统存储器的存储空间是按照每16个字节一页,每次要修改标定参数的时候,是分成三步进行的:第一步,将要修改的标定参数所在页的16个字节全部擦除;第二步,将要保存的数据通过总线传输到系统存储器内;第三步,开始将数据写入。 [0003] Currently, just pure electric vehicle controller on the power, the calibration parameters read from the system memory to the master chip, and then running the master chip according to the data; if the process running in the master chip edit data, the content will be stored in the system memory, the process operation Referring to Figure 1, specifically, the memory space according to each of the system memory is a 16-byte, each time to modify the calibration parameters are It is divided into three steps: the first step, where the calibration parameters to modify the page 16 bytes eral; a second step, to be saved to the data bus by the memory system; a third step, writing data starts into. 由于主控芯片是RAM类型,掉电之后,数据会丢失;而系统存储器为FLASH或者EEPR0M,掉电之后,数据不会丢失。 Since the master chip a RAM type, after the power failure, data will be lost; the system memory is a FLASH or after EEPR0M, power-down, data is not lost. 如果存储数据的时候,按照以上步骤存储,在操作的过程中,如果系统掉电,那么数据被擦除,则对应系统存储器的数据既不是以前的数据,也不是新的数据,导致参数和实际需求偏差会很大,造成系统运行故障,同时,从系统存储器中向主控芯片读取标定参数时,只是做简单的数据处理和判断,没有纠错功能,上述几点都有可能导致纯电动车控制器使用过程中的潜在风险加大,一旦发生,就会导致机毁人亡。 If the stored data when stored according to the above steps, during operation, if the system is powered down, then the data is erased, data corresponding to the system memory before the data is neither nor new data, parameters, and the actual cause will demand large deviation, causing system operational failure, at the same time, the calibration parameters from the system memory to the master chip reader, but do simple data processing and determination, without error correction, these points may lead to electric potential risks controller used in the process to increase the event, will lead plane crash.

发明内容 SUMMARY

[0004] 本发明实施例提供了一种参数存储方法、装置及汽车控制器,旨在解决现有技术在标定参数向系统存储器保存过程中和从系统存储器向外读取的过程中会存在数据错误风险的问题。 [0004] Example embodiments provide a method for parameter storage, and a vehicle control apparatus of the present invention, to solve the prior art in the system memory for storing calibration parameters during the process and there will be from the system memory to read out the data the risk of error problem.

[0005] —方面,提供一种参数存储方法,所述参数保存于系统存储器中,主控芯片从系统存储器中读写所述参数,所述方法包括: [0005] - aspect, there is provided a method of storing parameters, the parameters stored in the system memory, the master chip from the system memory read and write the parameter, the method comprising:

[0006] 将系统存储器划分为若干个N个字节的存储页,对存储页进行编组,每三存储页为一分组,所述N为大于等于16的正整数; [0006] The system memory is divided into a plurality of N-byte memory page, the page memory grouping, each of three memory pages as a packet, wherein N is a positive integer greater than or equal to 16;

[0007] 同一个参数分别存储在同一分组的三个不同存储页的相同地址。 [0007] The same parameters are stored in the same memory address three different pages of the same packet.

[0008] 进一步地,所述方法还包括: [0008] Preferably, the method further comprising:

[0009] 当系统存储器和主控芯片之间不存在高压频繁切换和大电流时,从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较。 [0009] When the high voltage and large current are not frequently switched between system memory and controller chips, read from all the memory pages in the system memory where the packet parameters to the master chip, the same packet will be different from the same address the parameter memory pages arbitration comparison.

[0010] 进一步地,所述从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较具体: [0010] Further, the page read from all the memory in the system memory where the packet parameters to the master chip, the same packet to the same address of the memory pages of different parameters arbitrating more specific:

[0011] 如果同一分组同一地址不同存储页的所述参数都一致,则所述参数直接采用; [0011] If the same packet to the same address of the memory pages of different parameters are consistent with the direct use of the parameter;

[0012] 如果同一分组同一地址不同存储页的所述参数只有两个一致,将两个一致的所述参数作为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数; [0012] If only two parameters of the same same same packet address different memory pages, the two parameters of the same value as the correct use, and to correct the correction value stored in the same page in the other packet parameters;

[0013] 如果同一分组同一地址不同存储页的所述参数都不一致,以地址优先原则,将同一分组各个存储页中地址小的所述参数为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数。 [0013] If the different parameters of the same packet to the same address of the memory pages does not match, the address priority principle, the parameters of the same packet in the respective smaller memory page address correct values ​​employed, and to correct the correction value in the same group the other parameters stored in the page.

[0014] 进一步地,所述方法还包括: [0014] Preferably, the method further comprising:

[0015] 接收主控芯片中被修改或修正后的所述参数作为写入数据依次更新于对应同一分组同一地址不同存储页中。 [0015] The control chip received in the parameters to be modified or corrected as write data corresponding to the same packet are sequentially updated on the same address different memory pages.

[0016] 进一步地,所述接收主控芯片中被修改或修正后的所述参数作为写入数据依次更新于对应同一分组同一地址不同存储页中之后还包括: After [0016] Further, the master chip of the received parameters to be modified or corrected as write data corresponding to the same packet are sequentially updated on the same page address different memory further comprises:

[0017] 从系统存储器中回读同一分组同一地址不同存储页中更新完成所述参数,并与所述写入数据进行校验,如果两者不符,进行二次所述写入数据的存储。 [0017] The system memory read back from the same group of the parameter update is completed the same address stored in different pages, and verified with the write data, if the two do not match, the write data is stored in the secondary.

[0018] 另一方面,提供一种参数存储装置,所述参数保存于系统存储器中,主控芯片从系统存储器中读写所述参数,所述装置包括: [0018] On the other hand, there is provided a parameter storage device, the parameters stored in the system memory, the read parameter from the master chip memory system, said apparatus comprising:

[0019] 存储分组单元,用于将系统存储器划分为若干个N个字节的存储页,对存储页进行编组,每三存储页为一分组,所述N为大于等于16的正整数; [0019] The packet storage unit for the system memory is divided into a plurality of N-byte memory page, the page memory grouping, each of three memory pages as a packet, wherein N is a positive integer greater than of equal to 16;

[0020] 参数存储单元,用于同一个参数分别存储在同一分组的三个不同存储页的相同地址。 [0020] The parameter storage unit for the same parameter stored in the same address of the same memory page three different packets, respectively.

[0021] 进一步地,所述装置还包括: [0021] Preferably, said apparatus further comprising:

[0022] 参数仲裁单元,用于当系统存储器和主控芯片之间不存在高压频繁切换和大电流时,从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较。 [0022] Parameters arbitration means for when the high frequency switch and a large current does not exist between the system memory and the master chip, all memory pages from the system memory where the packet parameters read to the master chip, the same packet to the same address of the memory pages of different parameters arbitration comparison.

[0023] 进一步地,所述参数仲裁单元具体用于如果同一分组同一地址不同存储页的所述参数都一致,则所述参数直接采用; [0023] Further, the specific parameters for arbitration unit of the same packet if the same address of the memory pages of different parameters are consistent with the direct use of the parameter;

[0024] 如果同一分组同一地址不同存储页的所述参数只有两个一致,将两个一致的所述参数作为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数; [0024] If only two parameters of the same same same packet address different memory pages, the two parameters of the same value as the correct use, and to correct the correction value stored in the same page in the other packet parameters;

[0025] 如果同一分组同一地址不同存储页的所述参数都不一致,以地址优先原则,将同一分组各个存储页中地址小的所述参数为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数。 [0025] If the different parameters of the same packet to the same address of the memory pages does not match, the address priority principle, the parameters of the same packet in the respective smaller memory page address correct values ​​employed, and to correct the correction value in the same group the other parameters stored in the page.

[0026] 进一步地,所述装置还包括: [0026] Preferably, said apparatus further comprising:

[0027] 参数更新单元,用于接收主控芯片中被修改或修正后的所述参数作为写入数据对应同一分组同一地址不同存储页中。 [0027] The parameter updating unit, for receiving said chip main parameters to be modified or corrected as write data corresponding to the same packet to the same address different memory pages.

[0028] 进一步地,所述装置还包括: [0028] Preferably, said apparatus further comprising:

[0029] 参数校验单元,用于从系统存储器中回读同一分组同一地址不同存储页中更新完成所述参数,并与所述写入数据进行校验,如果两者不符,进行二次所述写入数据的存储。 [0029] The parameter checking unit, for reading the same back from the system memory to complete the update parameters of the same packet address different memory pages, and the write data and verify, if the two do not match, the secondary storing said write data.

[0030] 再一方面,提供一种汽车控制器,由系统存储器和主控芯片组成,所述系统存储器包括上述参数存储装置。 [0030] In another aspect, there is provided a vehicle control, and the main system memory chips, the memory system comprises said parameter storage means.

[0031] 在本发明实施例,将系统存储器划分为若干个N个字节的存储页,对存储页进行编组,每三存储页为一分组;同一个参数分别存储在同一分组的三个不同存储页的相同地址,当系统存储器和主控芯片之间不存在高压频繁切换和大电流时,从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较。 [0031] In the present invention, the system memory is divided into a number of N-byte memory page, the memory page grouping, every three packets is stored into a page; the same parameters are stored in three different groups of the same when the same address of the memory pages, system memory, and when the master chip between the high pressure and high frequent switching current is present, from the system memory where the packet parameters read all the memory pages to the master chip, the same packet the parameters stored in the same address different pages arbitration compared. 本发明,通过存储动作错开工作时间,采用单个数据多地址存储的方式,降低了参数存储的出错率,分页存储消除了保存数据时控制器掉电带来的掉电数据丢失的盲区,采用少数服从多数、地址优先原则仲裁数据,增强了数据纠错能力,以及通过纠错后的数据回写,消除了数据错误的累积效应。 The present invention, by storing the operation time shifted work, using a single multi-address data stored in a manner to reduce the error rate parameter storage, paging storage is eliminated saving data down to bring down the controller data loss blind, using a small number of the majority, the principle of giving priority arbitration address data to enhance the error correction capability data, and write the data back after the error correction eliminates data errors cumulative effect.

附图说明 BRIEF DESCRIPTION

[0032]图1是本发明背景技术提供的现有参数存储流程图; [0032] FIG. 1 is a flowchart of a parameter storage prior art the present invention provides the background;

[0033]图2是本发明实施例一提供的参数存储方法的实现流程图; [0033] FIG. 2 is a flow chart for implementing the method according to the parameters stored to a first embodiment of the present invention;

[0034]图3是本发明实施例一提供的参数存储结构示意框图; [0034] FIG. 3 is a schematic block diagram showing a configuration example of a parameter memory of the embodiment of the present invention is provided;

[0035]图4是本发明实施例二提供的参数存储装置的具体结构框图。 [0035] FIG 4 is a detailed block diagram showing the parameter storage device according to a second embodiment of the present invention.

具体实施方式 detailed description

[0036] 为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。 [0036] To make the objectives, technical solutions and advantages of the present invention will become more apparent hereinafter in conjunction with the accompanying drawings and embodiments of the present invention will be further described in detail. 应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。 It should be understood that the specific embodiments described herein are only intended to illustrate the present invention and are not intended to limit the present invention.

[0037] 在本发明实施例中,将系统存储器划分为若干个N个字节的存储页,对存储页进行编组,每三存储页为一分组,所述N为大于等于16的正整数;同一个参数分别存储在同一分组的三个不同存储页的相同地址。 [0037] In an embodiment of the present invention, the system memory is divided into a plurality of N-byte memory page, the page memory grouping, each of three memory pages as a packet, wherein N is a positive integer greater than or equal to 16; the same parameters are stored in the same memory address three different pages of the same packet.

[0038] 以下结合具体实施例对本发明的实现进行详细描述: [0038] The following embodiments in conjunction with specific embodiments of the present invention is implemented will be described in detail:

[0039] 实施例一 [0039] Example a

[0040]图2示出了本发明实施例一提供的参数存储方法的实现流程,所述参数保存于系统存储器中,在汽车控制器中具体为标定参数,主控芯片从系统存储器中读写所述参数,详述如下: [0040] FIG 2 illustrates a process of the present invention is to realize a method according to the parameters stored in the provided embodiment, the parameters stored in the memory system, particularly for the calibration parameters, the master chip read from the system memory controller in the car the parameters detailed below:

[0041] 在步骤S201中,将系统存储器划分为若干个N个字节的存储页,对存储页进行编组,每三存储页为一分组,所述N为大于等于16的正整数。 [0041] In step S201, the system memory is divided into a plurality of N-byte memory page, the page memory grouping, each of three memory pages as a packet, wherein N is a positive integer greater than or equal to 16.

[0042] 在本实施例中,将系统存储器划分为若干个16个字节的存储页,对存储页进行编组,每三存储页为一分组,每个存储页大小相同,同一地址存储相同的参数。 [0042] In the present embodiment, the system memory is divided into a number of 16-byte memory page, the memory page grouping, every three packets is stored into a page, the same page size of each memory, the same address stored in the same parameter.

[0043] 在步骤S202中,同一个参数分别存储在同一分组的三个不同存储页的相同地址。 [0043] In step S202, the same parameters are stored in the same memory address three different pages of the same packet.

[0044] 在本实施例中,同一个参数分别存在三个不同存储页的相同地址里面,相当于每一个参数都有一个正式数据,两个影子数据,如图3所示,对于数据a〜h来讲,它们是一组数据,但是分别存储在三个不同的页码的相同地址中,比如数据a分别存储在页码1〜3的地址0中,正常情况下这三个数据是一样的,如果对其进行修改,只能一个一个的修改,即使有一个数据出现问题,也会有另外两个合理的数据推算出来数据的合理值,由于主控芯片在向系统存储器中存储数据的时候约定要求以单存储页为单位进行操作,不会发生三个页同时擦除的情况,那么至少有两个存储页的数据是合理的。 [0044] In the present embodiment, the presence of the same parameters were the same three different memory address of the page which corresponds to each parameter has a formal data, two data of the shadow, as shown, the data shown in FIG. 3 a~ h is concerned, which is a set of data, the same address but are stored in three different page numbers, such data are stored in a page address 0 ~ 3, the three data normally are the same, If you modify it only changes one by one, even if there is a data problem, there will be two other reasonable data extrapolated reasonable value of the data, because the master chip agreed at the time to the data stored in the system memory required to store a single page unit operation, three pages are simultaneously erased situation does not occur, then at least two memory pages of data is reasonable.

[0045] 作为一个优选方案,当系统存储器和主控芯片之间不存在高压频繁切换和大电流时,从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较。 When [0045] As a preferred embodiment, when the master chip and the system memory between the high pressure and high frequent switching current does not exist, all the stored packets from the page where the parameters read into the system memory in the master chip, the the same group parameters the same address different memory pages arbitration comparison.

[0046] 在本实施例中,在汽车控制系统刚上电时,处于初始化阶段,汽车控制器对外输出为零时,或者行驶停止,汽车控制器对外输出为零时,这两种情况下,主控芯片和系统内存工作环境不存在高压频繁切换和大电流,从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较,其中,仲裁比较有三种情况: [0046] In the present embodiment, when the vehicle control system has just powered on, in the initialization phase, the external controller when the vehicle output is zero, or stops running, the external controller when the vehicle output is zero, in both cases, master chip and system memory environment frequent switching high voltage and high current is present, where the packet parameters from the system memory to the master page read all the memory chips, the different memory pages of the same packet to the same address parameters arbitration comparison, which compares arbitration in three ways:

[0047] 第一种情况是,如果同一分组同一地址不同存储页的所述参数都一致,则所述参数直接采用; [0047] The first case is that, if the same parameter of the same packet address different memory pages are the same, then the direct use of the parameter;

[0048] 第二种情况是,如果同一分组同一地址不同存储页的所述参数只有两个一致,将两个一致的所述参数作为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数; [0048] The second case is that only the same two parameters of the same packet if the same addresses in different memory pages, the two parameters of the same value as the correct use, and to correct the correction value stored in the other packets of the same the page parameter;

[0049] 第三种情况是,如果同一分组同一地址不同存储页的所述参数都不一致,以地址优先原则,将同一分组各个存储页中地址小的所述参数为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数。 [0049] The third case is, if the same address of the same packet parameters of different memory pages does not match, the address priority principle, the parameters of the same packet in the respective smaller memory page address correct values ​​employed, and to the correct value correcting said same packet in the other memory page parameters.

[0050] 作为另一个优选实施例中,接收主控芯片中被修改或修正后的所述参数作为写入数据依次更新于对应同一分组同一地址不同存储页中。 [0050] As another preferred embodiment, the master chip of the received parameters to be modified or corrected as write data corresponding to the same packet are sequentially updated on the same address different memory pages.

[0051] 在本实施例中,在汽车正常行驶过程中,可能会遇到一些系统参量通过运行自学习更新,也有可能是人为调整,但无论那种改变,都只是在主控芯片内存中,此时不允许直接修改到系统存储器中,等到这停止,控制器对外输出为零的时候,控制器会自动检索是否有修改内容,如果有,将主控芯片中被修改或修正后的所述参数作为写入数据依次更新于对应同一分组同一地址不同存储页中。 [0051] In this embodiment, in the normal process of moving car, you may encounter some system parameters by running the self-study update, there may be artificially adjusted, but regardless of the kind of changes are just the main chip memory, At this time, the changes to the system do not allow direct memory until it is stopped, the output is zero when the external controller, the controller will automatically retrieves whether there is the content, if any, is to be modified or corrected in the master chip parameters sequentially updated as write data corresponding to the same packet to the same address on different memory pages.

[0052] 作为了另一个优选方案,为了消除数据错误的累积效应,从系统存储器中回读同一分组同一地址不同存储页中更新完成所述参数,并与所述写入数据进行校验,如果两者相符,则校验通过,如果两者不符,进行二次所述写入数据的存储,除非发现系统存储器故障,然后转到系统存储器故障处理,并报警。 [0052] As another preferred embodiment, in order to eliminate the cumulative effect of data errors, the system memory is read back from the same group of the parameter update is completed the same address stored in different pages, and verified with the write data, if both match, the verification passes, if the two do not match, the write data is stored in the second, unless the system memory fault detection, fault handling and go to the system memory, and an alarm.

[0053] 本实施例,通过存储动作错开工作时间,采用单个数据多地址存储的方式,降低了参数存储的出错率,分页存储消除了保存数据时控制器掉电带来的掉电数据丢失的盲区,采用少数服从多数、地址优先原则仲裁数据,增强了数据纠错能力,以及通过纠错后的数据回写,消除了数据错误的累积效应。 [0053] The embodiment of the present embodiment, by storing the operation time shifted operation, by way of a single multi-address data stored in the parameter storage reduced error rate, eliminating the power-down paging store data saving data loss caused by power down controller blind, of majority, addresses the principle of arbitration priority data to enhance the error correction capability data, and write the data back after the error correction eliminates data errors cumulative effect.

[0054] 实施例二 [0054] Second Embodiment

[0055]图4示出了本发明实施例二提供的参数存储装置的具体结构框图,为了便于说明,仅示出了与本发明实施例相关的部分。 [0055] FIG. 4 shows a block diagram of a specific structure of the present invention, the parameter storage device according to a second embodiment, for convenience of description, only the parts related to the embodiment of the present invention. 在本实施例中,该参数存储装置包括:存储分组单元41、参数存储单元42、参数仲裁单元43、参数更新单元44和参数校验单元45。 In the present embodiment, the parameter storage means comprises: a packet storage unit 41, a parameter storage unit 42, the parameter arbitration unit 43, the parameter update unit 44 and the parameter checking unit 45.

[0056] 其中,存储分组单元41,用于将系统存储器划分为若干个N个字节的存储页,对存储页进行编组,每三存储页为一分组,所述N为大于等于16的正整数; [0056] wherein the packet storage unit 41, a system memory divided into a number of N-byte memory page, the page memory grouping, each of three memory pages as a packet, wherein N is greater than or equal to positive 16 integer;

[0057] 参数存储单元42,用于同一个参数分别存储在同一分组的三个不同存储页的相同地址。 [0057] The parameter storage unit 42, for the same parameters are stored in the same memory address three different pages of the same packet.

[0058] 其中,所述参数保存于系统存储器中,在汽车控制器中具体为标定参数,标定主控芯片从系统存储器中读写所述参数。 [0058] wherein the parameters stored in the system memory, particularly in the car controller as calibration parameters, calibration parameters from said master chip reader system memory.

[0059] 进一步地,所述装置还包括: [0059] Preferably, said apparatus further comprising:

[0060] 参数仲裁单元43,用于当系统存储器和主控芯片之间不存在高压频繁切换和大电流时,从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较。 [0060] Parameters arbitration unit 43 for switching when the high frequency and large current does not exist between the system memory and controller chips, read from all the memory pages in the system memory where the packet parameters to the master chip , the same packet to the same address of the memory pages of different parameters arbitration comparison.

[0061] 进一步地,所述参数仲裁单元43具体用于如果同一分组同一地址不同存储页的所述参数都一致,则所述参数直接采用; [0061] Further, the arbitration unit 43 specifically for the parameter, if the same address of the same packet parameters are consistent with the different memory pages, the direct use of the parameter;

[0062] 如果同一分组同一地址不同存储页的所述参数只有两个一致,将两个一致的所述参数作为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数; [0062] If only two parameters of the same same same packet address different memory pages, the two parameters of the same value as the correct use, and to correct the correction value stored in the same page in the other packet parameters;

[0063] 如果同一分组同一地址不同存储页的所述参数都不一致,以地址优先原则,将同一分组各个存储页中地址小的所述参数为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数。 [0063] If the different parameters of the same packet to the same address of the memory pages does not match, the address priority principle, the parameters of the same packet in the respective smaller memory page address correct values ​​employed, and to correct the correction value in the same group the other parameters stored in the page.

[0064] 进一步地,所述装置还包括: [0064] Preferably, said apparatus further comprising:

[0065] 参数更新单元44,用于接收主控芯片中被修改或修正后的所述参数作为写入数据对应同一分组同一地址不同存储页中。 [0065] The parameter update unit 44, for receiving the parameters in the master chip is modified or corrected as write data corresponding to the same packet to the same address different memory pages.

[0066] 进一步地,所述装置还包括: [0066] Preferably, said apparatus further comprising:

[0067] 参数校验单元45,用于从系统存储器中回读同一分组同一地址不同存储页中更新完成所述参数,并与所述写入数据进行校验,如果两者不符,进行二次所述写入数据的存储。 [0067] The parameter checking unit 45 for reading the same back from the system memory to complete the update parameters of the same packet address different memory pages, and the write data and verify, if the two do not match, secondary storing the write data.

[0068] 本实施例,通过存储动作错开工作时间,采用单个数据多地址存储的方式,降低了参数存储的出错率,分页存储消除了保存数据时控制器掉电带来的掉电数据丢失的盲区,采用少数服从多数、地址优先原则仲裁数据,增强了数据纠错能力,以及通过纠错后的数据回写,消除了数据错误的累积效应。 [0068] Examples of the present embodiment, by storing the operation time shifted operation, by way of a single multi-address data stored in the parameter storage reduced error rate, eliminating the power-down paging store data saving data loss caused by power down controller blind, of majority, addresses the principle of arbitration priority data to enhance the error correction capability data, and write the data back after the error correction eliminates data errors cumulative effect.

[0069] 本发明实施例提供的参数存储装置可以应用在前述对应的方法实施例一中,详情参见上述实施例一的描述,在此不再赘述。 [0069] The parameter storage device according to an embodiment of the present invention can be applied in a corresponding method in the aforementioned embodiment, see the details of a description of the embodiment above are not repeated here.

[0070] 值得注意的是,上述系统实施例中,所包括的各个单元只是按照功能逻辑进行划分的,但并不局限于上述的划分,只要能够实现相应的功能即可;另外,各功能单元的具体名称也只是为了便于相互区分,并不用于限制本发明的保护范围。 [0070] Notably, the above-described system embodiments, the included units divided only in accordance with the logic function, but are not limited to the division, as long as the corresponding functions can be achieved; Further, each of the functional units specific names for convenience only distinguished from each other, are not intended to limit the scope of the present invention.

[0071] 另外,本领域普通技术人员可以理解实现上述各实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,相应的程序可以存储于一计算机可读取存储介质中,所述的存储介质,如R0M/RAM、磁盘或光盘等。 [0071] Further, those of ordinary skill in the art may understand that the above embodiments all or part of the method steps may be relevant hardware instructed by a program, the corresponding program may be stored in a computer readable storage medium. the storage medium, such as a R0M / RAM, magnetic disk, or optical disk.

[0072] 以上所述仅为本发明的较佳实施例而已,并不用以限制本发明,凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明的保护范围之内。 [0072] The foregoing is only preferred embodiments of the present invention but are not intended to limit the present invention, any modifications within the spirit and principle of the present invention, equivalent substitutions and improvements should be included in the present within the scope of the invention.

Claims (11)

  1. 1.一种参数存储方法,所述参数保存于系统存储器中,主控芯片从系统存储器中读写所述参数,其特征在于,所述方法包括: 将系统存储器划分为若干个N个字节的存储页,对存储页进行编组,每三存储页为一分组,所述N为大于等于16的正整数; 同一个参数分别存储在同一分组的三个不同存储页的相同地址。 1. A method of storing parameters, the parameters stored in the system memory, the master chip read the parameter from the system memory, wherein, said method comprising: a system memory divided into a plurality of N bytes the memory pages, the page memory grouping, each of the three pages of a memory packet, wherein N is a positive integer greater than or equal to 16; the same parameters are stored in the same memory address three different pages of the same packet.
  2. 2.根据权利要求1所述的参数存储方法,其特征在于,所述方法还包括: 当系统存储器和主控芯片之间不存在高压频繁切换和大电流时,从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较。 The parameter storing method according to claim 1, wherein said method further comprises: when the high frequency switch and a large current does not exist between the system memory and controller chips, the memory in the system parameters from All memory page where the packet read into the master chip, the same packet to the same address of the memory pages of different parameters arbitration comparison.
  3. 3.根据权利要求2所述的参数存储方法,其特征在于,所述从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较具体: 如果同一分组同一地址不同存储页的所述参数都一致,则所述参数直接采用; 如果同一分组同一地址不同存储页的所述参数只有两个一致,将两个一致的所述参数作为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数; 如果同一分组同一地址不同存储页的所述参数都不一致,以地址优先原则,将同一分组各个存储页中地址小的所述参数为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数。 The parameter storing method according to claim 2, wherein, where the packet parameters from the system memory to the master page read all the memory chips, the same packet to the same address stored in different pages comparing said parameter arbitrating specifically: If the same parameter of the same packet address different memory pages are the same, then the direct use of the parameter; the only two parameters consistent with the same group if the same address is stored in different pages, two the same parameter value as the correct use, and to correct the correction value stored in the same page in the other packet parameters; If the same parameter of the same packet address different memory pages does not match, the address priority principle, the same packet the parameters of the respective smaller memory page addresses using the correct value, and to correct the correction value stored in the same page in the other packet parameters.
  4. 4.根据权利要求1或2所述的参数存储方法,其特征在于,所述方法还包括: 接收主控芯片中被修改或修正后的所述参数作为写入数据依次更新于对应同一分组同一地址不同存储页中。 The parameter storage method according to claim 1, wherein said method further comprises: receiving a master chip of the parameters is modified or corrected as write data corresponding to the same packet are sequentially updated on the same address different memory pages.
  5. 5.根据权利要求4所述的参数存储方法,其特征在于,所述接收主控芯片中被修改或修正后的所述参数作为写入数据依次更新于对应同一分组同一地址不同存储页中之后还包括: 从系统存储器中回读同一分组同一地址不同存储页中更新完成所述参数,并与所述写入数据进行校验,如果两者不符,进行二次所述写入数据的存储。 The parameter storage method according to claim 4, wherein the receiving the parameter to be modified or corrected as the master chip sequentially updated on the write data corresponding to the same packet to the same address stored in different pages after further comprising: reading the same back from the system memory pages stored in packets of different parameters in the same address of the update is completed, and verified with the write data, if the two do not match, the write data is stored in the secondary.
  6. 6.一种参数存储装置,所述参数保存于系统存储器中,主控芯片从系统存储器中读写所述参数,其特征在于,所述装置包括: 存储分组单元,用于将系统存储器划分为若干个N个字节的存储页,对存储页进行编组,每三存储页为一分组,所述N为大于等于16的正整数; 参数存储单元,用于同一个参数分别存储在同一分组的三个不同存储页的相同地址。 A parameter storage device, the parameters stored in the system memory, the master chip read the parameter from the system memory, wherein, said means comprising: a packet storage unit for the system memory is divided into a plurality of N-byte memory page, the page memory grouping, each of the three pages of a memory packet, wherein N is a positive integer greater than or equal to 16; parameter storage unit, for the same parameters are stored in the same packet the same address three different memory pages.
  7. 7.根据权利要求6所述的参数存储装置,其特征在于,所述装置还包括: 参数仲裁单元,用于当系统存储器和主控芯片之间不存在高压频繁切换和大电流时,从系统存储器中将所述参数所在分组的所有存储页读取到主控芯片中,将同一分组同一地址不同存储页的所述参数进行仲裁比较。 7. The parameter memory device according to claim 6, characterized in that said apparatus further comprises: parameter arbitration unit for, when the high pressure does not exist between the system memory and controller chips frequent switching and large current from the system All the parameters stored in the page memory where the packet will be read into the master chip, the same packet to the same address of the memory pages of different parameters arbitration comparison.
  8. 8.根据权利要求7所述的参数存储装置,其特征在于,所述参数仲裁单元具体用于如果同一分组同一地址不同存储页的所述参数都一致,则所述参数直接采用; 如果同一分组同一地址不同存储页的所述参数只有两个一致,将两个一致的所述参数作为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数; 如果同一分组同一地址不同存储页的所述参数都不一致,以地址优先原则,将同一分组各个存储页中地址小的所述参数为正确值采用,并以所述正确值修正同一分组其它存储页中所述参数。 8. The parameter storage device according to claim 7, wherein said arbitration unit is configured to, if the parameter of the same packet to the same address of the memory pages of different parameters are consistent with the direct use of the parameters; if the same packet the same address parameters for different memory pages, only two identical, two identical parameters as the use of the correct value, and to correct the correction value stored in the same page in the other packet parameters; if the same address of the same packets of different the parameter memory pages does not match, the address priority principle, the parameters of the same packet in the respective smaller memory page address correct values ​​employed, and to correct the correction value stored in the same page in the other packet parameters.
  9. 9.根据权利要求6或7所述的参数存储装置,其特征在于,所述装置还包括: 参数更新单元,用于接收主控芯片中被修改或修正后的所述参数作为写入数据对应同一分组同一地址不同存储页中。 Parameter storage means according to claim 6 or claim 7, wherein said apparatus further comprises: a parameter update unit, for said parameters is modified or corrected as the master chip receiving write data corresponding to the same group at the same address in different memory pages.
  10. 10.根据权利要求9所述的参数存储装置,其特征在于,所述装置还包括: 参数校验单元,用于从系统存储器中回读同一分组同一地址不同存储页中更新完成所述参数,并与所述写入数据进行校验,如果两者不符,进行二次所述写入数据的存储。 10. The parameter storage device according to claim 9, characterized in that said apparatus further comprises: a parameter checking unit, for reading the same back from the system memory pages stored packets of different parameters in the same address update is completed, and verified with the write data, if the two do not match, the write data is stored in the secondary.
  11. 11.一种汽车控制器,由系统存储器和主控芯片组成,其特征在于,所述系统存储器包括权利要求6至10任一项所述的参数存储装置。 A car controller and the main system memory chips, wherein said system memory includes a parameter storage device according to any one of claims 6-10.
CN 201510664959 2015-10-15 2015-10-15 Parameter storage method and apparatus as well as automobile controller CN105302482A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 201510664959 CN105302482A (en) 2015-10-15 2015-10-15 Parameter storage method and apparatus as well as automobile controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 201510664959 CN105302482A (en) 2015-10-15 2015-10-15 Parameter storage method and apparatus as well as automobile controller

Publications (1)

Publication Number Publication Date
CN105302482A true true CN105302482A (en) 2016-02-03

Family

ID=55199795

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 201510664959 CN105302482A (en) 2015-10-15 2015-10-15 Parameter storage method and apparatus as well as automobile controller

Country Status (1)

Country Link
CN (1) CN105302482A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2319857Y (en) * 1997-03-14 1999-05-19 中国人民解放军第二炮兵第三研究所 Microcomputer software protector
CN103135983A (en) * 2011-11-25 2013-06-05 Ls产电株式会社 Method of managing program for electric vehicle
CN103246280A (en) * 2012-12-04 2013-08-14 奇瑞汽车股份有限公司 Electric automobile diagnostic system
CN101396975B (en) * 2007-09-28 2013-11-06 株式会社日立制作所 Integrated circuit for battery and automotive power supply system using the same
CN102521084B (en) * 2011-12-20 2013-11-20 惠州市亿能电子有限公司 Data storage and reading method
CN103929424A (en) * 2014-04-18 2014-07-16 卡斯柯信号有限公司 Hardware and software combined two-out-three safety data processing and arbitration method and device thereof
CN104182304A (en) * 2014-08-12 2014-12-03 西北工业大学 Universal multi-mode redundant pico/nano satellite on-board computer system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN2319857Y (en) * 1997-03-14 1999-05-19 中国人民解放军第二炮兵第三研究所 Microcomputer software protector
CN101396975B (en) * 2007-09-28 2013-11-06 株式会社日立制作所 Integrated circuit for battery and automotive power supply system using the same
CN103135983A (en) * 2011-11-25 2013-06-05 Ls产电株式会社 Method of managing program for electric vehicle
CN102521084B (en) * 2011-12-20 2013-11-20 惠州市亿能电子有限公司 Data storage and reading method
CN103246280A (en) * 2012-12-04 2013-08-14 奇瑞汽车股份有限公司 Electric automobile diagnostic system
CN103929424A (en) * 2014-04-18 2014-07-16 卡斯柯信号有限公司 Hardware and software combined two-out-three safety data processing and arbitration method and device thereof
CN104182304A (en) * 2014-08-12 2014-12-03 西北工业大学 Universal multi-mode redundant pico/nano satellite on-board computer system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈文赛: "一种高可靠、高安全性系统 三取二计算机系统", 《现代雷达》 *

Similar Documents

Publication Publication Date Title
US20030033573A1 (en) Memory card and memory controller
US20090006745A1 (en) Accessing snapshot data image of a data mirroring volume
US20040168101A1 (en) Redundant memory system and memory controller used therefor
US8683113B2 (en) Concurrently searching multiple devices of a non-volatile semiconductor memory
US20100211834A1 (en) Data integrity in memory controllers and methods
US20120266041A1 (en) Systems and methods for error detection and correction in a memory module which includes a memory buffer
CN1700189A (en) Flash memory system
US20130097362A1 (en) Data writing method, and memory controller and memory storage apparatus using the same
US20080086615A1 (en) Method and Apparatus to Internalize Non-Volatile Data Function for Sector Size Conversion
US7921339B2 (en) Flash storage device with data correction function
US8234539B2 (en) Correction of errors in a memory array
CN102043727A (en) Method and device for recovering solid-state hard disc mapping table
US20110231732A1 (en) Error correcting method, and memory controller and memory storage system using the same
CN101251826A (en) Flash memory, method and apparatus for data management of flash memory
US20130301372A1 (en) Memory device, memory system, and power management method
US20140047300A1 (en) Memory storage device, memory controller thereof, and method for processing data thereof
US8286028B2 (en) Backup method and disk array apparatus
CN102830942A (en) Method for mapping disk array of solid hard disk and solid hard disk
US20130326263A1 (en) Dynamically allocatable memory error mitigation
US20130339823A1 (en) Bad wordline/array detection in memory
US20150127972A1 (en) Method and apparatus for non-volatile ram error re-mapping
US20110317488A1 (en) Data reading method and control circuit and memory controller using the same
US20130139008A1 (en) Methods and apparatus for ecc memory error injection
US20080209150A1 (en) Non-volatile memory device and method of driving the same
US20040133755A1 (en) Minimization of overhead of non-volatile memory operation

Legal Events

Date Code Title Description
C06 Publication
C10 Entry into substantive examination