JP6969103B2 - Electronic control device - Google Patents

Electronic control device Download PDF

Info

Publication number
JP6969103B2
JP6969103B2 JP2017007617A JP2017007617A JP6969103B2 JP 6969103 B2 JP6969103 B2 JP 6969103B2 JP 2017007617 A JP2017007617 A JP 2017007617A JP 2017007617 A JP2017007617 A JP 2017007617A JP 6969103 B2 JP6969103 B2 JP 6969103B2
Authority
JP
Japan
Prior art keywords
value
address
electronic control
control device
candidate
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
JP2017007617A
Other languages
Japanese (ja)
Other versions
JP2018116552A (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.)
Denso Corp
Original Assignee
Denso Corp
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 Denso Corp filed Critical Denso Corp
Priority to JP2017007617A priority Critical patent/JP6969103B2/en
Priority to DE102018200660.1A priority patent/DE102018200660B4/en
Publication of JP2018116552A publication Critical patent/JP2018116552A/en
Application granted granted Critical
Publication of JP6969103B2 publication Critical patent/JP6969103B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B60VEHICLES IN GENERAL
    • B60WCONJOINT CONTROL OF VEHICLE SUB-UNITS OF DIFFERENT TYPE OR DIFFERENT FUNCTION; CONTROL SYSTEMS SPECIALLY ADAPTED FOR HYBRID VEHICLES; ROAD VEHICLE DRIVE CONTROL SYSTEMS FOR PURPOSES NOT RELATED TO THE CONTROL OF A PARTICULAR SUB-UNIT
    • B60W10/00Conjoint control of vehicle sub-units of different type or different function
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7206Reconfiguration of flash memory system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7207Details relating to flash memory management management of metadata or control data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Chemical & Material Sciences (AREA)
  • Combustion & Propulsion (AREA)
  • Transportation (AREA)
  • Mechanical Engineering (AREA)
  • Memory System (AREA)
  • Stored Programmes (AREA)

Description

本開示は、フラッシュメモリ等の不揮発性メモリへのデータの書き込みを行う電子制御装置に関する。 The present disclosure relates to an electronic control device that writes data to a non-volatile memory such as a flash memory.

従来、データの書き換えが可能な不揮発性メモリの一例としてフラッシュメモリが知られている。フラッシュメモリでは、一般的に、数バイト程度の予め定められた記憶領域である単位領域毎にデータの書込や読出が行われる。 Conventionally, a flash memory is known as an example of a non-volatile memory in which data can be rewritten. In a flash memory, data is generally written or read for each unit area, which is a predetermined storage area of about several bytes.

特許文献1には、このようなフラッシュメモリに対してデータを書き込み、書き込んだデータを書き換える技術が提案されている。 Patent Document 1 proposes a technique for writing data to such a flash memory and rewriting the written data.

特開2011−203809号公報Japanese Unexamined Patent Publication No. 2011-203809

フラッシュメモリは、例えば、通信機器やAV機器や車両の制御を行う機器等といった、様々な分野の機器において使用されている。また、近年では、ますますその制御が複雑化し、これら機器の制御において用いられるデータのデータ量も増大している。 Flash memory is used in devices in various fields such as communication devices, AV devices, and devices that control vehicles. Moreover, in recent years, the control has become more complicated, and the amount of data used in the control of these devices has also increased.

特許文献1に記載のようなフラッシュメモリでは、単位領域毎にデータの書込が行われる。このため、前述の機器の制御等に用いられるデータをそのままの形態でフラッシュメモリに書き込もうとすると、書込時間が長くなるという問題が生じうる。 In a flash memory as described in Patent Document 1, data is written for each unit area. Therefore, if it is attempted to write the data used for controlling the above-mentioned device to the flash memory as it is, there may be a problem that the writing time becomes long.

本開示は、データの書込時間を短縮する技術を提供する。 The present disclosure provides a technique for reducing the data writing time.

本開示の電子制御装置(10)は、少なくともデータの書込を行う。電子制御装置は、設定判断部(S10)と、アドレス部(S50)と、書込指示部(S90)と、を備える。 The electronic control device (10) of the present disclosure at least writes data. The electronic control device includes a setting determination unit (S10), an address unit (S50), and a write instruction unit (S90).

設定判断部は、当該電子制御装置に対する設定を表す設定値を設定値に対する複数の候補値のうちの一つである指定値に設定する要求を表す設定要求、が有るか否か判断する。アドレス部は、設定要求が有る場合に、複数の候補値のうち指定値と一致する候補値が記憶されている領域を示すアドレスである一致アドレス、を取得する。書込指示部は、設定値に対して予め割り当てられた記憶領域である設定値用記憶領域に、一致アドレスを表すデータを、予め定められた記憶単位領域毎にデータの書込を行う実行部(15)に書き込ませる。 The setting determination unit determines whether or not there is a setting request indicating a request for setting a setting value indicating a setting for the electronic control device to a specified value which is one of a plurality of candidate values for the set value. When there is a setting request, the address unit acquires a matching address, which is an address indicating an area in which a candidate value matching a specified value is stored among a plurality of candidate values. The write instruction unit is an execution unit that writes data representing a matching address to the set value storage area, which is a storage area pre-allocated to the set value, for each predetermined storage unit area. Have them write in (15).

ここで、データの書込は記憶単位領域毎に行われるため、書き込まれるデータのデータ量が増加するほど、書込時間は増加する。
このような構成によれば、一致アドレスを表すデータを書き込むので、設定値として設定される指定値を表すデータをそのままの形態で書き込むよりも、例えば一致アドレスが指定値よりもデータ量が少ない場合等に、データの書込時間を短縮することができる。
Here, since the data is written for each storage unit area, the writing time increases as the amount of data to be written increases.
According to such a configuration, since the data representing the matching address is written, for example, when the matching address has a smaller amount of data than the specified value, compared to writing the data representing the specified value set as the setting value as it is. For example, the data writing time can be shortened.

なお、この欄及び特許請求の範囲に記載した括弧内の符号は、一つの態様として後述する実施形態に記載の具体的手段との対応関係を示すものであって、本開示の技術的範囲を限定するものではない。 In addition, the reference numerals in parentheses described in this column and the scope of claims indicate the correspondence with the specific means described in the embodiment described later as one embodiment, and the technical scope of the present disclosure is defined. It is not limited.

電子制御装置10の構成を示すブロック図。The block diagram which shows the structure of the electronic control apparatus 10. 仕向け値の書込について説明する図。The figure explaining the writing of the destination value. 仕向け値に対する候補値について説明する図。The figure explaining the candidate value with respect to the destination value. フラッシュメモリ16内に、仕向け値を記憶する仕向け値用記憶領域が含まれていることを説明する図。It is a figure explaining that the flash memory 16 includes the storage area for the destination value which stores the destination value. 第1実施形態の書込処理のフローチャート。The flowchart of the writing process of 1st Embodiment. 対応情報を示す図。The figure which shows the correspondence information. 第1実施形態の実行処理のフローチャート。The flowchart of the execution process of 1st Embodiment. 第1実施形態の書込処理による作動の例を示す図。The figure which shows the example of the operation by the writing process of 1st Embodiment. 第1実施形態の読出処理のフローチャート。The flowchart of the reading process of 1st Embodiment. 第1実施形態の読出処理による作動の例を示す図。The figure which shows the example of the operation by the reading process of 1st Embodiment. 第2実施形態の書込処理のフローチャート。The flowchart of the writing process of 2nd Embodiment. 第2実施形態の書込処理による作動の例を示す図。The figure which shows the example of the operation by the writing process of 2nd Embodiment. 他の実施形態における対応情報の例を示す図。The figure which shows the example of correspondence information in another embodiment. 他の実施形態における書込データの例を示す図。The figure which shows the example of the writing data in another embodiment. 他の実施形態におけるメモリの構成例を示す図。The figure which shows the configuration example of the memory in another embodiment. 他の実施形態における、候補値が複数のECUのうちのあるECUが備えるメモリに記憶されている車載システムの例を示す図。The figure which shows the example of the in-vehicle system in which the candidate value is stored in the memory included in a certain ECU among a plurality of ECUs in another embodiment. 他の実施形態における、候補値がHDDに記憶されている車載システムの例を示す図。The figure which shows the example of the in-vehicle system in which the candidate value is stored in the HDD in another embodiment.

以下、図面を参照しながら、本開示の実施形態を説明する。
[1.第1実施形態]
[1−1.構成]
図1に示す電子制御ユニット(以下、ECU)10は、車両に搭載されて用いられる装置である。以下でいう自車両とは、ECU10が搭載される車両をいう。
Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[1. First Embodiment]
[1-1. composition]
The electronic control unit (hereinafter referred to as ECU) 10 shown in FIG. 1 is a device mounted on a vehicle and used. The own vehicle referred to below means a vehicle on which the ECU 10 is mounted.

ECU10は、当該ECUを統括制御するためのCPU12と、ROM13、RAM14、フラッシュメモリ16等の半導体メモリ(以下、メモリ19)と、コントローラ15と、を有する周知のマイクロコンピュータ(以下、マイコン)11を中心に構成される。ECU10の各種機能は、CPU12が非遷移的実体的記録媒体に格納されたプログラムを実行することにより実現される。この例では、メモリ19が、プログラムを格納した非遷移的実体的記録媒体に該当する。また、このプログラムが実行されることで、プログラムに対応する方法が実行される。なお、ECU10を構成するマイコン11の数は1つでも複数でもよい。 The ECU 10 includes a well-known microcomputer (hereinafter, microcomputer) 11 having a CPU 12 for overall control of the ECU, semiconductor memories (hereinafter, memory 19) such as ROM 13, RAM 14, and flash memory 16, and a controller 15. It is composed in the center. Various functions of the ECU 10 are realized by the CPU 12 executing a program stored in a non-transitional substantive recording medium. In this example, the memory 19 corresponds to a non-transitional substantive recording medium in which a program is stored. In addition, when this program is executed, the method corresponding to the program is executed. The number of microcomputers 11 constituting the ECU 10 may be one or a plurality.

ECU10は、CPU12がプログラムを実行することで、自車両の制御を行うために当該ECU10に割り当てられた各種機能を実現する。ECU10の各種機能を実現する手法はソフトウェアに限るものではなく、その一部又は全部の要素について、一つあるいは複数のハードウェアを用いて実現してもよい。例えば、上記機能がハードウェアである電子回路によって実現される場合、その電子回路は多数の論理回路を含むデジタル回路、又はアナログ回路、あるいはこれらの組合せによって実現してもよい。 The ECU 10 realizes various functions assigned to the ECU 10 in order to control the own vehicle by executing the program by the CPU 12. The method for realizing various functions of the ECU 10 is not limited to software, and some or all of the elements may be realized by using one or a plurality of hardware. For example, when the above function is realized by an electronic circuit which is hardware, the electronic circuit may be realized by a digital circuit including a large number of logic circuits, an analog circuit, or a combination thereof.

ECU10は、マイコン11と、I/O17と、電源回路18と、を備える。
具体的には、ECU10は、I/O17を介して通信線5により接続されている図示しない他のECUとの間で、互いに自車両を制御するためのデータである制御データを送受信し、制御データに基づいてECU10に割り当てられた各種機能を実現する。
The ECU 10 includes a microcomputer 11, an I / O 17, and a power supply circuit 18.
Specifically, the ECU 10 transmits / receives control data, which is data for controlling the own vehicle, to and from another ECU (not shown) connected by the communication line 5 via the I / O 17 to control the ECU 10. Various functions assigned to the ECU 10 are realized based on the data.

また、ECU10は、I/O17を介して通信線5により外部装置9に接続されることが可能である。ECU10は、I/O17を介して接続される外部装置9からの要求に応じて、外部装置9により指定された情報であって当該ECU10に対する設定を表す情報である設定値を外部装置9により指定された値である指示値に設定する。 Further, the ECU 10 can be connected to the external device 9 by the communication line 5 via the I / O 17. In response to a request from the external device 9 connected via the I / O 17, the ECU 10 designates the set value, which is the information specified by the external device 9 and represents the setting for the ECU 10, by the external device 9. Set to the indicated value, which is the specified value.

電源回路18は、自車両に搭載された図示しないバッテリから電力供給を受け、CPU12、ROM13、RAM14、コントローラ15、フラッシュメモリ16、コントローラ15等、ECU10の各部位に電力を供給する。 The power supply circuit 18 receives electric power from a battery (not shown) mounted on the own vehicle, and supplies electric power to each part of the ECU 10 such as the CPU 12, ROM 13, RAM 14, controller 15, flash memory 16, and controller 15.

ROM13には、CPU12により実行されるプログラムが記憶されており、該プログラムとして、コントローラ15にフラッシュメモリ16を制御させるためのフラッシュメモリドライバや、各種アプリケーションが記憶されている。また、ROM13には、後述する候補値が記憶されている。 The ROM 13 stores a program executed by the CPU 12, and as the program, a flash memory driver for causing the controller 15 to control the flash memory 16 and various applications are stored. Further, the ROM 13 stores candidate values described later.

フラッシュメモリ16は、書き換え可能なメモリである。フラッシュメモリ16は、一例として2バイトの記憶領域(以下、記憶単位領域)毎にデータの書き込みや読み出しが行われる。また、フラッシュメモリ16には、後述する設定値用記憶領域が含まれる。 The flash memory 16 is a rewritable memory. As an example, the flash memory 16 writes or reads data for each 2-byte storage area (hereinafter, storage unit area). Further, the flash memory 16 includes a storage area for set values, which will be described later.

CPU12は、フラッシュメモリドライバに従い動作することで、コントローラ15を制御し、フラッシュメモリ16に対するデータの書き込み及び読み出しを行う。
コントローラ15は、CPU12からの指示に従って、データを書き換え可能であって予め定められた記憶単位領域毎にデータの書き込みが行われるメモリであるフラッシュメモリ16に対する制御を行う。
The CPU 12 controls the controller 15 by operating according to the flash memory driver, and writes and reads data to and from the flash memory 16.
The controller 15 controls the flash memory 16, which is a memory in which data can be rewritten and data is written for each predetermined storage unit area, according to an instruction from the CPU 12.

本実施形態では、このように構成されたECU10がI/O17を介して外部装置9に接続される例について説明する。
外部装置9は、ECU10の外部の装置であって、ECU10に対して、設定要求、または取得要求を出力するように構成されている。
In this embodiment, an example in which the ECU 10 configured in this way is connected to the external device 9 via the I / O 17 will be described.
The external device 9 is a device external to the ECU 10 and is configured to output a setting request or an acquisition request to the ECU 10.

ECU10は、外部装置9から、設定要求が有ると、後述する書込処理を実行する。設定要求とは、外部装置9が指定する設定値を、該設定に対する複数の候補値のうちの一つであって外部装置9が指定する指定値、に設定する要求である。また、ECU10は、外部装置9から、取得要求が有ると、後述する読出処理を実行する。取得要求とは、外部装置9が指定する設定値として設定されている値を読み出す要求である。 When there is a setting request from the external device 9, the ECU 10 executes a writing process described later. The setting request is a request to set the setting value specified by the external device 9 to a designated value designated by the external device 9 which is one of a plurality of candidate values for the setting. Further, the ECU 10 executes a read process described later when there is an acquisition request from the external device 9. The acquisition request is a request to read a value set as a set value specified by the external device 9.

ここでいう設定値とは、ECU10に対する設定の種類を表すものであり、該設定値がとりうる複数の候補値が予め定められているものである。設定値には、例えば、後述する仕向け値が含まれうる。 The set value referred to here represents the type of setting for the ECU 10, and a plurality of candidate values that the set value can take are predetermined. The set value may include, for example, a destination value described later.

ここで仕向け値について説明する。一般に、ECU10をはじめとする電子制御ユニットでは、図2に示すように、例えば車両の出荷前等に、仕向け値をフラッシュメモリ16に記憶させることで、国内向け、北米向けといった、仕向け先の管理を行っている。仕向け値は、ECU10の出荷時には「なし」に設定されている。すなわち仕向け値としては何も設定されておらず、仕向け値が設定されていないことを表す予め定められた初期値がフラッシュメモリ16に書き込まれている。そして、車両が製造工場から出荷される前に、外部装置9からの設定要求にて外部装置9が指定した指定値が仕向け値としてフラッシュメモリ16に書き込まれる。 Here, the destination value will be described. Generally, in an electronic control unit such as an ECU 10, as shown in FIG. 2, for example, by storing a destination value in a flash memory 16 before shipping a vehicle, management of destinations such as domestic and North American destinations is managed. It is carried out. The destination value is set to "None" at the time of shipment of the ECU 10. That is, nothing is set as the destination value, and a predetermined initial value indicating that the destination value is not set is written in the flash memory 16. Then, before the vehicle is shipped from the manufacturing factory, the designated value specified by the external device 9 in the setting request from the external device 9 is written in the flash memory 16 as the destination value.

図2では、「国内向け」が指定値として指定する設定要求が外部装置9から入力されており、この「国内向け」が仕向け値としてECU10に書き込まれる例が示されている。ECU10は仕向け値が書き込まれた後、車両に組み付けられる。そして、該組み付け後に車両が出荷される。 FIG. 2 shows an example in which a setting request designated by "domestic" as a designated value is input from the external device 9, and this "domestic" is written in the ECU 10 as a destination value. The ECU 10 is assembled to the vehicle after the destination value is written. Then, the vehicle is shipped after the assembly.

このような設定値には複数の候補値が予め設定されている。候補値とは、設定値に対する候補となる値である。すなわち、設定値がとり得る予め定められた値である。例えば、設定値の一つである前述の仕向け値に対しては、図3に示すように、「初期値」、「国内向け」、「北米向け」、「欧州向け」、「中近東向け」といった候補値が設定されている。本実施形態では、候補値は、6バイトで表されるものとする。 A plurality of candidate values are preset for such set values. The candidate value is a value that is a candidate for the set value. That is, it is a predetermined value that the set value can take. For example, for the above-mentioned destination value, which is one of the set values, as shown in Fig. 3, "initial value", "domestic", "North America", "Europe", and "Middle East" Candidate values such as are set. In this embodiment, the candidate value is represented by 6 bytes.

ECU10においては、前述のように、これら複数の候補値が、ROM13に、具体的にはROM13における予め定められたアドレスで示される領域内に、それぞれ記憶されている。 In the ECU 10, as described above, these plurality of candidate values are stored in the ROM 13, specifically, in the area indicated by the predetermined address in the ROM 13.

例えば、仕向け値を設定値とする例では、後述する図6に示すように、候補値の一つである「初期値」は、0x00002000といったアドレスで示される領域に記憶されている。また、「国内向け」は、0x00002006といったアドレスで示される領域に記憶されている。 For example, in the example in which the destination value is set, the "initial value", which is one of the candidate values, is stored in the area indicated by the address such as 0x00002000, as shown in FIG. 6 described later. In addition, "domestic" is stored in the area indicated by the address such as 0x00002006.

本実施形態では、アドレスは4バイトで表されるものとする。つまり、本実施形態では、ROM13における記憶領域を示すアドレスは、候補値よりも、データ量が少なく設定されている。 In this embodiment, the address is represented by 4 bytes. That is, in the present embodiment, the address indicating the storage area in the ROM 13 is set to have a smaller amount of data than the candidate value.

フラッシュメモリ16には、前述のように設定値用記憶領域が含まれている。設定値用記憶領域とは、設定値に対して設定値毎に予め割り当てられたフラッシュメモリ16内の記憶領域である。例えば、設定値の一つである前述の仕向け値に対しては、図4に示すように、フラッシュメモリ16においてアドレスR1で表される領域が設定値用記憶領域として割り当てられている。仕向け値に対して割り当てられた設定値用記憶領域を仕向け値用記憶領域ともいう。 As described above, the flash memory 16 includes a storage area for set values. The set value storage area is a storage area in the flash memory 16 that is allocated in advance for each set value with respect to the set value. For example, as shown in FIG. 4, the area represented by the address R1 in the flash memory 16 is allocated as the set value storage area for the above-mentioned destination value which is one of the set values. The set value storage area allocated to the destination value is also referred to as the destination value storage area.

このように、外部装置9は、ECU10に対して、複数の候補値の中から選択した一つの候補値を設定値として設定する設定要求を出力するように構成されている。また、外部装置9は、ECU10に対して、複数の候補値の中の一つに設定された設定値の値を該設定値に対する設定値用記憶領域から読み出す取得要求を出力するように構成されている。 As described above, the external device 9 is configured to output to the ECU 10 a setting request for setting one candidate value selected from the plurality of candidate values as the set value. Further, the external device 9 is configured to output to the ECU 10 an acquisition request for reading the value of the set value set in one of the plurality of candidate values from the set value storage area for the set value. ing.

[1−2.処理]
次に、CPU12が実行する処理について、説明する。
[1−2−1.書込処理]
はじめに、CPU12が実行する書込処理について、図5に示すフローチャートを用いて説明する。書込処理は、外部装置9からの設定要求に従って、設定値を指定値に設定する処理である。書込処理は、外部装置9と接続されたことをきっかけとして、繰り返し実行される。
[1-2. process]
Next, the process executed by the CPU 12 will be described.
[1-2-1. Write process]
First, the writing process executed by the CPU 12 will be described with reference to the flowchart shown in FIG. The writing process is a process of setting a set value to a designated value according to a setting request from the external device 9. The writing process is repeatedly executed triggered by the connection with the external device 9.

CPU12は、S10では、外部装置9から設定要求が有るか否かを判断する。CPU12は、設定要求が有る場合に処理をS30へ移行させ、設定要求が無い場合に本書込処理を終了する。 In S10, the CPU 12 determines whether or not there is a setting request from the external device 9. The CPU 12 shifts the process to S30 when there is a setting request, and ends the main writing process when there is no setting request.

CPU12は、外部装置9からの設定要求が有る場合に移行するS30では、対応情報を取得する。対応情報とは、予めROM13に記憶されている情報であって、設定値と、該設定値に対する複数の候補値と、候補値のそれぞれが記憶されているROM13における領域を示すアドレスと、の対応関係を表す情報である。 The CPU 12 acquires correspondence information in S30, which is shifted when there is a setting request from the external device 9. The correspondence information is information stored in ROM 13 in advance, and corresponds to a set value, a plurality of candidate values for the set value, and an address indicating an area in ROM 13 in which each of the candidate values is stored. Information that represents a relationship.

例えば、仕向け値を設定値とする対応情報は図6のように示される。
CPU12は、続くS50では、一致アドレスを特定する。ここでいう一致アドレスとは、ROM13において複数の候補値のうち指定値と一致する候補値が記憶されている領域を示すアドレスである。
For example, the correspondence information with the destination value as the set value is shown as shown in FIG.
The CPU 12 specifies a matching address in the subsequent S50. The matching address referred to here is an address indicating an area in the ROM 13 in which a candidate value that matches a designated value is stored among a plurality of candidate values.

例えば、設定値としての仕向け値に対して指定値としての「国内向け」を設定する設定要求が有った場合、CPU12は、図6に示す対応情報に基づいて、仕向け値に対する複数の候補値の中から、指定値である「国内向け」と一致する候補値が記憶されている領域のアドレスを特定し、特定されたアドレスを一致アドレスとして取得する。すなわち、0x00002006を一致アドレスとして取得する。 For example, when there is a setting request to set "domestic" as a specified value for a destination value as a set value, the CPU 12 has a plurality of candidate values for the destination value based on the correspondence information shown in FIG. From among, the address of the area where the candidate value matching the specified value "for domestic use" is stored is specified, and the specified address is acquired as the matching address. That is, 0x00002006 is acquired as a matching address.

CPU12は、続くS70では、書込データを生成する。書込データとは、CPU12が設定値用記憶領域に書込を行うデータをいう。本実施形態では、CPU12は、一致アドレスを表すデータを書込データとして生成する。 The CPU 12 generates write data in the subsequent S70. The write data means data that the CPU 12 writes to the set value storage area. In the present embodiment, the CPU 12 generates data representing a matching address as write data.

例えば、仕向け値を設定値とし「国内向け」を指定値とする設定要求があった場合、CPU12は一致アドレスである0x00002006を仕向け値用記憶領域に対する書込データとして生成する。 For example, when there is a setting request with the destination value as the set value and "domestic" as the specified value, the CPU 12 generates 0x00002006, which is a matching address, as write data for the destination value storage area.

CPU12は、S90では、設定値用記憶領域に、書込データをコントローラ15に書き込ませる実行処理を行う。
CPU12は、例えば、仕向け値を設定値とし「国内向け」を指定値とする設定要求があった場合、一致アドレスを表すデータである0x00002006を書込データとして、仕向け値用記憶領域R1に対して該書込データをコントローラ15に書き込ませる。これにより、仕向け値用記憶領域R1では、ROM13において初期値が記憶されているアドレスである0x00002000が上書きされ、「国内向け」を表す0x100000000000が記憶されているアドレスである0x00002006が新たに書き込まれる。
In S90, the CPU 12 performs an execution process of writing the write data to the controller 15 in the set value storage area.
For example, when there is a setting request with the destination value as the set value and "domestic" as the specified value, the CPU 12 uses 0x00002006, which is data representing the matching address, as write data for the destination value storage area R1. The write data is written to the controller 15. As a result, in the destination value storage area R1, 0x00002000, which is the address where the initial value is stored in the ROM 13, is overwritten, and 0x00002006, which is the address where 0x100000000000 representing "domestic" is stored, is newly written.

CPU12は設定値用記憶領域への書込データの書込を終えると、本書込処理を終了する。
続いて、書込処理におけるS90にて実行される実行処理について図7に示すフローチャートを用いて説明する。
When the CPU 12 finishes writing the write data to the set value storage area, the CPU 12 ends the main write process.
Subsequently, the execution process executed in S90 in the write process will be described with reference to the flowchart shown in FIG.

CPU12は、図7に示すように、S110にてS70にて生成された書込データを取得する。
CPU12は、S120では、コントローラ15に記憶単位領域毎にフラッシュメモリ16内にデータを書き込ませる。本実施形態では、2バイトを記憶単位領域とする。但し、これに限定されるものではなく、記憶単位領域は例えば4バイト等といったように任意に設定され得る。
As shown in FIG. 7, the CPU 12 acquires the write data generated in S70 in S110.
In S120, the CPU 12 causes the controller 15 to write data in the flash memory 16 for each storage unit area. In this embodiment, 2 bytes are used as the storage unit area. However, the storage unit area is not limited to this, and can be arbitrarily set such as, for example, 4 bytes.

CPU12は、S130では、未書込のデータが有るか否かを判断し、未書込のデータが無くなるまで繰り返し書込を実行する。
このような書込処理によれば、外部装置9から仕向け値を「国内向け」に設定する、といった設定要求が有った場合、図8に示すように、CPU12は、「国内向け」という候補値を示す6バイトのデータである0x100000000000ではなく、一致アドレスを示す4バイトのデータである0x0000200Cを、仕向け値用記憶領域に書き込むよう作動する。
In S130, the CPU 12 determines whether or not there is unwritten data, and repeatedly executes writing until there is no unwritten data.
According to such a writing process, when there is a setting request from the external device 9 to set the destination value to "domestic", as shown in FIG. 8, the CPU 12 is a candidate for "domestic". It operates to write 0x0000200C, which is 4-byte data indicating a matching address, to the destination value storage area instead of 0x100000000000, which is 6-byte data indicating the value.

フラッシュメモリ16内へのデータの書込は記憶単位領域毎に行われるので、書き込まれるデータ量が少ないほど、フラッシュメモリ16への書込時間が低減される。つまり、本書込処理によれば、フラッシュメモリ16内へ一致アドレスが書き込まれるので、フラッシュメモリ16内へ候補値が書き込まれる場合よりも、書込時間が短縮される。 Since the writing of data into the flash memory 16 is performed for each storage unit area, the smaller the amount of data to be written, the shorter the writing time to the flash memory 16. That is, according to this writing process, since the matching address is written in the flash memory 16, the writing time is shortened as compared with the case where the candidate value is written in the flash memory 16.

[1−2−2.読出処理]
次に、CPU12が実行する読出処理について、図9に示すフローチャートを用いて説明する。読出処理は、取得要求に従って、設定値を取得する処理である。ここでは、取得要求が外部装置9から出力される例について説明する。読出処理は、外部装置9と接続されたことをきっかけとして、繰り返し実行される。なお、取得要求は、ECU10に接続された任意の装置からも出力され得る。また、取得要求は、ECU10からも出力され得る。
[1-2-2. Read process]
Next, the reading process executed by the CPU 12 will be described with reference to the flowchart shown in FIG. The read process is a process of acquiring a set value according to an acquisition request. Here, an example in which an acquisition request is output from the external device 9 will be described. The read process is repeatedly executed triggered by the connection with the external device 9. The acquisition request can also be output from any device connected to the ECU 10. The acquisition request can also be output from the ECU 10.

CPU12は、S210では、取得要求が有るか否かを判断する。取得要求とは、外部装置9が設定値の値を取得する要求である。
CPU12は、S220では、S210にて取得要求が有ると判断された場合に、設定値用記憶領域から一致アドレスを取得する。
In S210, the CPU 12 determines whether or not there is an acquisition request. The acquisition request is a request for the external device 9 to acquire the value of the set value.
In S220, the CPU 12 acquires a matching address from the set value storage area when it is determined in S210 that there is an acquisition request.

例えば、仕向け値を取得する取得要求があった場合、CPU12は、フラッシュメモリ16における仕向け値用記憶領域R1から一致アドレスである0x0000200Cを取得する。
CPU12は、S230では、一致アドレスが示す領域に記憶されている候補値、を取得要求にて取得が要求された設定値として取得し、本読出処理を終了する。
For example, when there is an acquisition request to acquire the destination value, the CPU 12 acquires 0x0000200C, which is a matching address, from the destination value storage area R1 in the flash memory 16.
In S230, the CPU 12 acquires the candidate value stored in the area indicated by the matching address as the set value requested to be acquired in the acquisition request, and ends the main reading process.

このような読出処理によれば、例えば、外部装置9から仕向け値を取得する取得要求があった場合、CPU12は、図10に示すように、一致アドレスである0x0000200Cが示す領域に記憶されている候補値である、「国内向け」を表す0x100000000000を取得するように作動する。 According to such a read process, for example, when there is an acquisition request for acquiring the destination value from the external device 9, the CPU 12 is stored in the area indicated by the matching address 0x0000200C as shown in FIG. It works to get 0x100000000000, which is a candidate value and represents "domestic".

[1−3.効果]
以上詳述した第1実施形態によれば、以下の効果を奏する。
(1a)ECU10は、少なくともデータの書込を行う。ECU10において、CPU12は、S10では、当該ECU10に対する設定を表す設定値を設定値に対する複数の候補値のうちの一つである指定値に設定する要求を表す設定要求、が有るか否か判断する。
[1-3. effect]
According to the first embodiment described in detail above, the following effects are obtained.
(1a) The ECU 10 writes at least data. In the ECU 10, the CPU 12 determines in S10 whether or not there is a setting request representing a request for setting a set value representing a setting for the ECU 10 to a designated value which is one of a plurality of candidate values for the set value. ..

また、CPU12は、S50では、設定要求が有る場合に、複数の候補値のうち指定値と一致する候補値が記憶されている領域を示すアドレスである一致アドレス、を取得する。そして、CPU12は、S90では、設定値に対して予め割り当てられた記憶領域である設定値用記憶領域に、一致アドレスを表すデータを、予め定められた記憶単位領域毎にコントローラ15に書き込ませる。複数の候補値は、書き換え可能なメモリ、本実施形態ではフラッシュメモリ16に記憶されている。 Further, in S50, the CPU 12 acquires a matching address, which is an address indicating an area in which a candidate value matching the designated value is stored among the plurality of candidate values, when there is a setting request. Then, in S90, the CPU 12 causes the controller 15 to write the data representing the matching address in the set value storage area, which is the storage area preliminarily allocated to the set value, for each predetermined storage unit area. The plurality of candidate values are stored in a rewritable memory, that is, in the present embodiment, in the flash memory 16.

ここで、フラッシュメモリ16内へのデータの書込は記憶単位領域毎に行われるので、書き込まれるデータのデータ量が増加するほど、フラッシュメモリ16へのデータの書込時間は増加する。 Here, since the data is written in the flash memory 16 for each storage unit area, the time for writing the data to the flash memory 16 increases as the amount of data to be written increases.

本実施形態によれば、アドレスである一致アドレスを表すデータを書き込むので、設定値としての指定値を表すデータを書き込むよりも、例えば一致アドレスが指定値よりもデータ量が少ない場合等に、フラッシュメモリ16へのデータの書込時間を短縮することができる。 According to the present embodiment, since the data representing the matching address, which is the address, is written, the flash is performed, for example, when the matching address has a smaller amount of data than the specified value, rather than writing the data representing the specified value as the setting value. The time for writing data to the memory 16 can be shortened.

また、ROM13には、複数の候補データが予め書き込まれている。これによれば、設定値として書き込む指定値を、複数の候補値の中から選択することができる。
(1b)一致アドレスを表すデータは、指定値を表すデータよりも、データ量が少ないように構成されている。これによれば、一致アドレスを書き込む場合は、指定値を書き込む場合よりも、書込時間を短縮することができる。
Further, a plurality of candidate data are written in advance in the ROM 13. According to this, the specified value to be written as the setting value can be selected from a plurality of candidate values.
(1b) The data representing the matching address is configured so that the amount of data is smaller than the data representing the specified value. According to this, when writing the matching address, the writing time can be shortened as compared with the case where the specified value is written.

(1c)CPU12は、S30では、設定値と、複数の候補値と、候補値のそれぞれが記憶されている領域を示すアドレスと、の対応関係を設定値について示す対応情報、を取得する。 (1c) In S30, the CPU 12 acquires correspondence information indicating the correspondence relationship between the set value, the plurality of candidate values, and the address indicating the area in which each of the candidate values is stored.

CPU12は、S50では、設定要求が有る場合に、対応情報を用いて、複数の候補値のうち指定値と一致する候補値、が記憶されている領域を示すアドレスを特定する。つまり、CPU12は、S50にて特定されたアドレスを一致アドレスとして取得する。 In S50, the CPU 12 specifies an address indicating an area in which a candidate value that matches a specified value among a plurality of candidate values is stored, using the correspondence information when there is a setting request. That is, the CPU 12 acquires the address specified in S50 as a matching address.

これによれば、対応情報を取得し一致アドレスを特定する構成を備えるので、ECU10自身において一致アドレスを特定することができる。
(1d)CPU12は、S210では、設定値を取得する要求である取得要求、が有るか否かを判断する。CPU12は、S220では、取得要求が有る場合に、設定値用記憶領域から一致アドレスを取得する。CPU12は、S220では、一致アドレスが示す領域に記憶されている候補値、を取得要求にて取得が要求された設定値として取得する。
According to this, since the configuration is provided to acquire the correspondence information and specify the matching address, the matching address can be specified by the ECU 10 itself.
(1d) In S210, the CPU 12 determines whether or not there is an acquisition request, which is a request for acquiring a set value. In S220, the CPU 12 acquires a matching address from the set value storage area when there is an acquisition request. In S220, the CPU 12 acquires the candidate value stored in the area indicated by the matching address as the set value requested to be acquired in the acquisition request.

これによれば、取得要求が有る場合には、設定値用記憶領域内に書き込まれている一致アドレスが示す領域に記憶されている候補値を、設定値として取得する。このため、(1a)のように設定値を設定する際のデータの書込時間を短縮し、且つ、設定値として、取得要求にて要求された候補値を取得することができる。 According to this, when there is an acquisition request, the candidate value stored in the area indicated by the matching address written in the set value storage area is acquired as the set value. Therefore, it is possible to shorten the data writing time when setting the set value as in (1a), and to acquire the candidate value requested by the acquisition request as the set value.

なお、ECU10が電子制御装置に相当し、コントローラ15が実行部に相当する。
また、S10が設定判断部としての処理に相当し、S30が対応取得部としての処理に相当し、S50がアドレス部、特定部としての処理に相当し、S90が書込指示部としての処理に相当し、S90が書込指示部としての処理に相当する。また、S210が取得判断部としての処理に相当し、S220がアドレス取得部としての処理に相当し、S230が設定値取得部としての処理に相当する。
The ECU 10 corresponds to an electronic control device, and the controller 15 corresponds to an execution unit.
Further, S10 corresponds to the processing as the setting determination unit, S30 corresponds to the processing as the correspondence acquisition unit, S50 corresponds to the processing as the address unit and the specific unit, and S90 corresponds to the processing as the writing instruction unit. Correspondingly, S90 corresponds to the processing as a write instruction unit. Further, S210 corresponds to the processing as the acquisition determination unit, S220 corresponds to the processing as the address acquisition unit, and S230 corresponds to the processing as the set value acquisition unit.

[2.第2実施形態]
[2−1.第1実施形態との相違点]
第2実施形態は、基本的な構成は第1実施形態と同様であるため、相違点について以下に説明する。なお、第1実施形態と同じ符号は、同一の構成を示すものであって、先行する説明を参照する。
[2. Second Embodiment]
[2-1. Differences from the first embodiment]
Since the basic configuration of the second embodiment is the same as that of the first embodiment, the differences will be described below. It should be noted that the same reference numerals as those in the first embodiment indicate the same configuration, and the preceding description will be referred to.

前述した第1実施形態では、ROM13における候補値が記憶されている領域のアドレスを絶対アドレスで表していた。これに対し、第2実施形態では、該アドレスを相対アドレスにより表す点で、第1実施形態と相違する。これに伴い、第2実施形態では、書込処理においてS55が追加され、S70、S90がS75、S95に置換される。 In the first embodiment described above, the address of the area in which the candidate value is stored in the ROM 13 is represented by an absolute address. On the other hand, the second embodiment differs from the first embodiment in that the address is represented by a relative address. Along with this, in the second embodiment, S55 is added in the writing process, and S70 and S90 are replaced with S75 and S95.

[2−2.処理]
次に、第2実施形態のCPU12が、第1実施形態の図5に示す書込処理に代えて実行する書込処理について、図11のフローチャートを用いて説明する。なお、図11におけるS10−S50、S90の処理は、図5におけるS10−S50、S90の処理と同様であるため、説明を一部簡略化している。
[2-2. process]
Next, the writing process executed by the CPU 12 of the second embodiment in place of the writing process shown in FIG. 5 of the first embodiment will be described with reference to the flowchart of FIG. Since the processing of S10-S50 and S90 in FIG. 11 is the same as the processing of S10-S50 and S90 in FIG. 5, the description is partially simplified.

本実施形態の書込処理では、CPU12は、S50にて一致アドレスを特定し、処理をS55へ移行させる。
CPU12は、S55では、一致アドレスを相対アドレスに変換する。ここでいう相対アドレスとは基準アドレスに対する絶対アドレスの相対値である。基準アドレスは、ROM13内の任意の絶対アドレスに設定されうる。
In the writing process of the present embodiment, the CPU 12 specifies the matching address in S50 and shifts the process to S55.
The CPU 12 converts the matching address into a relative address in S55. The relative address here is a relative value of the absolute address with respect to the reference address. The reference address can be set to any absolute address in the ROM 13.

本実施形態では、候補値記憶領域の先頭アドレスである0x00002000が基準アドレスとして設定されている。基準アドレスは予めROM13に記憶されている。候補値記憶領域とは、設定要求にて設定された、設定値に対する複数の候補値が記憶されている領域をいう。 In the present embodiment, 0x00002000, which is the start address of the candidate value storage area, is set as the reference address. The reference address is stored in the ROM 13 in advance. The candidate value storage area is an area in which a plurality of candidate values for the set values are stored, which is set by the setting request.

なお、本実施形態では、図12に示すように、「初期値」、「国内向け」、「北米向け」といった3つの候補値が仕向け値に対する候補値として設定されている。これらの候補値は、上記実施形態と同様に、それぞれ6バイトで表される。つまり、ROM13における絶対アドレス0x00002000〜0x00002012で表される領域が、仕向け値に対する、候補値記憶領域に相当する。 In this embodiment, as shown in FIG. 12, three candidate values such as "initial value", "domestic", and "North American" are set as candidate values for the destination value. Each of these candidate values is represented by 6 bytes as in the above embodiment. That is, the area represented by the absolute addresses 0x00002000 to 0x00002012 in the ROM 13 corresponds to the candidate value storage area for the destination value.

本ステップでは、設定要求において指定値が「国内向け」に設定されている場合、0x00002006といった絶対アドレスが0x00000006といった相対値に変換される。同様に、設定要求において指定値が「北米向け」に設定されている場合、0x0000200Cといった絶対アドレスが0x0000000Cといった相対値に変換される。つまり、これらの候補値の絶対アドレスに対する相対値は、4バイト中の上位3バイトは同じ値であり、つまり0であり、4バイト中の下位1バイトのみを用いて識別可能である。この下位の1バイトは、候補値記憶領域の大きさに応じた大きさである。 In this step, if the specified value is set to "domestic" in the setting request, the absolute address such as 0x00002006 is converted to the relative value such as 0x00000006. Similarly, if the specified value is set to "For North America" in the setting request, an absolute address such as 0x0000200C is converted to a relative value such as 0x0000000C. That is, the relative values of these candidate values with respect to the absolute address are the same in the upper 3 bytes of the 4 bytes, that is, 0, and can be identified by using only the lower 1 byte of the 4 bytes. The lower 1 byte is a size corresponding to the size of the candidate value storage area.

CPU12は、S75では、S55にて変換された相対値を表すデータを書込データとして設定する。
CPU12は、S95では、コントローラ15に、書込データを仕向け値用記憶領域に書き込ませ、本書込処理を終了する。本実施形態では特に、CPU12は、相対値を表すデータである4バイトの書込データのうち、下位の1バイトについてのみデータの書込を実行する。つまり、相対値を表す書込データのうち、下位バイトから予め定められたデータ長のデータのみを書き込む。予め定められたデータ長とは、候補地記憶領域の大きさに応じたデータ長である。
In S75, the CPU 12 sets data representing the relative value converted in S55 as write data.
In S95, the CPU 12 causes the controller 15 to write the write data to the destination value storage area, and ends the main write process. In this embodiment, in particular, the CPU 12 writes data only for the lower 1 byte of the 4-byte write data which is the data representing the relative value. That is, among the write data representing the relative value, only the data having a predetermined data length from the lower byte is written. The predetermined data length is a data length according to the size of the candidate site storage area.

CPU12は設定値用記憶領域への書込データの書込を終えると、本書込処理を終了する。
このような書込処理によれば、外部装置9から仕向け値を「国内向け」に設定する、といった設定要求が有った場合、図12に示すように、CPU12は、一致アドレスではなく、一致アドレスの相対値を仕向け値用記憶領域に書き込むよう作動する。特に本実施形態では、一致アドレスの相対値のうち所定のデータ長、つまり一致アドレスの相対値のうち下位1バイトの0x06のみを、仕向け値用記憶領域のうち該下位1バイトに対応する領域に書き込む。これによれば、フラッシュメモリ16内へ一致アドレスの相対値が書き込まれるので、フラッシュメモリ16内へ4バイト分の一致アドレスが書き込まれる場合よりも、書込時間が短縮される。
When the CPU 12 finishes writing the write data to the set value storage area, the CPU 12 ends the main write process.
According to such a writing process, when there is a setting request from the external device 9 to set the destination value to "domestic", as shown in FIG. 12, the CPU 12 is not a match address but a match. Operates to write the relative value of the address to the destination value storage area. In particular, in the present embodiment, only the predetermined data length of the relative values of the matching address, that is, 0x06, which is the lower 1 byte of the relative value of the matching address, is set as the area corresponding to the lower 1 byte of the destination value storage area. Write. According to this, since the relative value of the matching address is written in the flash memory 16, the writing time is shortened as compared with the case where the matching address for 4 bytes is written in the flash memory 16.

なお、外部装置9から仕向け値を取得する取得要求が有った場合は、仕向け値用記憶領域に記憶されている一致アドレスの相対値を取得し、該相対値を基準アドレスに基づいて絶対アドレスに変換し、変換後の絶対アドレスを用いて第1実施形態の読出処理と同様の処理を行えばよい。 When there is an acquisition request to acquire the destination value from the external device 9, the relative value of the matching address stored in the destination value storage area is acquired, and the relative value is used as the absolute address based on the reference address. Then, the same process as the read process of the first embodiment may be performed using the converted absolute address.

[2−3.効果]
以上詳述した第2実施形態によれば、前述した第1実施形態の効果(1a)を奏し、さらに、以下の効果を奏する。
[2-3. effect]
According to the second embodiment described in detail above, the effect (1a) of the above-mentioned first embodiment is achieved, and the following effects are further achieved.

(2a)候補値が記憶されている領域を示すアドレスは、ROM13内における予め定められたアドレスである規定アドレスからの相対値により表されている。これによれば、設定値用記憶領域へ一致アドレスの相対値が書き込まれるので、一致アドレスが書き込まれる場合よりも、書込時間を短縮することができる。 (2a) The address indicating the area where the candidate value is stored is represented by a relative value from a specified address which is a predetermined address in the ROM 13. According to this, since the relative value of the matching address is written in the storage area for the set value, the writing time can be shortened as compared with the case where the matching address is written.

[3.他の実施形態]
以上、本開示の実施形態について説明したが、本開示は上述の実施形態に限定されることなく、種々変形して実施することができる。
[3. Other embodiments]
Although the embodiments of the present disclosure have been described above, the present disclosure is not limited to the above-described embodiments, and can be variously modified and implemented.

(3a)上記実施形態では、仕向け値を設定値としてECU10の作動を説明したが、設定値は仕向け値一つに限定されるものではない。設定値には、仕向け値以外に、例えば、仕向け値毎に予め設定されているエアコンの初期設定温度や、仕向け値毎に予め設定される種々の演算に用いられる定数等といった、予め設定される種々の設定値が含まれうる。また、仕向け値には、車体毎に予め定められているタイヤの空気圧の初期値や、車体毎に予め定められているスマートキーの識別番号等といった、車体毎に設定される種々の設定値が含まれうる。 (3a) In the above embodiment, the operation of the ECU 10 is described with the destination value as the set value, but the set value is not limited to one destination value. In addition to the destination value, the set value is preset, for example, the initial set temperature of the air conditioner preset for each destination value, constants used for various calculations preset for each destination value, and the like. Various settings may be included. In addition, various set values set for each vehicle body, such as the initial value of the tire pressure predetermined for each vehicle body and the smart key identification number predetermined for each vehicle body, are set as the destination value. Can be included.

ECU10は、こられの複数の設定値が用いられるように構成されていてもよい。これによれば、設定値毎に書込時間が短縮されるので、ECU10としてより多くの書込時間を短縮することができる。なおこの場合、S30にて取得される対応情報は、図13に示すように、設定値と、複数の候補値と、候補値のそれぞれが記憶されている領域を示すアドレスとの対応関係を、それぞれの設定値について表すものであってよい。 The ECU 10 may be configured to use these plurality of set values. According to this, since the writing time is shortened for each set value, more writing time can be shortened as the ECU 10. In this case, as shown in FIG. 13, the correspondence information acquired in S30 has a correspondence relationship between the set value, the plurality of candidate values, and the address indicating the area in which each of the candidate values is stored. It may represent each set value.

(3b)上記実施形態では、一致アドレスを表すデータを、書込データとして生成していたが、これに限定されるものではない。書込データには、例えば、一致アドレスと共に、管理情報及び識別情報(以下、ID)の少なくとも一方を含んだデータ、が含まれうる。図14に示すように、ID、一致アドレス、及び管理情報を書込データとして含む例を示す。管理情報とは、一致アドレスの書き換えの履歴を管理するための情報であり、例えば一致アドレスが書き換えられたか否か、いつ書き換えられたのか等を示す情報であってもよい。IDとは、設定要求を表す情報であり、例えば設定要求毎に設定された識別番号であってもよい。 (3b) In the above embodiment, the data representing the matching address is generated as the write data, but the present invention is not limited to this. The written data may include, for example, data including at least one of management information and identification information (hereinafter, ID) together with a matching address. As shown in FIG. 14, an example including an ID, a matching address, and management information as write data is shown. The management information is information for managing the history of rewriting of the matching address, and may be, for example, information indicating whether or not the matching address has been rewritten, when it has been rewritten, and the like. The ID is information representing a setting request, and may be, for example, an identification number set for each setting request.

フラッシュメモリ16には、例えば数十バイトの記憶領域からなるブロックが第1ブロック〜第nブロックのように複数設けられており、ブロック100毎に一括してデータの消去が行われうる。例えば、このブロック100毎にID、一致アドレス、及び管理情報を含む数十バイトの書込データが割り当てられるよう構成されていてもよい。 The flash memory 16 is provided with a plurality of blocks including, for example, a storage area of several tens of bytes, such as the first block to the nth block, and data can be erased collectively for each block 100. For example, it may be configured so that several tens of bytes of write data including an ID, a matching address, and management information are assigned to each block 100.

ただし、フラッシュメモリ16におけるブロックの大きさはこれに限定されるものではない。ブロックは数kバイトの記憶領域からなるものであってもよい。この場合、ID、一致アドレス、及び管理情報を含む数十バイトの複数の書込データが一つのブロックに含まれうる。 However, the size of the block in the flash memory 16 is not limited to this. The block may consist of a storage area of several kilobytes. In this case, a block may contain a plurality of tens of bytes of write data including an ID, a matching address, and management information.

(3c)上記実施形態では、ROM13に記憶されている候補値のデータは6バイトで表されるものであり、これらの記憶されている領域を示すアドレスは4バイトで表されるものであったが、これに限定されるものではない。候補値のデータ、ROM13におけるアドレスは任意のデータ量で表されうる。 (3c) In the above embodiment, the candidate value data stored in the ROM 13 is represented by 6 bytes, and the address indicating these stored areas is represented by 4 bytes. However, it is not limited to this. The data of the candidate value and the address in the ROM 13 can be represented by an arbitrary amount of data.

(3d)上記実施形態では、設定値に対する候補値が予め複数設定されていたが、これに限定されるものではない。設定値に対する候補値は予め1つ設定されていてもよい。
(3e)上記実施形態では、第2実施形態において、基準アドレスは候補値記憶領域の先頭アドレスに設定されていたが、これに限定されるものではない。基準アドレスは、ROM13内の任意の値に設定されうる。なお、基準アドレスは、候補値記憶領域内の任意のアドレスに設定されることが望ましい。また、基準アドレスは、例えば、上記実施形態のように候補値記憶領域内の先頭アドレス、または最終アドレスのいずれかに設定されることがより望ましい。
(3d) In the above embodiment, a plurality of candidate values for the set values are set in advance, but the present invention is not limited to this. One candidate value for the set value may be set in advance.
(3e) In the above embodiment, in the second embodiment, the reference address is set to the start address of the candidate value storage area, but the reference address is not limited to this. The reference address can be set to any value in the ROM 13. The reference address is preferably set to an arbitrary address in the candidate value storage area. Further, it is more desirable that the reference address is set to either the start address or the last address in the candidate value storage area as in the above embodiment, for example.

(3f)上記実施形態では、設定値用記憶領域と、複数の候補値が予め記憶される領域とはそれぞれ異なるメモリとして構成され、前者はフラッシュメモリ16として、後者はROM13として構成されていた。ただし、これに限定されるものではない。複数の候補値が予め記憶される領域が、フラッシュメモリ16とは異なる別の書き換え可能なメモリに記憶されていてもよい。 (3f) In the above embodiment, the set value storage area and the area in which a plurality of candidate values are stored in advance are configured as different memories, the former as a flash memory 16 and the latter as a ROM 13. However, the present invention is not limited to this. An area in which a plurality of candidate values are stored in advance may be stored in a rewritable memory different from the flash memory 16.

例えば、図15に示すように、メモリ19において、フラッシュメモリ16が複数のフラッシュメモリ16a、16bを有しており、フラッシュメモリ16aが上記実施形態におけるフラッシュメモリ16として用いられ、フラッシュメモリ16bが複数の候補値が記憶される第2の記憶部として用いられてもよい。これによれば、複数の候補値について書き換えを行うことができる。 For example, as shown in FIG. 15, in the memory 19, the flash memory 16 has a plurality of flash memories 16a and 16b, the flash memory 16a is used as the flash memory 16 in the above embodiment, and the flash memory 16b is a plurality. It may be used as a second storage unit in which the candidate value of is stored. According to this, it is possible to rewrite a plurality of candidate values.

なお、図示しないが、設定値用記憶領域と、複数の候補値が予め記憶される領域とは、同一の書き換え可能なメモリ内、例えば、図1におけるフラッシュメモリ16内に含まれていてもよい。 Although not shown, the set value storage area and the area in which a plurality of candidate values are stored in advance may be included in the same rewritable memory, for example, in the flash memory 16 in FIG. ..

(3g)上記実施形態では、複数の候補値がECU10内のメモリであるフラッシュメモリ16に記憶されていたが、これに限定されるものではない。複数の候補値は、ECU10の外部に設けられた外部記憶装置に記憶されていてもよい。 (3g) In the above embodiment, a plurality of candidate values are stored in the flash memory 16 which is a memory in the ECU 10, but the present invention is not limited to this. The plurality of candidate values may be stored in an external storage device provided outside the ECU 10.

具体的には、図16に示すように、車両に搭載されたシステムである車載システム1において、自ECU10aは、複数の他のECU10b、ECU10cと通信線5により通信可能に接続されている。他のECU10b、10cのうち少なくとも一つは、ROM、フラッシュメモリ等といった、データを記憶するメモリを備えている。 Specifically, as shown in FIG. 16, in the in-vehicle system 1 which is a system mounted on a vehicle, the own ECU 10a is communicably connected to a plurality of other ECUs 10b and 10c by a communication line 5. At least one of the other ECUs 10b and 10c includes a memory for storing data such as a ROM and a flash memory.

ここで、複数の候補値は、複数の他のECU10b、10cのうち少なくとも一つが備えるメモリに記憶されていてもよい。例えば、他のECU10bが備えるメモリに記憶されていてもよい。ここでいう他のECU10bのメモリには、ROMのような書き換え不可能なメモリ及びフラッシュメモリ等といった書き換え可能なメモリの両方が含まれうる。 Here, the plurality of candidate values may be stored in the memory included in at least one of the plurality of other ECUs 10b and 10c. For example, it may be stored in a memory included in another ECU 10b. The memory of the other ECU 10b referred to here may include both a non-rewritable memory such as a ROM and a rewritable memory such as a flash memory.

これによれば、設定値に対する複数の候補値が他のECU10bのメモリに記憶されるので、自ECU10aは、複数の候補値を記憶するための領域を他の情報を記憶するために利用することが可能となる。例えば仕向け値のように、設定値が複数のECUに共通して用いられるものである場合、より大きな効果が奏される。 According to this, since a plurality of candidate values for the set values are stored in the memory of the other ECU 10b, the own ECU 10a uses the area for storing the plurality of candidate values to store other information. Is possible. For example, when the set value is commonly used by a plurality of ECUs, such as a destination value, a greater effect is achieved.

なお、ここでは自ECU10aが、複数の他のECU10b、10cと通信可能に接続されている例を説明したが、自ECU10aに接続される他のECUの数は、これに限定されるものではない。例えば自ECU10aは、少なくとも一つの他のECU10bと通信可能に接続されており、複数の候補値が該他のECU10bのメモリに記憶されるよう構成されていてもよい。 Although an example in which the own ECU 10a is communicably connected to a plurality of other ECUs 10b and 10c has been described here, the number of other ECUs connected to the own ECU 10a is not limited to this. .. For example, the own ECU 10a may be communicably connected to at least one other ECU 10b, and may be configured so that a plurality of candidate values are stored in the memory of the other ECU 10b.

ところで、本実施形態において、自ECU10aは、上記実施形態のECU10と同様に、設定判断部、アドレス部、対応取得部、特定部を備え、一致アドレスを特定するように構成されていてもよい。または、自ECU10aは、特定部を備えず、一致アドレスを取得するように構成されていてもよい。後者の場合、例えば他のECU10bが、上記実施形態のECU10と同様に、設定判断部、アドレス部、対応取得部、特定部を備えるように構成されることにより、自ECU10aは、他のECU10bから一致アドレスを取得するように構成されてもよい。 By the way, in the present embodiment, the own ECU 10a may be configured to include a setting determination unit, an address unit, a correspondence acquisition unit, and a specific unit to specify a matching address, similarly to the ECU 10 of the above embodiment. Alternatively, the own ECU 10a may not be provided with a specific unit and may be configured to acquire a matching address. In the latter case, for example, the other ECU 10b is configured to include a setting determination unit, an address unit, a correspondence acquisition unit, and a specific unit in the same manner as the ECU 10 of the above embodiment, so that the own ECU 10a is separated from the other ECU 10b. It may be configured to get a matching address.

(3h)上記(3g)では、複数の候補値が他のECU10bが備えるメモリに記憶されていたが、複数の候補値が記憶される記憶装置はこれに限定されるものではない。複数の候補値は、例えば、Hard Disk Drive(以下、HDD)といった記憶装置に記憶されていてもよい。HDD30は、データを書き換え可能な記憶装置である。ここではHDDを例に挙げて説明するが、これに限定されるものではなく、HDDはデータを保存するデータ保存部として機能し、且つデータを書き換え可能な任意の記憶装置であってよい。 (3h) In the above (3g), a plurality of candidate values are stored in the memory provided in the other ECU 10b, but the storage device in which the plurality of candidate values are stored is not limited to this. A plurality of candidate values may be stored in a storage device such as a Hard Disk Drive (hereinafter, HDD). The HDD 30 is a storage device in which data can be rewritten. Here, the HDD will be described as an example, but the present invention is not limited to this, and the HDD may be any storage device that functions as a data storage unit for storing data and can rewrite the data.

具体的には、図17に示す車載システム2において、自ECU10dは、他のECU10e及び一つのHDD30と通信線5により通信可能に接続されている。自ECU10d及び他のECU10eは、上記実施形態のECU10と同様に、設定判断部、アドレス部、対応取得部、特定部を備え、一致アドレスを特定するように構成されうる。自ECU10dは、他のECU10eと共に、HDD30を共用するように構成されている。ここで、複数の候補値は、HDD30に記憶されていてもよい。 Specifically, in the in-vehicle system 2 shown in FIG. 17, the own ECU 10d is communicably connected to another ECU 10e and one HDD 30 by a communication line 5. The own ECU 10d and the other ECU 10e are provided with a setting determination unit, an address unit, a correspondence acquisition unit, and a specific unit, and may be configured to specify a matching address, similarly to the ECU 10 of the above embodiment. The own ECU 10d is configured to share the HDD 30 together with the other ECUs 10e. Here, a plurality of candidate values may be stored in the HDD 30.

これによれば、自ECU10d及び他のECU10eのそれぞれにおいては、複数の候補値を記憶するための記憶領域を備える必要が無くなる。つまり、これら複数の候補値が記憶されていた記憶領域を他の情報を記憶させるために有効に用いることが可能となる。 According to this, it is not necessary for each of the own ECU 10d and the other ECU 10e to have a storage area for storing a plurality of candidate values. That is, the storage area in which these plurality of candidate values are stored can be effectively used for storing other information.

なお、自ECU10dに通信可能に接続される他のECUは複数であってもよく、自ECU10dがこれら複数の他のECUと共にHDD30を共用するように構成されていてもよい。また、自ECU10d及び他のECU10eは、特定部を備えないように構成されてもよい。 There may be a plurality of other ECUs communicably connected to the own ECU 10d, and the own ECU 10d may be configured to share the HDD 30 with the plurality of other ECUs. Further, the own ECU 10d and the other ECU 10e may be configured not to have a specific unit.

(3i)上記実施形態において、対応情報の例を図6のように示したが、対応情報の態様はこれに限定されるものではない。対応情報は、候補値と該候補値が記憶されている領域を示すアドレスとの対応を示すものであれば、図6に示すテーブル形式に限らず、どのような態様で表されてもよい。また、候補値が記憶されている領域を示すアドレスは、どのような態様で表されてもよい。例えば、候補値が記憶されている領域を示すアドレスは、アドレスを示すデータ列のうち上位の数ビットまたは下位の数ビットを用いて表されうる。 (3i) In the above embodiment, an example of the correspondence information is shown as shown in FIG. 6, but the mode of the correspondence information is not limited to this. The correspondence information is not limited to the table format shown in FIG. 6, and may be represented in any form as long as it indicates the correspondence between the candidate value and the address indicating the area in which the candidate value is stored. Further, the address indicating the area in which the candidate value is stored may be represented in any manner. For example, an address indicating an area in which a candidate value is stored may be represented by using a few upper bits or a lower number of bits in a data string indicating an address.

(3j)上記実施形態における1つの構成要素が有する複数の機能を、複数の構成要素によって実現したり、1つの構成要素が有する1つの機能を、複数の構成要素によって実現したりしてもよい。また、複数の構成要素が有する複数の機能を、1つの構成要素によって実現したり、複数の構成要素によって実現される1つの機能を、1つの構成要素によって実現したりしてもよい。また、上記実施形態の構成の一部を省略してもよい。また、上記実施形態の構成の少なくとも一部を、他の上記実施形態の構成に対して付加又は置換してもよい。なお、特許請求の範囲に記載した文言から特定される技術思想に含まれるあらゆる態様が本開示の実施形態である。 (3j) A plurality of functions possessed by one component in the above embodiment may be realized by a plurality of components, or one function possessed by one component may be realized by a plurality of components. .. Further, a plurality of functions possessed by the plurality of components may be realized by one component, or one function realized by the plurality of components may be realized by one component. Further, a part of the configuration of the above embodiment may be omitted. Further, at least a part of the configuration of the above embodiment may be added or replaced with the configuration of the other above embodiment. It should be noted that all aspects included in the technical idea specified from the wording described in the claims are embodiments of the present disclosure.

(3k)上述したECU10、CPU12、車載システム1の他、CPU12を機能させるためのプログラム、このプログラムを記録した半導体メモリ等の非遷移的実態的記録媒体、データ記憶方法など、種々の形態で本開示を実現することもできる。 (3k) In addition to the above-mentioned ECU 10, CPU 12, and in-vehicle system 1, this program is in various forms such as a program for operating the CPU 12, a non-transitional actual recording medium such as a semiconductor memory in which this program is recorded, and a data storage method. Disclosure can also be achieved.

1 車載システム、10 ECU、12 CPU、13 ROM、15 コントローラ、16 フラッシュメモリ、19 メモリ。 1 in-vehicle system, 10 ECU, 12 CPU, 13 ROM, 15 controller, 16 flash memory, 19 memory.

Claims (7)

少なくともデータの書込を行う電子制御装置(10)であって、
当該電子制御装置に対する設定を表す設定値を前記設定値に対する複数の候補値のうちの一つである指定値に設定する要求を表す設定要求、が有るか否か判断する設定判断部(S10)と、
前記設定要求が有る場合に、前記複数の候補値が予め記憶されている候補値用記憶領域において前記複数の候補値のうち前記指定値と一致する前記候補値が記憶されている領域を示すアドレスである一致アドレス、を取得するアドレス部(S50)と、
前記設定値に対して予め割り当てられた記憶領域である設定値用記憶領域に、前記一致アドレスを表すデータを、予め定められた記憶単位領域毎にデータの書込を行う実行部(15)に書き込ませる書込指示部(S90)と、
を備える電子制御装置。
At least an electronic control device (10) that writes data.
A setting determination unit (S10) for determining whether or not there is a setting request indicating a request for setting a setting value indicating a setting for the electronic control device to a specified value which is one of a plurality of candidate values for the setting value. When,
An address indicating an area in which the candidate value matching the specified value is stored among the plurality of candidate values in the candidate value storage area in which the plurality of candidate values are stored in advance when the setting request is made. The address part (S50) for acquiring the matching address, which is
The execution unit (15) that writes data representing the matching address to the set value storage area, which is a storage area preliminarily allocated to the set value, for each predetermined storage unit area. A writing instruction unit (S90) for writing, and
Electronic control device equipped with.
請求項1に記載の電子制御装置であって、
前記一致アドレスを表すデータは、前記指定値を表すデータよりも、データ量が少ない
電子制御装置。
The electronic control device according to claim 1.
The data representing the matching address is an electronic control device having a smaller amount of data than the data representing the specified value.
請求項1または請求項2に記載の電子制御装置であって、
前記設定値と、前記複数の候補値と、前記候補値のそれぞれが記憶されている領域を示すアドレスと、の対応関係を表す対応情報、を取得する対応取得部(S30)と、
前記設定要求が有る場合に、前記対応情報を用いて、前記複数の候補値のうち指定値と一致する候補値が記憶されている領域を示すアドレスを特定する特定部(S50)と、
を更に備え、
前記アドレス部は、前記特定部により特定されたアドレスを前記一致アドレスとして取得する
電子制御装置。
The electronic control device according to claim 1 or 2.
A correspondence acquisition unit (S30) for acquiring correspondence information indicating a correspondence relationship between the set value, the plurality of candidate values, and an address indicating an area in which each of the candidate values is stored.
When there is a setting request, a specific unit (S50) that specifies an address indicating an area in which a candidate value that matches a specified value among the plurality of candidate values is stored, using the corresponding information, and a specific unit (S50).
Further prepare
The address unit is an electronic control device that acquires an address specified by the specific unit as the matching address.
請求項1から請求項3のいずれか一項に記載の電子制御装置であって、
前記設定値を取得する要求である取得要求、が有るか否かを判断する取得判断部(S210)と、
前記取得要求が有る場合に、前記設定値用記憶領域から前記一致アドレスを取得するアドレス取得部(S220)と、
前記一致アドレスが示す領域に記憶されている前記候補値、を前記取得要求にて取得が要求された設定値として取得する設定値取得部(S230)と、
を更に備える電子制御装置。
The electronic control device according to any one of claims 1 to 3.
An acquisition determination unit (S210) for determining whether or not there is an acquisition request, which is a request for acquiring the set value, and
When there is the acquisition request, the address acquisition unit (S220) that acquires the matching address from the set value storage area, and the address acquisition unit (S220).
A setting value acquisition unit (S230) that acquires the candidate value stored in the area indicated by the matching address as the setting value requested to be acquired by the acquisition request.
An electronic control device further equipped with.
請求項1から請求項4のいずれか一項に記載の電子制御装置であって、
前記候補値が記憶されている領域を示すアドレスは、予め定められたアドレスである規定アドレスからの相対値により表される
電子制御装置。
The electronic control device according to any one of claims 1 to 4.
The address indicating the area in which the candidate value is stored is an electronic control device represented by a relative value from a predetermined address, which is a predetermined address.
請求項1から請求項5のいずれか一項に記載の電子制御装置であって、
複数の前記設定値が用いられるように構成された
電子制御装置。
The electronic control device according to any one of claims 1 to 5.
An electronic control device configured to use a plurality of the above set values.
請求項1から請求項6のいずれか一項に記載の電子制御装置であって、
前記複数の候補値が当該電子制御装置の外部に設けられた記憶装置に記憶されている
電子制御装置。
The electronic control device according to any one of claims 1 to 6.
An electronic control device in which the plurality of candidate values are stored in a storage device provided outside the electronic control device.
JP2017007617A 2017-01-19 2017-01-19 Electronic control device Active JP6969103B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2017007617A JP6969103B2 (en) 2017-01-19 2017-01-19 Electronic control device
DE102018200660.1A DE102018200660B4 (en) 2017-01-19 2018-01-16 ELECTRONIC CONTROL UNIT

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017007617A JP6969103B2 (en) 2017-01-19 2017-01-19 Electronic control device

Publications (2)

Publication Number Publication Date
JP2018116552A JP2018116552A (en) 2018-07-26
JP6969103B2 true JP6969103B2 (en) 2021-11-24

Family

ID=62716577

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017007617A Active JP6969103B2 (en) 2017-01-19 2017-01-19 Electronic control device

Country Status (2)

Country Link
JP (1) JP6969103B2 (en)
DE (1) DE102018200660B4 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050204090A1 (en) 2004-03-10 2005-09-15 Eilert Sean S. Hardware stack for blocked nonvolatile memories
JP5520098B2 (en) 2010-03-24 2014-06-11 スパンション エルエルシー Data processing method, program, and system

Also Published As

Publication number Publication date
DE102018200660A1 (en) 2018-07-19
JP2018116552A (en) 2018-07-26
DE102018200660B4 (en) 2023-10-26

Similar Documents

Publication Publication Date Title
JP4418439B2 (en) Nonvolatile storage device and data writing method thereof
US6154808A (en) Method and apparatus for controlling data erase operations of a non-volatile memory device
JP4268396B2 (en) Non-volatile memory device file management that can be programmed once
US20060143365A1 (en) Memory device, memory managing method and program
US20080270427A1 (en) Method and Apparatus for Configuring a Control Device, and Corresponding Control Device
JP4956068B2 (en) Semiconductor memory device and control method thereof
US20140181378A1 (en) Control device, control method, and program
US20110022807A1 (en) Write once recording device
US8185705B2 (en) Information recording medium, information recording medium accessing apparatus and accessing method
JP2007280108A (en) Storage medium controller, storage medium control method, and program
JP4586469B2 (en) MEMORY CONTROL DEVICE, MEMORY CONTROL METHOD, PROGRAM
JP6969103B2 (en) Electronic control device
US20060206674A1 (en) Optical disc drive and program code updating method thereof
US20110082995A1 (en) Information processing apparatus
JP2017027507A (en) Method and device for transcribing binary image on memory device
US7318131B2 (en) CPU-containing LSI, and optical disk device and LSI device with the same
JP2007052558A (en) Flash memory rewrite device, flash memory rewrite method and flash memory rewrite program
JP5395163B2 (en) Memory management device and memory area setting method
TWI715371B (en) One-time programmable memory device and fault tolerant method thereof
JP2019020837A (en) Electronic controller
JP2013033338A (en) Memory system
WO2020039927A1 (en) Non-volatile storage device, host device, and data storage system
JP4818453B1 (en) Electronic device and data reading method
JP2009276883A (en) Semiconductor auxiliary storage device
JP2012248094A (en) Electronic equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20191217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210203

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210316

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210426

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210928

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20211011

R151 Written notification of patent or utility model registration

Ref document number: 6969103

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151