[go: up one dir, main page]

JP2019185398A - On-vehicle device - Google Patents

On-vehicle device Download PDF

Info

Publication number
JP2019185398A
JP2019185398A JP2018075528A JP2018075528A JP2019185398A JP 2019185398 A JP2019185398 A JP 2019185398A JP 2018075528 A JP2018075528 A JP 2018075528A JP 2018075528 A JP2018075528 A JP 2018075528A JP 2019185398 A JP2019185398 A JP 2019185398A
Authority
JP
Japan
Prior art keywords
update program
battery
program
power
supplied
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2018075528A
Other languages
Japanese (ja)
Other versions
JP7031461B2 (en
Inventor
崇人 楠本
Takahito Kusumoto
崇人 楠本
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 JP2018075528A priority Critical patent/JP7031461B2/en
Priority to DE102019204996.6A priority patent/DE102019204996B4/en
Publication of JP2019185398A publication Critical patent/JP2019185398A/en
Application granted granted Critical
Publication of JP7031461B2 publication Critical patent/JP7031461B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/30Power supply circuits
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C5/00Details of stores covered by group G11C11/00
    • G11C5/14Power supply arrangements, e.g. power down, chip selection or deselection, layout of wirings or power grids, or multiple supply levels
    • G11C5/143Detection of memory cassette insertion or removal; Continuity checks of supply or ground lines; Detection of supply variations, interruptions or levels ; Switching between alternative supplies
    • G11C5/144Detection of predetermined disconnection or reduction of power supply, e.g. power down or power standby
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

【課題】プログラムの保持期間を確保しつつ、プログラムの書き換え時におけるバッテリの電力消費を抑制することができる車載装置を提供すること。【解決手段】車載装置は、バッテリ60から電力供給されて動作し、不揮発性メモリ12に記憶されたプログラムを、センター200から送信された更新プログラムに書き換えるものである。車載装置は、センター200から更新プログラムへの書き換えの要求があり、バッテリ60に電力が供給されていない場合、バッテリ60に電力が供給されている場合の書込電圧よりも低電圧な第1書込電圧として更新プログラムを不揮発性メモリ12に書き込む。また、車載装置は、第1書込電圧として更新プログラムに書き換えた場合、バッテリ60に電力が供給された後に、不揮発性メモリ12への書込電圧を第1書込電圧よりも高電圧な第2書込電圧として、上記と同じ更新プログラムを不揮発性メモリ12に書き込む。【選択図】図1An in-vehicle device capable of suppressing power consumption of a battery at the time of rewriting a program while securing a program retention period. An in-vehicle device operates by being supplied with power from a battery, and rewrites a program stored in a nonvolatile memory to an update program transmitted from a center. The in-vehicle device has a request for rewriting to the update program from the center 200, and when the power is not supplied to the battery 60, the first document having a lower voltage than the writing voltage when the battery 60 is supplied with power. The update program is written to the nonvolatile memory 12 as the input voltage. Also, when the vehicle-mounted device rewrites the update program as the first write voltage, after the power is supplied to the battery 60, the write voltage to the nonvolatile memory 12 becomes higher than the first write voltage. The same update program as described above is written in the nonvolatile memory 12 as the two write voltages. [Selection diagram] Fig. 1

Description

本開示は、不揮発性メモリに記憶したプログラムを書き換え可能に構成された車載装置に関する。   The present disclosure relates to an in-vehicle device configured to be able to rewrite a program stored in a nonvolatile memory.

従来、特許文献1に開示された不揮発性半導体記憶装置がある。不揮発性半導体記憶装置は、第1の書換時間でメモリセルのデータ書き込み又はデータ消去を行う第1の動作モードと、第1の書換時間と異なる第2の書換時間でメモリセルのデータ書き込み又はデータ消去を行う第2の動作モードと、を備えている。また、不揮発性半導体記憶装置は、第1及び第2の動作モードのいずれかを選択するモード選択手段を備えている。   Conventionally, there is a nonvolatile semiconductor memory device disclosed in Patent Document 1. The non-volatile semiconductor memory device includes a first operation mode in which data is written or erased in a memory cell in a first rewrite time, and data write or data in a memory cell in a second rewrite time different from the first rewrite time. A second operation mode in which erasing is performed. In addition, the nonvolatile semiconductor memory device includes mode selection means for selecting one of the first and second operation modes.

特開2000−76878号公報JP 2000-76878 A

ところで、従来技術ではないが、車載装置は、販売店などでの有線書換器によるプログラム書き換えだけでなく、無線通信によって更新プログラムが随時配信され、更新プログラムを受信し次第、プログラムを更新プログラムに書き換える方法が考えられる。また、車載装置は、無線通信によって更新プログラムが配信されてプログラムを書き換える場合、車両に搭載されたバッテリの電力を消費して書き換えを行うことになる。   By the way, although it is not a prior art, the in-vehicle device not only rewrites the program with a wired rewrite device at a store or the like, but also updates the program as soon as it is distributed via wireless communication and receives the update program. A method is conceivable. Further, when the update program is distributed by wireless communication and the program is rewritten, the in-vehicle device consumes the power of the battery mounted on the vehicle and performs the rewrite.

しかしながら、車載装置は、バッテリへの電力の供給が無い状態でプログラムを書き換えると、プログラムの書き換えで電力を消費した分、プログラムの書き換え後に車両が放置された場合にバッテリ上がりが起こりやすくなる。   However, if the in-vehicle device rewrites the program in a state where no power is supplied to the battery, the battery is likely to run out when the vehicle is left after rewriting the program because the power is consumed by rewriting the program.

本開示は、上記問題点に鑑みなされたものであり、プログラムの保持期間を確保しつつ、プログラムの書き換え時におけるバッテリの電力消費を抑制することができる車載装置を提供することを目的とする。   This indication is made in view of the above-mentioned problem, and it aims at providing the in-vehicle device which can control the power consumption of the battery at the time of rewriting of a program, ensuring the retention period of a program.

上記目的を達成するために本開示は、
バッテリ(60)から電力供給されて動作し、プログラムを記憶した不揮発性メモリ(12)を有しており、プログラムを車両の外部に設けられた外部機器(200)から送信された更新プログラムに書き換える車載装置であって、
更新プログラムへの書き換えの要求があり、バッテリに電力が供給されていない場合、バッテリに電力が供給されている場合よりも、不揮発性メモリへの書込電圧を低電圧として更新プログラムを不揮発性メモリに書き込むことで、更新プログラムに書き換える第1書換部(S23)と、
第1書換部にて更新プログラムへの書き換えを実施した場合、バッテリに電力が供給された後に、不揮発性メモリへの書込電圧を第1書換部での書込電圧よりも高電圧として、第1書換部と同じ更新プログラムを不揮発性メモリに書き込むことで、更新プログラムに書き換える第2書換部(S31)と、を備えている車載装置。
In order to achieve the above object, the present disclosure
It has a non-volatile memory (12) that operates with power supplied from the battery (60) and stores the program, and rewrites the program with an update program transmitted from an external device (200) provided outside the vehicle. An in-vehicle device,
When there is a request to rewrite the update program and the battery is not supplied with power, the update program is stored in the nonvolatile memory with a lower write voltage to the nonvolatile memory than when the battery is supplied with power. A first rewriting unit (S23) for rewriting the update program by writing to
When rewriting to the update program is performed in the first rewriting unit, after the power is supplied to the battery, the write voltage to the nonvolatile memory is set higher than the write voltage in the first rewriting unit. An in-vehicle device comprising: a second rewriting unit (S31) that rewrites an update program by writing the same update program as the one rewriting unit into a nonvolatile memory.

このように、本開示では、更新プログラムへの書き換えの要求があり、バッテリに電力が供給されていない場合、低電圧で更新プログラムを不揮発性メモリに書き込むことで、プログラムの書き換えによるバッテリの電力消費を抑えることができる。よって、本開示は、プログラムを書き換えた後に車両が放置されたとしても、バッテリ上がりを抑制できる。   As described above, according to the present disclosure, when there is a request to rewrite the update program and the battery is not supplied with power, the update program is written to the non-volatile memory at a low voltage. Can be suppressed. Therefore, even if the vehicle is left after rewriting the program, the present disclosure can suppress the battery from running out.

また、本開示は、低電圧でプログラムの書き換えを実施した場合、それ以降にバッテリに電力が供給された後に、高電圧として第1書換部と同じ更新プログラムを不揮発性メモリに書き込むことで、更新プログラムの保持期間を確保することができる。   In addition, in the present disclosure, when a program is rewritten at a low voltage, after the power is supplied to the battery after that, the same update program as the first rewrite unit is written in the nonvolatile memory as a high voltage, thereby updating the battery. A program retention period can be secured.

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

第1実施形態における制御装置とゲートウェイを含む車両の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the vehicle containing the control apparatus and gateway in 1st Embodiment. 第1実施形態における不揮発性メモリの概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the non-volatile memory in 1st Embodiment. 第1実施形態におけるゲートウェイの処理動作を示すフローチャートである。It is a flowchart which shows the processing operation of the gateway in 1st Embodiment. 第1実施形態における制御装置の書換処理を示すフローチャートである。It is a flowchart which shows the rewriting process of the control apparatus in 1st Embodiment. 第1実施形態における制御装置のシャットダウン時の書換処理を示すフローチャートである。It is a flowchart which shows the rewriting process at the time of shutdown of the control apparatus in 1st Embodiment. 第1実施形態における制御装置の第1書込モード時の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation at the time of the 1st writing mode of the control apparatus in 1st Embodiment. 第1実施形態における制御装置の第2書込モード時の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation at the time of the 2nd writing mode of the control apparatus in 1st Embodiment. 第1実施形態における制御装置の第3書込モード時の処理動作を示すフローチャートである。It is a flowchart which shows the processing operation at the time of the 3rd writing mode of the control apparatus in 1st Embodiment. 第1実施形態における第1書込モードでの書き込み後のメモリセルのVth分布を示す図面である。6 is a diagram showing a Vth distribution of a memory cell after writing in the first writing mode in the first embodiment. 第1実施形態における第2書込モードでの書き込み後のメモリセルのVth分布を示す図面である。6 is a diagram showing a Vth distribution of a memory cell after writing in a second writing mode in the first embodiment. 変形例1における制御装置の書換処理を示すフローチャートである。10 is a flowchart showing a rewrite process of a control device in Modification 1; 変形例2における制御装置とゲートウェイを含む車両の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the vehicle containing the control apparatus and gateway in the modification 2.

以下において、図面を参照しながら、本開示を実施するための複数の形態を説明する。各形態において、先行する形態で説明した事項に対応する部分には同一の参照符号を付して重複する説明を省略する場合がある。各形態において、構成の一部のみを説明している場合は、構成の他の部分については先行して説明した他の形態を参照し適用することができる。   Hereinafter, a plurality of modes for carrying out the present disclosure will be described with reference to the drawings. In each embodiment, portions corresponding to the matters described in the preceding embodiment may be denoted by the same reference numerals and redundant description may be omitted. In each embodiment, when only a part of the configuration is described, the other configurations described above can be applied to other portions of the configuration.

(実施形態)
図1〜図10を用いて、本実施形態における車載装置に関して説明する。本実施形態では、一例として、制御装置10とゲートウェイ20とを含む車載装置を採用する。また、本実施形態では、一例として、エンジン40を備えた車両100に搭載可能な車載装置を採用する。
(Embodiment)
The in-vehicle device in the present embodiment will be described with reference to FIGS. In the present embodiment, as an example, an in-vehicle device including the control device 10 and the gateway 20 is employed. Moreover, in this embodiment, the vehicle-mounted apparatus which can be mounted in the vehicle 100 provided with the engine 40 is employ | adopted as an example.

まず、車載装置が搭載される車両100の全体構成に関して説明する。図1に示すように、車両100は、主に、車載装置としての制御装置10とゲートウェイ20とを備えている。また、車両100は、複数の制御装置10を備えている。複数の制御装置10は、互いに異なる制御を実施する。本実施形態では、代表として一つの制御装置10を図示している。   First, the overall configuration of the vehicle 100 on which the in-vehicle device is mounted will be described. As shown in FIG. 1, the vehicle 100 mainly includes a control device 10 as a vehicle-mounted device and a gateway 20. The vehicle 100 includes a plurality of control devices 10. The some control apparatus 10 implements mutually different control. In the present embodiment, one control device 10 is shown as a representative.

さらに、車両は、通信機30、エンジン40、オルタネータ50、バッテリ60、イグニッションスイッチ70を備えている。なお、図1は、各構成要素間の破線が信号線を示しており、実線が電力線を示している。この点は、後程説明する図12でも同様である。   Further, the vehicle includes a communication device 30, an engine 40, an alternator 50, a battery 60, and an ignition switch 70. In FIG. 1, broken lines between the constituent elements indicate signal lines, and solid lines indicate power lines. This also applies to FIG. 12, which will be described later.

通信機30は、センター200との通信を行う装置である。通信機30は、ゲートウェイ20と信号線を介して接続されている。   The communication device 30 is a device that performs communication with the center 200. The communication device 30 is connected to the gateway 20 via a signal line.

センター200は、外部機器に相当する。センター200は、車両100の外部に設けられており、コンピュータや通信装置などを備えている。センター200は、制御装置10の不揮発性メモリ12に記憶されているプログラムを更新するための更新プログラムを通信機30へ無線通信にて配信する。また、センター200は、更新プログラムを生成する機能を備えていてもよい。センター200は、販売店などの更新プログラムの配信可能な施設とも言える。   The center 200 corresponds to an external device. The center 200 is provided outside the vehicle 100 and includes a computer, a communication device, and the like. The center 200 distributes an update program for updating a program stored in the nonvolatile memory 12 of the control device 10 to the communication device 30 by wireless communication. The center 200 may have a function for generating an update program. The center 200 can also be said to be a facility that can distribute update programs such as a store.

更新プログラムは、不揮発性メモリ12に記憶されたプログラムを更新するためのプログラムである。更新プログラムは、最新のプログラム、又は、最新のプログラムと不揮発性メモリ12に記憶されたプログラムとの差分などを含んでいる。   The update program is a program for updating the program stored in the nonvolatile memory 12. The update program includes the latest program or a difference between the latest program and the program stored in the nonvolatile memory 12.

なお、通信機30は、センター200から受信した更新プログラムをゲートウェイ20に送信する。不揮発性メモリ12に記憶された更新対象となるプログラムは、固定値および変数の初期値などのデータを含んでいてもよい。   The communication device 30 transmits the update program received from the center 200 to the gateway 20. The program to be updated stored in the nonvolatile memory 12 may include data such as fixed values and initial values of variables.

エンジン40は、車両100の動力源である。オルタネータ50は、エンジン40が動作している時、エンジン40の動力を利用して発電する。バッテリ60は、電力の貯蓄と、制御装置10、ゲートウェイ20、通信機30などの各装置への電力供給を行う。車両100は、オルタネータ50が発電した電力をバッテリ60に蓄えることができる。よって、車両100は、エンジン40の動力によってバッテリ60への充電を行うことができる。このため、車両100は、エンジン40が停止状態の場合、バッテリ60への電力供給が行われない。つまり、バッテリ60への電力供給が無い状態とは、エンジン40の停止状態を指す。   The engine 40 is a power source for the vehicle 100. The alternator 50 generates power using the power of the engine 40 when the engine 40 is operating. The battery 60 stores power and supplies power to each device such as the control device 10, the gateway 20, and the communication device 30. The vehicle 100 can store the electric power generated by the alternator 50 in the battery 60. Therefore, vehicle 100 can charge battery 60 with the power of engine 40. For this reason, vehicle 100 does not supply power to battery 60 when engine 40 is in a stopped state. That is, the state where no power is supplied to the battery 60 indicates a stopped state of the engine 40.

イグニッションスイッチ70は、車両100の運転者によってオンからオフへの操作、及びオフからオンへの操作がされるものである。イグニッションスイッチ70は、信号線を介して制御装置10と接続されている。よって、制御装置10には、イグニッションスイッチ70がオンであることを示す信号、及びオフであることを示す信号が入力される。つまり、制御装置10は、イグニッションスイッチ70におけるオンからオフへの切り替わり、及びオフからオンへの切り替わりを認識することができる。   The ignition switch 70 is operated from on to off and from off to on by the driver of the vehicle 100. The ignition switch 70 is connected to the control device 10 via a signal line. Therefore, a signal indicating that the ignition switch 70 is on and a signal indicating that the ignition switch 70 is off are input to the control device 10. That is, the control device 10 can recognize the switching from on to off and the switching from off to on in the ignition switch 70.

ゲートウェイ20は、記憶部21や演算処理装置などを備えている。ゲートウェイ20は、バッテリ60から電力供給されて動作する。ゲートウェイ20は、通信機30から送信された更新プログラムを受信すると記憶部21に保存する。ゲートウェイ20は、制御装置10と信号線を介して接続されている。詳述すると、ゲートウェイ20は、少なくとも一つの制御装置10と通信可能に接続されていればよく、複数の制御装置10と接続されていてもよい。   The gateway 20 includes a storage unit 21 and an arithmetic processing device. The gateway 20 operates with power supplied from the battery 60. When the gateway 20 receives the update program transmitted from the communication device 30, the gateway 20 stores the update program in the storage unit 21. The gateway 20 is connected to the control device 10 via a signal line. Specifically, the gateway 20 may be connected to at least one control device 10 so as to be communicable, and may be connected to a plurality of control devices 10.

さらに、本実施形態では、バッテリ60に対して電力供給がなされているか否かを判定する機能を有したゲートウェイ20を採用している。ゲートウェイ20は、制御装置10に対してプログラム書き換えの開始要求を送信する前に、各制御装置10と通信して得られた情報に基づいて、バッテリ60への電力供給の有無を判定する。例えば、ゲートウェイ20は、車両100に搭載された、図1に示した制御装置10とは異なる他の制御装置10との通信で得られた情報に基づいて、バッテリ60への電力供給の有無を判定する。図1に示した制御装置10とは異なる他の制御装置10は、プログラムの書き換え対象ではない制御装置とも言える。   Furthermore, in this embodiment, the gateway 20 having a function of determining whether or not power is supplied to the battery 60 is employed. The gateway 20 determines whether or not power is supplied to the battery 60 based on information obtained by communicating with each control device 10 before transmitting a program rewrite start request to the control device 10. For example, the gateway 20 determines whether or not power is supplied to the battery 60 based on information obtained by communication with another control device 10 different from the control device 10 illustrated in FIG. judge. It can be said that another control device 10 different from the control device 10 shown in FIG. 1 is a control device that is not a target of program rewriting.

また、例えばエンジン車の場合、ゲートウェイ20は、制御装置10の一つであるエンジン制御装置と通信を行い、エンジン制御装置からエンジン動作状態かエンジン停止状態かの状態情報を受信することで判定することができる。この場合、ゲートウェイ20は、エンジン動作状態を示す状態情報を受信した場合はバッテリ60への電力供給ありと判定し、エンジン停止状態を示す状態情報を受信した場合はバッテリ60への電力供給なしと判定する。   For example, in the case of an engine vehicle, the gateway 20 communicates with an engine control device that is one of the control devices 10 and determines by receiving state information indicating whether the engine is in an engine operation state or an engine stop state from the engine control device. be able to. In this case, the gateway 20 determines that there is power supply to the battery 60 when receiving the state information indicating the engine operating state, and does not supply power to the battery 60 when receiving the state information indicating the engine stop state. judge.

なお、バッテリ60への電力供給ありとは、バッテリ60が充電されている状態である。一方、バッテリ60への電力供給なしとは、バッテリ60が充電されていない状態である。   Note that the power supply to the battery 60 means that the battery 60 is being charged. On the other hand, “no power supply to the battery 60” means that the battery 60 is not charged.

ゲートウェイ20は、例えば、制御装置10におけるプログラムの書き換えを行う所定のタイミングで、書き換え対象の制御装置10と通信する。そして、ゲートウェイ20は、書き換え対象の制御装置10に対して、プログラム書き換えの開始要求、更新プログラム、及びバッテリ60への電力供給有無などの情報を送信する。なお、以下においては、プログラム書き換えの開始要求は、単に書換要求と略称で記載することもある。   For example, the gateway 20 communicates with the control device 10 to be rewritten at a predetermined timing for rewriting the program in the control device 10. Then, the gateway 20 transmits information such as a program rewrite start request, an update program, and whether or not power is supplied to the battery 60 to the control device 10 to be rewritten. In the following, a program rewrite start request may be simply abbreviated as a rewrite request.

制御装置10は、電子制御装置(Electronic Control Unit)である。制御装置10は、少なくとも一つの演算処理装置(CPU)と、プログラムとデータとを記憶する記憶媒体としての少なくとも一つのメモリ装置(MMR)とを有する。制御装置10は、コンピュータによって読み取り可能な記憶媒体を備えるマイクロコンピュータによって提供される。記憶媒体は、コンピュータによって読み取り可能なプログラムを非一時的に格納する。記憶媒体は、半導体メモリ又は磁気ディスクなどによって提供されうる。さらに、制御装置10は、データなどを一時的に記憶する記憶媒体を含んでいてもよい。   The control device 10 is an electronic control unit. The control device 10 has at least one arithmetic processing unit (CPU) and at least one memory device (MMR) as a storage medium for storing programs and data. The control device 10 is provided by a microcomputer including a computer-readable storage medium. The storage medium stores a computer-readable program non-temporarily. The storage medium can be provided by a semiconductor memory or a magnetic disk. Furthermore, the control device 10 may include a storage medium that temporarily stores data and the like.

制御装置10は、一つのコンピュータ、又はデータ通信装置によってリンクされた一組のコンピュータ資源によって提供されうる。プログラムは、制御装置10によって実行されることによって、制御装置10をこの明細書に記載される装置として機能させ、この明細書に記載される方法を実行するように制御装置10を機能させる。制御装置10は、多様な要素を提供する。それらの要素の少なくとも一部は、機能を実行するための手段と呼ぶことができ、別の観点では、それらの要素の少なくとも一部は、構成的なブロック、又はモジュールと呼ぶことができる。   The control device 10 can be provided by one computer or a set of computer resources linked by a data communication device. The program is executed by the control device 10 to cause the control device 10 to function as a device described in this specification, and to cause the control device 10 to perform the method described in this specification. The control device 10 provides various elements. At least some of those elements can be referred to as means for performing the function, and in another aspect, at least some of those elements can be referred to as constituent blocks or modules.

具体的には、制御装置10は、CPUを含むマイコン11、メモリ装置に含まれる不揮発性メモリ12及び揮発性メモリ13、通信回路14、電源回路15などを備えている。制御装置10は、センター200から無線通信によって配信された更新プログラムを受信し、不揮発性メモリ12に記憶しているプログラムを更新プログラムに書き換えることができる。   Specifically, the control device 10 includes a microcomputer 11 including a CPU, a nonvolatile memory 12 and a volatile memory 13 included in the memory device, a communication circuit 14, a power supply circuit 15, and the like. The control device 10 can receive the update program distributed by wireless communication from the center 200 and can rewrite the program stored in the nonvolatile memory 12 into the update program.

マイコン11は、後程説明する電源回路15から電力供給されて動作する。また、マイコン11は、不揮発性メモリ12に記憶されたプログラムを、センター200から送信された更新プログラムに書き換える。一般的に、フラッシュメモリに代表される不揮発性メモリは、既に記憶されたデータを異なるデータに書き換える際に、予め書き換え対象の領域を消去する必要がある。つまり、マイコン11は、不揮発性メモリ12に記憶されたプログラムを消去してから、センター200から送信された更新プログラムを不揮発性メモリ12に書き込むことで、プログラムを更新プログラムに書き換える。ただし、不揮発性メモリの中には、書き換えの際に、予め書き換え対象の領域を消去する必要がない、例えば、強誘電体メモリ(FRAM、登録商標)も提案されている。このような不揮発性メモリ12を搭載するマイコン11においては、不揮発性メモリ12に記憶されたプログラムを消去する工程は省略され得る。以下の実施例では、書き換えの際に、予め書き換え対象の領域の消去を必要とする不揮発性メモリを搭載したマイコン11における構成および動作を記載するが、本開示はこれに限定されない。なお、制御装置10は、マイコン11がプログラムを実行することで、車両100に搭載された車載機器を制御する。   The microcomputer 11 operates with power supplied from a power supply circuit 15 described later. Further, the microcomputer 11 rewrites the program stored in the nonvolatile memory 12 with the update program transmitted from the center 200. In general, a nonvolatile memory represented by a flash memory needs to erase an area to be rewritten in advance when rewriting already stored data with different data. That is, the microcomputer 11 erases the program stored in the nonvolatile memory 12 and then writes the update program transmitted from the center 200 to the nonvolatile memory 12 to rewrite the program into the update program. However, for example, a ferroelectric memory (FRAM (registered trademark)) has been proposed as a non-volatile memory, in which it is not necessary to erase a region to be rewritten in advance at the time of rewriting. In the microcomputer 11 equipped with such a nonvolatile memory 12, the step of erasing the program stored in the nonvolatile memory 12 can be omitted. In the following embodiments, the configuration and operation of the microcomputer 11 equipped with a nonvolatile memory that needs to be erased in advance at the time of rewriting will be described, but the present disclosure is not limited to this. In addition, the control apparatus 10 controls the vehicle equipment mounted in the vehicle 100, when the microcomputer 11 runs a program.

不揮発性メモリ12は、マイコン11が実行するプログラムなどを記憶している。このプログラムは、例えば、制御装置10が車載機器を制御するための制御プログラムなどである。しかしながら、本開示のプログラムは、これに限定されない。   The nonvolatile memory 12 stores a program executed by the microcomputer 11. This program is, for example, a control program for the control device 10 to control the in-vehicle device. However, the program of the present disclosure is not limited to this.

図2に示すように、不揮発性メモリ12は、制御部12aと、複数のメモリセルアレイ12bを備えている。また、各メモリセルアレイ12bは、複数のメモリセル12cを含んでいる。つまり、不揮発性メモリ12は、各メモリセル12cにプログラムを記憶している。   As shown in FIG. 2, the nonvolatile memory 12 includes a control unit 12a and a plurality of memory cell arrays 12b. Each memory cell array 12b includes a plurality of memory cells 12c. That is, the nonvolatile memory 12 stores a program in each memory cell 12c.

制御部12aは、各メモリセル12cに記憶されたデータの読み出し、各メモリセル12cに記憶されたデータの消去、各メモリセル12cへのデータの書き込みを行う。制御部12aは、各メモリセルアレイ12bへ書き込みを行う場合、入力された書込データと、設定された書込電圧に応じて、書き込み対象のメモリセルアレイ12b(メモリセル12c)に対して書き込みパルス印加とベリファイを行う。ベリファイは、書き込み対象であるメモリセル12cのVthが所望の電圧を超えたかどうかを確認する処理である。   The control unit 12a reads data stored in each memory cell 12c, erases data stored in each memory cell 12c, and writes data to each memory cell 12c. When writing to each memory cell array 12b, the controller 12a applies a write pulse to the write target memory cell array 12b (memory cell 12c) according to the input write data and the set write voltage. And verify. The verify is a process for confirming whether Vth of the memory cell 12c to be written exceeds a desired voltage.

特に、本開示の制御部12aは、書込電圧として少なくとも二つの値を取り得る。つまり、制御部12aは、書込電圧として、第1書込電圧と、第1書込電圧よりも高電圧である第2書込電圧を用いることができる。また、第2書込電圧は、不揮発性メモリ12に記憶されたプログラムの保持期間を十分に確保できる程度の電圧である。   In particular, the control unit 12a of the present disclosure can take at least two values as the write voltage. That is, the control unit 12a can use the first write voltage and the second write voltage that is higher than the first write voltage as the write voltage. The second write voltage is a voltage that can sufficiently secure the retention period of the program stored in the nonvolatile memory 12.

さらに、本実施形態では、書込電圧として第3書込電圧を用いることができる制御部12aを採用している。第3書込電圧は、例えば、第2書込電圧と同等の値や、第2書込電圧よりも高電圧の値など、不揮発性メモリ12に記憶されたプログラムの保持期間を十分に確保できる程度の電圧であれば採用できる。よって、第1書込電圧は、第2書込電圧だけでなく、第3書込電圧よりも低電圧である。   Furthermore, in the present embodiment, the control unit 12a that can use the third write voltage as the write voltage is employed. The third write voltage can sufficiently secure the holding period of the program stored in the nonvolatile memory 12, such as a value equivalent to the second write voltage or a value higher than the second write voltage. Any voltage can be used. Therefore, the first write voltage is lower than the third write voltage as well as the second write voltage.

不揮発性メモリ12に書き込みを行う場合、メモリセル12cに対する書込電圧は、書き込まれたデータの保持期間(信頼性)を確保するために、書き込んだデータの読み出しに必要な最低限度のVthよりもある程度のマージンを持った高い電圧が設定される。よって、第2書込電圧や第3書込電圧は、最低限度のVthよりもある程度のマージンを持った高い電圧であると好ましい。ここでのデータは、更新プログラムなどである。なお、制御部12aは、例えばマイコン11のCPUからの命令に応じて、読み出し、消去、書き込みを行う。   When writing to the non-volatile memory 12, the write voltage for the memory cell 12c is higher than the minimum Vth necessary for reading the written data in order to ensure the retention period (reliability) of the written data. A high voltage with a certain margin is set. Therefore, it is preferable that the second write voltage and the third write voltage are higher voltages with a certain margin than the minimum Vth. The data here is an update program or the like. Note that the control unit 12a performs reading, erasing, and writing in accordance with a command from the CPU of the microcomputer 11, for example.

揮発性メモリ13は、マイコン11が演算した結果などを一時的に記憶しておく。通信回路14は、ゲートウェイ20と通信するための回路である。電源回路15は、バッテリ60から供給された電力をマイコン11が利用可能な電圧に変換して、マイコン11に電力供給する。   The volatile memory 13 temporarily stores the results calculated by the microcomputer 11. The communication circuit 14 is a circuit for communicating with the gateway 20. The power supply circuit 15 converts the power supplied from the battery 60 into a voltage that can be used by the microcomputer 11 and supplies the power to the microcomputer 11.

なお、制御装置10が提供する手段及び/又は機能は、実体的なメモリ装置に記録されたソフトウェア及びそれを実行するコンピュータ、ソフトウェアのみ、ハードウェアのみ、あるいはそれらの組み合わせによって提供することができる。例えば、制御装置10がハードウェアである電子回路によって提供される場合、それは多数の論理回路を含むデジタル回路、又はアナログ回路によって提供することができる。   The means and / or function provided by the control device 10 can be provided by software recorded in a substantial memory device and a computer that executes the software, only software, only hardware, or a combination thereof. For example, if the controller 10 is provided by an electronic circuit that is hardware, it can be provided by a digital circuit including a number of logic circuits, or an analog circuit.

ここで、図3〜図10を用いて、車載機器の処理動作に関して説明する。まずは、図3を用いて、ゲートウェイ20の処理動作に関して説明する。ゲートウェイ20は、通信機30を介して、センター200から書換要求があると、図3のフローチャートに示す処理を開始する。   Here, the processing operation of the in-vehicle device will be described with reference to FIGS. First, the processing operation of the gateway 20 will be described with reference to FIG. When the gateway 20 receives a rewrite request from the center 200 via the communication device 30, the gateway 20 starts the processing shown in the flowchart of FIG.

ステップS10では、センター200から更新プログラムを受信する。ゲートウェイ20は、センター200から送信された更新プログラムを、通信機30を介して受信する。   In step S10, an update program is received from the center 200. The gateway 20 receives the update program transmitted from the center 200 via the communication device 30.

ステップS11では、記憶部21に更新プログラムを保存する。ゲートウェイ20は、受信した更新プログラムを記憶部21に保存する。   In step S11, the update program is stored in the storage unit 21. The gateway 20 stores the received update program in the storage unit 21.

ステップS12では、更新プログラムの保存が完了したか否かを判定する。ゲートウェイ20は、受信した更新プログラムの記憶部21への保存が完了したか否かを判定し、完了したと判定した場合はステップS13へ進み、完了したと判定してない場合はステップS10へ戻る。   In step S12, it is determined whether saving of the update program is completed. The gateway 20 determines whether or not saving of the received update program in the storage unit 21 has been completed. If it is determined that the update program has been completed, the gateway 20 proceeds to step S13. If not, the gateway 20 returns to step S10. .

ステップS13では、バッテリ60への電力供給があるか否かを判定する。ゲートウェイ20は、上記のようにバッテリ60に対する電力供給の有無を判定し、バッテリ60への電力供給ありと判定した場合はステップS14へ進み、バッテリ60への電力供給なしと判定した場合はステップS15へ進む。   In step S13, it is determined whether or not there is power supply to the battery 60. The gateway 20 determines whether or not power is supplied to the battery 60 as described above. If it is determined that power is supplied to the battery 60, the gateway 20 proceeds to step S14. If it is determined that power is not supplied to the battery 60, step S15 is performed. Proceed to

このとき、ゲートウェイ20は、車両100に搭載された制御装置10からの情報に基づいて、バッテリ60への電力の供給有無を判定する。これによって、車載装置(ゲートウェイ20)は、バッテリ60への電力が供給されているか否かを判定するための回路を備えることなく、バッテリ60への電力の供給有無を判定することができる。しかしながら、本開示は、これに限定されず、バッテリ60への電力が供給されているか否かを判定するための回路を備えたゲートウェイ20でも採用できる。   At this time, the gateway 20 determines whether power is supplied to the battery 60 based on information from the control device 10 mounted on the vehicle 100. Thereby, the in-vehicle device (gateway 20) can determine whether or not to supply power to the battery 60 without providing a circuit for determining whether or not the power to the battery 60 is supplied. However, the present disclosure is not limited to this, and can also be adopted in the gateway 20 including a circuit for determining whether or not the power to the battery 60 is supplied.

ステップS14では、対象の制御装置10へ第3書換要求を送信する。つまり、ゲートウェイ20は、対象の制御装置10への開始要求として、第3書換要求を送信する。第3書換要求は、第3書込モードでのプログラムの書き換えを示す要求である。また、第3書込モードは、書込電圧を第3書込電圧として、書き込み対象のメモリセルアレイ12bに対して書き込みを行うモードである。なお、対象の制御装置10とは、更新プログラムに書き換えるプログラムを有している制御装置10である。   In step S14, a third rewrite request is transmitted to the target control apparatus 10. That is, the gateway 20 transmits a third rewrite request as a start request to the target control device 10. The third rewrite request is a request indicating program rewrite in the third write mode. The third write mode is a mode for writing to the write target memory cell array 12b using the write voltage as the third write voltage. The target control device 10 is a control device 10 having a program to be rewritten to an update program.

ステップS15では、対象の制御装置10へ第1書換要求を送信する。ゲートウェイ20は、対象の制御装置10への開始要求として、第1書換要求を送信する。第1書換要求は、第1書込モードでのプログラムの書き換えを示す要求である。また、第1書込モードは、書込電圧を第1書込電圧として、書き込み対象のメモリセルアレイ12bに対して書き込みを行うモードである。なお、ゲートウェイ20は、開始要求(第1書換要求又は第3書換要求)を送信すると、送信してからの経過時間の計時を開始する。ゲートウェイ20は、例えば車両100が駐車時などの場合、第1書換要求を送信する。   In step S15, a first rewrite request is transmitted to the target control device 10. The gateway 20 transmits a first rewrite request as a start request to the target control device 10. The first rewrite request is a request indicating program rewrite in the first write mode. The first write mode is a mode in which writing is performed to the write target memory cell array 12b using the write voltage as the first write voltage. When the gateway 20 transmits a start request (first rewrite request or third rewrite request), the gateway 20 starts measuring the elapsed time since the transmission. For example, when the vehicle 100 is parked, the gateway 20 transmits a first rewrite request.

ステップS16では、書換許可応答があるか否かを判定する。ゲートウェイ20は、開始要求を送信した制御装置10から書換許可応答があるか否かを判定し、書換許可応答ありと判定した場合はステップS17へ進み、書換許可応答ありと判定しなかった場合はステップS18へ進む。書換許可応答は、書き換え開始可能であることを示す応答である。つまり、ゲートウェイ20は、書換許可応答がある場合、制御装置10がプログラム書き換え開始可能な状態とみなしてステップS17へ進み、書換許可応答がない場合、制御装置10がプログラム書き換え開始可能な状態でないとみなしてステップS18へ進む。   In step S16, it is determined whether there is a rewrite permission response. The gateway 20 determines whether or not there is a rewrite permission response from the control device 10 that has transmitted the start request. When it is determined that there is a rewrite permission response, the gateway 20 proceeds to step S17, and when it is not determined that there is a rewrite permission response. Proceed to step S18. The rewrite permission response is a response indicating that rewriting can be started. That is, when there is a rewrite permission response, the gateway 20 regards the control device 10 as being in a state where the program rewriting can be started, and proceeds to step S17. Accordingly, the process proceeds to step S18.

ステップS17では、対象の制御装置10に対して更新プログラムを送信する。ゲートウェイ20は、記憶部21に保存してある更新プログラムを、制御装置10に対して送信する。   In step S <b> 17, the update program is transmitted to the target control device 10. The gateway 20 transmits the update program stored in the storage unit 21 to the control device 10.

ステップS18では、タイムアウト時間経過であるか否かを判定する。ゲートウェイ20は、開始要求を送信してからの経過時間が、タイムアウト時間を経過したか否かを判定する。そして、ゲートウェイ20は、経過時間がタイムアウト時間を経過したと判定してない場合はステップS16へ戻る。つまり、ゲートウェイ20は、開始要求を送信してからの経過時間がタイムアウト時間を経過するまで、書換許可応答を待ち続ける。   In step S18, it is determined whether or not a timeout time has elapsed. The gateway 20 determines whether or not the elapsed time after transmitting the start request has exceeded the timeout time. If the gateway 20 does not determine that the elapsed time has exceeded the timeout time, the gateway 20 returns to step S16. That is, the gateway 20 continues to wait for a rewrite permission response until the elapsed time since the transmission of the start request has passed the timeout time.

一方、ゲートウェイ20は、経過時間がタイムアウト時間を経過したと判定した場合はステップS19へ進む。つまり、ゲートウェイ20は、制御装置10が、プログラム書き換えが不可の状態であるとみなしてステップS19へ進む。   On the other hand, if the gateway 20 determines that the elapsed time has exceeded the timeout time, the gateway 20 proceeds to step S19. That is, the gateway 20 considers that the control device 10 is in a state in which the program cannot be rewritten, and proceeds to step S19.

なお、タイムアウト時間は、予め決められた値を採用することができる。タイムアウト時間は、例えば、通常(異常が発生していないなど)であれば、開始要求を送信してから書換許可応答を受信できる時間や、この時間にマージンを持たせた時間などである。   Note that a predetermined value can be adopted as the timeout time. The time-out time is, for example, a time during which a rewrite permission response can be received after transmitting a start request, or a time with a margin for this time, if it is normal (no abnormality has occurred).

ステップS19では、記憶部21の更新プログラムを削除する。ゲートウェイ20は、対象の制御装置10に対して更新プログラムを送信した場合や、対象の制御装置10がプログラム書き換え不可の状態である場合、記憶部21の更新プログラムを削除する。このように、車載機器は、開始要求を送信してからの経過時間がタイムアウト時間を経過した場合、プログラムの書き換えを行わずに終了する。   In step S19, the update program in the storage unit 21 is deleted. When the gateway 20 transmits an update program to the target control device 10 or when the target control device 10 is in a state in which the program cannot be rewritten, the gateway 20 deletes the update program in the storage unit 21. As described above, when the elapsed time from the transmission of the start request exceeds the timeout time, the in-vehicle device ends without rewriting the program.

なお、車両100は、ゲートウェイ20が開始要求を送信した後に、バッテリ60への電力供給状態が切り換わることも起こり得る。このため、ゲートウェイ20は、ステップS17で更新プログラムを送信する前に、再度、ステップS13を実行してもよい。この場合、ゲートウェイ20は、ここでのバッテリ60への電力供給有無の判定によって開始要求を変更する。   Note that, in the vehicle 100, the power supply state to the battery 60 may be switched after the gateway 20 transmits the start request. For this reason, the gateway 20 may execute step S13 again before transmitting the update program in step S17. In this case, the gateway 20 changes the start request by determining whether power is supplied to the battery 60 here.

つまり、ゲートウェイ20は、ステップS15で第1書換要求を送信したものの、ステップS17で更新プログラムを送信する前にバッテリ60への電力供給がありと判定した場合は、開始要求として第3書換要求を送信する。逆に、ゲートウェイ20は、ステップS14で第3書換要求を送信したものの、ステップS17で更新プログラムを送信する前に、バッテリ60への電力供給がなしと判定した場合は、開始要求として第1書換要求を送信する。   That is, if the gateway 20 transmits the first rewrite request in step S15 but determines that there is power supply to the battery 60 before transmitting the update program in step S17, the gateway 20 issues a third rewrite request as a start request. Send. Conversely, when the gateway 20 has transmitted the third rewrite request in step S14, but determines that there is no power supply to the battery 60 before transmitting the update program in step S17, the first rewrite is made as a start request. Send a request.

これによって、ゲートウェイ20は、制御装置10に送信する開始要求を、バッテリ60に対する電力供給の状態に確実に対応したものとすることができる。つまり、車載装置は、書込電圧を第3書込電圧として更新プログラムを書き込む際に、確実にバッテリ60への電力の供給がなされている状況で、更新プログラムの書き込みを行うことができる。しかしながら、本開示は、これに限定されない。   Accordingly, the gateway 20 can reliably correspond to the start request transmitted to the control device 10 to the state of power supply to the battery 60. That is, the in-vehicle device can write the update program in a situation where power is reliably supplied to the battery 60 when the update program is written using the write voltage as the third write voltage. However, the present disclosure is not limited to this.

次に、図4を用いて、制御装置10の処理動作、つまり、プログラムを書き換える対象の制御装置10の処理動作に関して説明する。制御装置10は、ゲートウェイ20から送信された開始要求を受信すると、図4のフローチャートに示す処理を開始する。   Next, the processing operation of the control device 10, that is, the processing operation of the control device 10 to be rewritten is described with reference to FIG. When receiving the start request transmitted from the gateway 20, the control device 10 starts the processing shown in the flowchart of FIG.

ステップS20では、プログラム書き換え可能状態であるか否かを判定する。制御装置10は、例えば書き換え対象となる不揮発性メモリ12を何らかの処理のために使用している場合、プログラム書き換えが可能でない状態と判定する。一方、制御装置10は、例えば書き換え対象となる不揮発性メモリ12を使用していない場合、プログラム書き換えが可能状態と判定する。制御装置10は、プログラム書き換え可能状態であると判定した場合、ステップS21へ進み、プログラム書き換え可能でない状態と判定した場合、図4の処理を終了する。   In step S20, it is determined whether or not the program is rewritable. For example, when the nonvolatile memory 12 to be rewritten is used for some processing, the control device 10 determines that the program cannot be rewritten. On the other hand, for example, when the nonvolatile memory 12 to be rewritten is not used, the control device 10 determines that the program can be rewritten. When it is determined that the program is rewritable, the control device 10 proceeds to step S21. When it is determined that the program is not rewritable, the process of FIG.

ステップS21では、ゲートウェイ20に書換許可応答を送信する。制御装置10は、ゲートウェイ20に対して書換許可応答を送信することで、更新プログラムの送信を要求する。   In step S21, a rewrite permission response is transmitted to the gateway 20. The control device 10 requests transmission of the update program by transmitting a rewrite permission response to the gateway 20.

ステップS22では、書換要求が第1書換要求であるか否かを判定する。制御装置10は、第1モードでプログラムの書き換えを行うか、第3モードでプログラムの書き換えを行うかを判定するために、書換要求が第1書換要求であるか否かを判定する。制御装置10は、書換要求が第1書換要求であると判定した場合はステップS23へ進み、書換要求が第1書換要求であると判定しなかった場合はステップS24へ進む。   In step S22, it is determined whether or not the rewrite request is the first rewrite request. The control device 10 determines whether or not the rewrite request is the first rewrite request in order to determine whether to rewrite the program in the first mode or to rewrite the program in the third mode. When it is determined that the rewrite request is the first rewrite request, the control device 10 proceeds to step S23, and when it is not determined that the rewrite request is the first rewrite request, the control device 10 proceeds to step S24.

ステップS23では、第1書込モードでプログラムの書き換えを行う(第1書換部)。制御装置10は、書込電圧を第1書込電圧として更新プログラムを書き込みなどして、不揮発性メモリ12に記憶されているプログラムの書き換えを行う。つまり、制御装置10は、センター200から更新プログラムへの書き換えの要求があり、バッテリ60に電力が供給されていない場合、書込電圧を第1書込電圧として更新プログラムを書き込む、と言える。   In step S23, the program is rewritten in the first writing mode (first rewriting unit). The control device 10 rewrites the program stored in the nonvolatile memory 12 by writing an update program using the write voltage as the first write voltage. That is, it can be said that the control device 10 writes the update program with the write voltage as the first write voltage when there is a rewrite request from the center 200 to the update program and no power is supplied to the battery 60.

一方、ステップS24では、第3書込モードでプログラムの書き換えを行う(第3書換部)。制御装置10は、書込電圧を第3書込電圧として更新プログラムを書き込みなどして、不揮発性メモリ12に記憶されているプログラムの書き換えを行う。つまり、制御装置10は、センター200から更新プログラムへの書き換えの要求があり、バッテリ60に電力が供給されている場合、書込電圧を第3書込電圧として更新プログラムを書き込むことで、更新プログラムに書き換える、と言える。   On the other hand, in step S24, the program is rewritten in the third writing mode (third rewriting unit). The control device 10 rewrites the program stored in the nonvolatile memory 12 by writing an update program using the write voltage as the third write voltage. That is, when there is a rewrite request from the center 200 to the update program and power is supplied to the battery 60, the control device 10 writes the update program with the write voltage as the third write voltage, thereby updating the update program. It can be said that it is rewritten.

上記のように、第1書込電圧は、第3書込電圧よりも低電圧である。よって、制御装置10は、バッテリ60に電力が供給されていない場合、バッテリ60に電力が供給されている場合よりも、書込電圧を低電圧として更新プログラムを不揮発性メモリ12に書き込むことで、プログラムを更新プログラムに書き換える。なお、第1書込モード及び第3書込モード時の処理に関しては、後程詳しく説明する。   As described above, the first write voltage is lower than the third write voltage. Therefore, when the power is not supplied to the battery 60, the control device 10 writes the update program in the nonvolatile memory 12 with the write voltage being lower than when the power is supplied to the battery 60. Rewrite the program with an update program. The processing in the first writing mode and the third writing mode will be described in detail later.

ステップS25では、書込モードを記憶する。制御装置10は、第2書込モードでプログラムの書き換えを行うか否かを判定するために、実行した書込モードを不揮発性メモリ12に記憶する。   In step S25, the write mode is stored. The control device 10 stores the executed write mode in the nonvolatile memory 12 in order to determine whether or not to rewrite the program in the second write mode.

次に、図5を用いて、制御装置10のシャットダウン時の書換処理に関して説明する。制御装置10は、イグニッションスイッチ70がオンからオフに切り換わると、図5のフローチャートに示す処理を開始する。つまり、図5は、制御装置10のシャットダウン処理時に行なわれる書換処理を示すフローチャートである。なお、バッテリ60は、イグニッションスイッチ70がオンの場合、エンジン40の動力を利用してオルタネータ50が発電し、オルタネータ50から電力供給がなされる。よって、イグニッションスイッチ70がオンからオフに切り換わった場合、バッテリ60は、電力供給が行われた後の状態とみなすことができる。   Next, the rewriting process at the time of shutdown of the control apparatus 10 is demonstrated using FIG. When the ignition switch 70 is switched from on to off, the control device 10 starts the process shown in the flowchart of FIG. That is, FIG. 5 is a flowchart showing the rewriting process performed during the shutdown process of the control device 10. The battery 60 is supplied with electric power from the alternator 50 by using the power of the engine 40 to generate power when the ignition switch 70 is on. Therefore, when the ignition switch 70 is switched from on to off, the battery 60 can be regarded as a state after power is supplied.

ステップS30では、前回の書込モードが第1書込モードであったか否かを判定する。制御装置10は、不揮発性メモリ12を確認して、前回の書込モードが第1書込モードであったか否かを判定する。そして、制御装置10は、前回の書込モードが第1書込モードであったと判定した場合はステップS31へ進み、前回の書込モードが第1書込モードであったと判定しなかった場合は図5の処理を終了する。   In step S30, it is determined whether or not the previous writing mode was the first writing mode. The control device 10 checks the nonvolatile memory 12 and determines whether or not the previous write mode is the first write mode. Then, when it is determined that the previous writing mode is the first writing mode, the control device 10 proceeds to step S31, and when it is not determined that the previous writing mode is the first writing mode. The process of FIG. 5 is terminated.

ステップS31では、第2書込モードでプログラムの書き換えを行う(第2書換部)。制御装置10は、書込電圧を第2書込電圧として更新プログラムを書き込みなどして、不揮発性メモリ12に記憶されているプログラムの書き換えを行う。第2書込モードは、書込電圧を第2書込電圧として、書き込み対象のメモリセルアレイ12bに対して書き込みを行うモードである。   In step S31, the program is rewritten in the second writing mode (second rewriting unit). The control device 10 rewrites the program stored in the nonvolatile memory 12 by writing an update program using the write voltage as the second write voltage. The second write mode is a mode in which writing is performed to the write target memory cell array 12b using the write voltage as the second write voltage.

つまり、制御装置10は、バッテリ60に電力が供給された後であり、イグニッションスイッチ70がオフとなり、バッテリ60から車載装置への電力供給が停止されるまでの間に更新プログラムを書き込む、と言える。これによって、車載装置は、制御装置10が不揮発性メモリ12のプログラムを実行していない時に、そのプログラムを書き換えることができる。これは、例えば、対象の制御装置10がエンジン40を制御するものである場合に好適である。   That is, it can be said that the control device 10 writes the update program after the power is supplied to the battery 60 and before the ignition switch 70 is turned off and the power supply from the battery 60 to the in-vehicle device is stopped. . Thereby, the in-vehicle device can rewrite the program when the control device 10 is not executing the program of the nonvolatile memory 12. This is suitable, for example, when the target control device 10 controls the engine 40.

また、上記のように、第2書込電圧は、第1書込電圧よりも高電圧である。よって、制御装置10は、第1書込モードで更新プログラムへの書き換えを実施した場合、バッテリ60に電力が供給された後に、第2書込電圧として、第1書込モード時と同じ更新プログラムを不揮発性メモリ12に書き込むことで、更新プログラムに書き換える。このように、制御装置10は、バッテリ60への電力供給が行われ、且つ、前回のプログラム書き換えが第1書込モードで行われた場合にのみ、第2書込モードで再書き込みを行う。   Further, as described above, the second write voltage is higher than the first write voltage. Therefore, when rewriting to the update program in the first write mode, the control device 10 uses the same update program as in the first write mode as the second write voltage after power is supplied to the battery 60. Is written into the nonvolatile memory 12 to be rewritten into an update program. In this way, the control device 10 performs rewriting in the second writing mode only when power is supplied to the battery 60 and the previous program rewriting is performed in the first writing mode.

制御装置10は、第2書込モードで更新プログラムを書き込む場合、第1書込モードで更新プログラムを書き込んだ不揮発性メモリ12における領域と同じ領域に、更新プログラムを書き込むと好ましい。これによって、制御装置10は、不揮発性メモリ12におけるプログラムを書き込む領域が増加することを抑制できる。   When writing the update program in the second write mode, the control device 10 preferably writes the update program in the same area as the area in the nonvolatile memory 12 in which the update program is written in the first write mode. As a result, the control device 10 can suppress an increase in the area in which the program is written in the nonvolatile memory 12.

しかしながら、本開示は、これに限定されず、第2書込モード時において、第1書込モードで更新プログラムを書き込んだ不揮発性メモリ12における領域と異なる領域に更新プログラムを書き込んでもよい。これによっても、本開示は、プログラムの保持期間を確保しつつ、バッテリの電力消費を抑制することができるという、目的を達成することができる。   However, the present disclosure is not limited to this, and the update program may be written in an area different from the area in the nonvolatile memory 12 in which the update program is written in the first write mode in the second write mode. Also by this, this indication can achieve the object that the power consumption of a battery can be controlled, ensuring the retention period of a program.

上記のように、制御装置10は、第2書込モード時、ゲートウェイ20からの要求ではなく、第1書込モードの後で、バッテリ60への電力供給が行われたことをトリガとして、プログラムの書き換えを実施する。その一例として、本実施形態では、イグニッションスイッチ70がオンからオフに切り替わったことで、第2書込モードでの書き込みを実施する例を採用した。   As described above, in the second write mode, the control device 10 uses a program triggered by the power supply to the battery 60 after the first write mode, not the request from the gateway 20. Perform rewriting of As an example, the present embodiment employs an example in which writing in the second writing mode is performed when the ignition switch 70 is switched from on to off.

しかしながら、本開示は、これに限定されない。制御装置10は、第1書込モードの後で、バッテリに電力が供給されている間に、第2書込モードで更新プログラムを書き込むものであってもよい(第2書換部)。   However, the present disclosure is not limited to this. The control device 10 may write the update program in the second writing mode while the power is supplied to the battery after the first writing mode (second rewriting unit).

これによって、制御装置10は、一旦バッテリ60への電力が供給された後に、バッテリ60への電力の供給が停止された状況で、更新プログラムを書き込む場合よりも、バッテリ60上がりを抑制することができる。つまり、制御装置10は、バッテリ60への電力が供給されていない場合に、高電圧で更新プログラムを書き込む場合よりも、バッテリ上がりを抑制することができる。これは、例えば、対象の制御装置10が電気自動車に搭載されている場合や、エンジン40が動作中にプログラムの書き換えが可能なものである場合に好適である。   As a result, the control device 10 can suppress the battery 60 from rising more than the case where the update program is written in a situation where the power supply to the battery 60 is stopped after the power supply to the battery 60 is once stopped. it can. That is, the control device 10 can suppress the battery from running higher than when writing the update program at a high voltage when the power to the battery 60 is not supplied. This is suitable, for example, when the target control device 10 is mounted on an electric vehicle or when the program can be rewritten while the engine 40 is operating.

次に、図6を用いて、制御装置10の第1書込モード時の処理動作に関して説明する。制御装置10は、ステップS22でYES判定すると、図6のフローチャートに示す処理を開始する。つまり、制御装置10は、バッテリ60への電力供給がないと判断されたことでゲートウェイ20から送信された第1書換要求を受信した場合、図6のフローチャートに示す処理を開始する。   Next, the processing operation in the first write mode of the control device 10 will be described with reference to FIG. If the determination is YES in step S22, the control device 10 starts the process shown in the flowchart of FIG. That is, when the control device 10 receives the first rewrite request transmitted from the gateway 20 because it is determined that there is no power supply to the battery 60, the control device 10 starts the process illustrated in the flowchart of FIG.

ステップS40では、書込電圧を第1書込電圧に設定する。制御部12aは、第1書込モードで更新プログラムを書き込むために、書込電圧を第1書込電圧に設定する。   In step S40, the write voltage is set to the first write voltage. The controller 12a sets the write voltage to the first write voltage in order to write the update program in the first write mode.

ステップS41では、書き込み対象のメモリセルアレイ12bのプログラムを消去する。一般的に、例えばフラッシュメモリなどの不揮発性メモリ12は、1から0の書き込みのみ可能なため、書き込みの事前に一度格納されているデータを消去する必要がある。よって、制御部12aは、更新プログラムを書き込む前に、書き込み対象のメモリセルアレイ12bのプログラムを消去する。   In step S41, the program in the memory cell array 12b to be written is erased. In general, for example, the nonvolatile memory 12 such as a flash memory can only write 1 to 0. Therefore, it is necessary to erase data stored once before writing. Therefore, the controller 12a erases the program in the write target memory cell array 12b before writing the update program.

ステップS42では、更新プログラムを書込データとして制御部12aに入力する。例えば、マイコン11のCPUは、通信回路14を介して受信した更新プログラムを制御部12aに入力する。   In step S42, the update program is input to the control unit 12a as write data. For example, the CPU of the microcomputer 11 inputs the update program received via the communication circuit 14 to the control unit 12a.

ステップS43では、書込データに応じたパルスをメモリセル12cに印加する。制御部12aは、各メモリセルアレイ12bへ書き込みを行う場合、入力された書込データと、設定された書込電圧に応じて、書き込み対象のメモリセルアレイ12b(メモリセル12c)に対して書き込みのためのパルスを印加する。   In step S43, a pulse corresponding to the write data is applied to the memory cell 12c. When writing to each memory cell array 12b, the controller 12a writes data to the write target memory cell array 12b (memory cell 12c) according to the input write data and the set write voltage. Apply the pulse.

ステップS44では、メモリセル12cのVthが狙い値を超えたか否かを判定する(ベリファイ)。制御部12aは、メモリセル12cのVthが狙い値を超えたと判定していない場合は、書込データの書き込みが完了していないとみなしてステップS43へ戻る。また、制御部12aは、メモリセル12cのVthが狙い値を超えたと判定した場合は、書込データの書き込みが完了したとみなして図6の処理を終了する。   In step S44, it is determined whether or not Vth of the memory cell 12c exceeds the target value (verify). If the control unit 12a does not determine that the Vth of the memory cell 12c has exceeded the target value, the control unit 12a regards that writing of the write data has not been completed, and returns to step S43. If the control unit 12a determines that the Vth of the memory cell 12c has exceeded the target value, the control unit 12a regards the writing of the write data as being completed, and ends the process of FIG.

このように、制御部12aは、書き込みのためのパルス印加とベリファイを繰り返して、徐々に所望のVthに近づけることで、書込データをメモリセルアレイ12bに書き込む。よって、本開示の車載装置は、車両100が駐車している状況であっても、不揮発性メモリ12に記憶されているプログラムを更新プログラムに書き換えることができる。   As described above, the control unit 12a writes the write data to the memory cell array 12b by repeatedly applying the pulse for writing and verifying and gradually bringing it closer to the desired Vth. Therefore, the in-vehicle device of the present disclosure can rewrite the program stored in the nonvolatile memory 12 into the update program even when the vehicle 100 is parked.

次に、図7を用いて、制御装置10の第2書込モード時の処理動作に関して説明する。制御装置10は、ステップS30でYES判定すると、図7のフローチャートに示す処理を開始する。   Next, the processing operation in the second writing mode of the control device 10 will be described with reference to FIG. If the determination is YES in step S30, the control device 10 starts the process shown in the flowchart of FIG.

ステップS50では、書込電圧を第2書込電圧に設定する。制御部12aは、第2書込モードで更新プログラムを書き込むために、書込電圧を第2書込電圧に設定する。   In step S50, the write voltage is set to the second write voltage. The controller 12a sets the write voltage to the second write voltage in order to write the update program in the second write mode.

ステップS51では、書き込み対象のメモリセルアレイ12bの更新プログラムを揮発性メモリ13に保存する。例えばマイコン11のCPUは、第1書込モードで書き込まれた更新プログラムを、書込電圧を高電圧として、再度不揮発性メモリ書き込むために、書き込み対象のメモリセルアレイ12bの更新プログラムを揮発性メモリ13に保存する。この更新プログラムは、ステップS53、S54で不揮発性メモリ12に書き込まれると、揮発性メモリ13に記憶させておく必要がない。よって、マイコン11のCPUは、更新プログラムを揮発性メモリ13に一時的に保存する、と言える。   In step S51, the update program of the write target memory cell array 12b is stored in the volatile memory 13. For example, the CPU of the microcomputer 11 writes the update program written in the first write mode to the volatile memory 13 in order to write the update program in the write target memory cell array 12b again with the write voltage as a high voltage. Save to. If this update program is written in the non-volatile memory 12 in steps S53 and S54, it is not necessary to store the update program in the volatile memory 13. Therefore, it can be said that the CPU of the microcomputer 11 temporarily stores the update program in the volatile memory 13.

ステップS52では、更新プログラムを書込データとして制御部12aに入力する。例えば、マイコン11のCPUは、揮発性メモリ13に保存した更新データを書込データとして制御部12aに入力する。   In step S52, the update program is input to the control unit 12a as write data. For example, the CPU of the microcomputer 11 inputs update data stored in the volatile memory 13 to the control unit 12a as write data.

ステップS53、S54は、ステップS43、S44と同様であるため、ステップS43、S44を参照することができる。   Since steps S53 and S54 are the same as steps S43 and S44, steps S43 and S44 can be referred to.

以上のように、第2書込モードは、既に不揮発性メモリ12に更新プログラムが書き込まれている状態で開始される。このため、制御部12aは、同じ書込データを、書込電圧を変えて再書き込みする。   As described above, the second write mode is started in a state where the update program has already been written in the nonvolatile memory 12. Therefore, the control unit 12a rewrites the same write data while changing the write voltage.

第1書込モードで書き込んだ場合、メモリセル12cのVth分布は、図9に示すようになる。これに対して、第2書込モードで書き込んだ場合、メモリセル12cのVth分布は、図10に示すようになる。図10には、第1書込モード時のVthと第2書込モード時のVthとを比較するために、第1書込モード時のVth分布を破線で示している。   When data is written in the first write mode, the Vth distribution of the memory cell 12c is as shown in FIG. On the other hand, when data is written in the second write mode, the Vth distribution of the memory cell 12c is as shown in FIG. In FIG. 10, in order to compare Vth in the first write mode and Vth in the second write mode, the Vth distribution in the first write mode is indicated by a broken line.

次に、図8を用いて、制御装置10の第3書込モード時の処理動作に関して説明する。制御装置10は、ステップS22でNO判定すると、図8のフローチャートに示す処理を開始する。つまり、制御装置10は、バッテリ60への電力供給があると判断されたことでゲートウェイ20から送信された第3書換要求を受信した場合、図8のフローチャートに示す処理を開始する。   Next, the processing operation of the control device 10 in the third write mode will be described with reference to FIG. If NO is determined in step S22, the control device 10 starts the process shown in the flowchart of FIG. That is, when it is determined that there is power supply to the battery 60 and the control device 10 receives the third rewrite request transmitted from the gateway 20, the control device 10 starts the process illustrated in the flowchart of FIG. 8.

ステップS60では、書込電圧を第3書込電圧に設定する。制御部12aは、第3書込モードで更新プログラムを書き込むために、書込電圧を第3書込電圧に設定する。なお、ステップS61〜S64は、ステップS41〜S44と同様であるため、ステップS41〜S44を参照することができる。   In step S60, the write voltage is set to the third write voltage. The controller 12a sets the write voltage to the third write voltage in order to write the update program in the third write mode. Since steps S61 to S64 are the same as steps S41 to S44, steps S41 to S44 can be referred to.

このように、本開示の車載装置は、バッテリ60への電力供給がなされている状況で、プログラムを更新プログラムに書き換える場合、書込電圧として第3書込電圧を採用する。つまり、本開示の車載装置は、バッテリ上がりの虞が少ない状況では、書込電圧を第3書込電圧として更新プログラムを不揮発性メモリ12に書き込むため、不揮発性メモリ12に記憶されたプログラムの保持期間を十分に確保できる。なお、第3書込モードでのプログラムの書き換えは、通常時の書き換えと言うことができる。   As described above, the in-vehicle device according to the present disclosure employs the third write voltage as the write voltage when the program is rewritten to the update program in a state where power is supplied to the battery 60. In other words, the in-vehicle device according to the present disclosure stores the program stored in the nonvolatile memory 12 in order to write the update program to the nonvolatile memory 12 using the write voltage as the third write voltage in a situation where there is little risk of battery exhaustion. A sufficient period can be secured. Note that rewriting of a program in the third writing mode can be said to be rewriting in a normal time.

以上のように、車載装置は、更新プログラムへの書き換えの要求があり、バッテリ60に電力が供給されていない場合、書込電圧を第1書込電圧、すなわち第2書込電圧よりも低電圧として更新プログラムを不揮発性メモリに書き込む。これによって、車載装置は、バッテリ60に電力が供給されていない場合において、プログラムの書き換えによるバッテリ60の電力消費を抑えることができる。よって、車載装置は、プログラムを書き換えた後に車両100が放置されたとしても、バッテリ上がりを抑制できる。   As described above, the in-vehicle device has a request to rewrite the update program, and when power is not supplied to the battery 60, the in-vehicle device sets the write voltage to be lower than the first write voltage, that is, the second write voltage. As a result, the update program is written in the nonvolatile memory. Accordingly, the in-vehicle device can suppress power consumption of the battery 60 due to rewriting of the program when power is not supplied to the battery 60. Therefore, even if the vehicle-mounted device is left unattended after rewriting the program, the in-vehicle device can suppress the battery running out.

しかしながら、車載装置は、第1書込電圧で更新プログラムを書き込んだままでは、書き込まれた更新プログラムの保持期間が、第2書込電圧や第3書込電圧で書き込んだ場合よりも短い。   However, in the in-vehicle device, if the update program is written at the first write voltage, the retention period of the written update program is shorter than when the update program is written at the second write voltage or the third write voltage.

そこで、本開示は、第1書込電圧でプログラムの書き換えを実施した場合、それ以降にバッテリ60に電力が供給された後に、第1書込電圧として書き込んだ更新プログラムと同じ更新プログラムを、書込電圧を第2書込電圧として不揮発性メモリ12に書き込む。つまり、車載装置は、バッテリ60の充電後に、一般的な0書き込み後のVthとなるように同じ更新プログラムの書き込みを再度行う。これによって、車載装置、更新プログラムの保持期間を確保することができる。すなわち、車載装置は、更新プログラムに書き換えられた、不揮発性メモリ12に記憶されているプログラムの保持期間を確保することができる。このように、車載装置は、プログラムの保持期間を確保しつつ、バッテリ上がりを抑制できる。   Therefore, in the present disclosure, when the program is rewritten at the first write voltage, the same update program as the update program written as the first write voltage after the power is supplied to the battery 60 thereafter is written. The built-in voltage is written to the nonvolatile memory 12 as the second write voltage. That is, after the battery 60 is charged, the in-vehicle device writes the same update program again so that the Vth after the general 0 writing is obtained. As a result, it is possible to ensure the retention period of the in-vehicle device and the update program. That is, the in-vehicle device can ensure a retention period of the program stored in the nonvolatile memory 12 that has been rewritten with the update program. In this way, the in-vehicle device can suppress battery exhaustion while ensuring a program retention period.

さらに、車載装置は、書込電圧を第2書込電圧として書き込む場合、バッテリ60に電力が供給された後であるため、書き込みによってバッテリ60の電力を消費したとしても、バッテリ上がりの可能性を低減することができる。   Furthermore, when the in-vehicle device writes the write voltage as the second write voltage, it is after the power is supplied to the battery 60. Therefore, even if the power of the battery 60 is consumed by the write, the possibility of the battery running out is increased. Can be reduced.

なお、本実施形態では、センター200から更新プログラムへの書換要求があり、バッテリ60に電力が供給されていない場合に、書込電圧を第1書込電圧として更新プログラムを不揮発性メモリ12に書き込む例を採用した。しかしながら、本開示は、これに限定されない。車載装置は、センター200から更新プログラムへの書換要求があり、バッテリ60に電力が供給されてなく、且つ、車両100が駐車状態の場合に、書込電圧を第1書込電圧として更新プログラムを不揮発性メモリ12に書き込んでもよい(第1書換部)。   In the present embodiment, when there is a rewrite request from the center 200 to the update program and no power is supplied to the battery 60, the update program is written in the nonvolatile memory 12 with the write voltage as the first write voltage. An example was taken. However, the present disclosure is not limited to this. The in-vehicle device has a rewrite request from the center 200 to the update program, the power is not supplied to the battery 60, and the vehicle 100 is parked, and the update program is executed with the write voltage as the first write voltage. You may write in the non-volatile memory 12 (1st rewriting part).

車両100は、燃費の節約や排出ガスの低減などを目的として、信号待ちの間などにエンジンを停止させる機能を有しているものがある。この場合、車両100は、信号待ちの状態から信号が変わって運転手が発進操作をすることなどでエンジン40を再始動する。このように、車両100は、比較的短時間でエンジン40を再始動することになる。   Some vehicles 100 have a function of stopping the engine while waiting for a signal for the purpose of saving fuel consumption or reducing exhaust gas. In this case, the vehicle 100 restarts the engine 40 when the signal is changed from the signal waiting state and the driver performs a starting operation. Thus, the vehicle 100 restarts the engine 40 in a relatively short time.

バッテリ60は、このようにエンジン40が停止している間、電力の供給が停止される。しかしながら、エンジン40は、比較的短時間で再始動される。このため、バッテリ60への電力供給も比較的短時間で再開される。   The battery 60 is stopped from supplying power while the engine 40 is stopped. However, the engine 40 is restarted in a relatively short time. For this reason, the power supply to the battery 60 is also resumed in a relatively short time.

制御装置10は、単にバッテリ60に電力が供給されていないことで、第1書込電圧として更新プログラムを書き込んだ場合、比較的短時間でバッテリ60への電力供給が再開される状況でも、第1書込電圧として更新プログラムを書き込むことになる。つまり、制御装置10は、バッテリ上がりの可能性が低い状況であっても書込電圧を第1書込電圧にすることになる。   Even if the power supply to the battery 60 is resumed in a relatively short time when the control device 10 simply writes the update program as the first write voltage because the power is not supplied to the battery 60, The update program is written as one write voltage. That is, the control device 10 sets the write voltage to the first write voltage even in a situation where the possibility of running out of the battery is low.

これに対して、制御装置10は、バッテリに電力が供給されていない場合であり、且つ、車両100が駐車状態の場合に、書込電圧を第1書込電圧にすることで、バッテリ上がりの可能性が低い状況で書込電圧を第1書込電圧にすることを抑制できる。なお、制御装置10は、イグニッションスイッチ70や他の制御装置からの信号に基づいて、駐車状態であるか否かを判定することができる。制御装置10は、例えば、イグニッションスイッチ70がオフや、ギヤがパーキングレンジなどの場合に、車両100が駐車状態と判定する。   On the other hand, the control device 10 is a case where power is not supplied to the battery, and when the vehicle 100 is parked, the writing voltage is set to the first writing voltage, thereby increasing the battery power. It is possible to suppress the write voltage from being set to the first write voltage in a situation where the possibility is low. In addition, the control apparatus 10 can determine whether it is a parking state based on the signal from the ignition switch 70 or another control apparatus. For example, when the ignition switch 70 is off or the gear is in the parking range, the control device 10 determines that the vehicle 100 is in the parking state.

以上、本開示の好ましい実施形態について説明した。しかしながら、本開示は、上記実施形態に何ら制限されることはなく、本開示の趣旨を逸脱しない範囲において、種々の変形が可能である。以下に、本開示のその他の形態として、変形例1、変形例2に関して説明する。   The preferred embodiments of the present disclosure have been described above. However, the present disclosure is not limited to the above embodiment, and various modifications can be made without departing from the spirit of the present disclosure. Hereinafter, Modification 1 and Modification 2 will be described as other embodiments of the present disclosure.

(変形例1)
まず、図11を用いて、変形例1における車載装置に関して説明する。本変形例では、上記実施形態と同様の箇所が多いため、上記実施形態と異なる点を中心に説明する。変形例1の車載装置は、主に、制御装置10の処理動作が異なる。なお、本変形例では、便宜的に、上記実施形態と同じ符号を用いる。また、図11における図4と同じ処理に関しては、図4と同じステップ番号を用いる。
(Modification 1)
First, the in-vehicle device in Modification 1 will be described with reference to FIG. In this modified example, since there are many places similar to the above-described embodiment, differences from the above-described embodiment will be mainly described. The in-vehicle device of Modification 1 mainly differs in the processing operation of the control device 10. In this modification, the same reference numerals as those in the above embodiment are used for convenience. Further, for the same processing as FIG. 4 in FIG. 11, the same step numbers as in FIG. 4 are used.

上記のように、車両100は、ゲートウェイ20が開始要求を送信した後に、バッテリ60への電力供給状態が切り換わることも起こり得る。そこで、制御装置10は、ステップS22において、書換要求が第1書換要求であると判定しなかった場合はステップS26へ進む。ステップS26では、ステップS13でゲートウェイ20が行った判定と同様に、バッテリ60への電力供給があるか否かを判定する(確認部)。制御装置10は、ゲートウェイ20と同様に、バッテリ60に対する電力供給の有無を判定し、バッテリ60への電力供給ありと判定した場合はステップS24へ進み、バッテリ60への電力供給なしと判定した場合はステップS25へ進む。   As described above, in the vehicle 100, the power supply state to the battery 60 may be switched after the gateway 20 transmits the start request. Therefore, if the control device 10 does not determine in step S22 that the rewrite request is the first rewrite request, the control device 10 proceeds to step S26. In step S <b> 26, it is determined whether or not there is power supply to the battery 60 as in the determination performed by the gateway 20 in step S <b> 13 (confirmation unit). Control device 10 determines the presence or absence of power supply to battery 60, similarly to gateway 20, and proceeds to step S <b> 24 if it is determined that power is supplied to battery 60, and determines that power is not supplied to battery 60. Advances to step S25.

つまり、制御装置10は、ステップS24で更新プログラムの書き込みを実施する場合、更新プログラムを書き込む前に、再度、バッテリ60に電力が供給されていることを確認してから、ステップS24での更新プログラムの書き込みを許可する。一方、制御装置10は、ステップS24で更新プログラムの書き込みを実施する場合、更新プログラムを書き込む前に、バッテリ60に電力が供給されていないと、第3書換要求を受信していたとしても、ステップS23へ進むことになる。つまり、制御装置10は、第3書換要求を受信していたとしても、更新プログラムを書き込む際にバッテリ60に電力が供給されていなかった場合、書込モードを第3書込モードから第1書込モードに変更して、プログラムの書き換えを行う。なお、ここでの、ステップS24で更新プログラムの書き込みを実施する場合とは、ステップS22でNO判定された場合、すなわち第3書換要求を受信している場合を示している。   That is, when writing the update program in step S24, the control device 10 confirms that power is supplied to the battery 60 again before writing the update program, and then updates the program in step S24. Allow writing. On the other hand, when the control device 10 writes the update program in step S24, if the power is not supplied to the battery 60 before the update program is written, even if the control device 10 receives the third rewrite request, the step Proceed to S23. That is, even if the control device 10 receives the third rewrite request, if the battery 60 is not supplied with power when the update program is written, the control device 10 changes the write mode from the third write mode to the first write mode. Change to program mode and rewrite the program. Here, the case where the update program is written in step S24 indicates the case where NO is determined in step S22, that is, the case where the third rewrite request is received.

これによって、車載装置は、書込電圧を第3書込電圧として更新プログラムを書き込む際に、確実にバッテリ60への電力の供給がなされている状況で、更新プログラムの書き込みを行うことができる。当然ではあるが、変形例1の車載装置は、上記実施形態と同様の効果を奏することができる。   Thereby, the in-vehicle device can write the update program in a situation where power is reliably supplied to the battery 60 when the update program is written with the write voltage as the third write voltage. Needless to say, the in-vehicle device of the first modification can achieve the same effects as those of the above-described embodiment.

(変形例2)
まず、図12を用いて、変形例2における車載装置に関して説明する。本変形例では、上記実施形態と同様の箇所が多いため、上記実施形態と異なる点を中心に説明する。変形例2の車載装置は、主に、搭載される車両100aが異なる。つまり、本変形例の車載装置は、電気自動車である車両100aに搭載される。なお、図12において、図1と同じ符号の構成要素は、図1と同様である。
(Modification 2)
First, the in-vehicle device in Modification 2 will be described with reference to FIG. In this modified example, since there are many places similar to the above-described embodiment, differences from the above-described embodiment will be mainly described. The in-vehicle device of Modification 2 is mainly different in a vehicle 100a to be mounted. That is, the in-vehicle device of this modification is mounted on a vehicle 100a that is an electric vehicle. In FIG. 12, the components having the same reference numerals as those in FIG. 1 are the same as those in FIG.

車両100aは、家屋、ディーラ、充電所などに設けられた車外充電器300と電気的に接続可能に構成されている。また、車両100aは、車外充電器300と電気的に接続された車載充電器80を備えている。車載充電器80は、バッテリ60に電力を供給し、バッテリ60を充電することができる。   The vehicle 100a is configured to be electrically connectable with an external vehicle charger 300 provided in a house, a dealer, a charging station, or the like. In addition, the vehicle 100 a includes an in-vehicle charger 80 that is electrically connected to the external charger 300. The on-vehicle charger 80 can supply power to the battery 60 and charge the battery 60.

本変形例の車載装置は、制御装置10とゲートウェイ20aを含んでいる。制御装置10は、上記実施形態と同様である。一方、ゲートウェイ20aは、ゲートウェイ20と異なり、車載充電器80からの信号に基づいて、バッテリ60へ電力が供給されているか否かを判定する。   The in-vehicle device of this modification includes a control device 10 and a gateway 20a. The control device 10 is the same as that in the above embodiment. On the other hand, unlike the gateway 20, the gateway 20 a determines whether electric power is supplied to the battery 60 based on a signal from the in-vehicle charger 80.

このように構成された変形例2の車載装置は、上記実施形態と同様の効果を奏することができる。つまり、車載装置は、電気自動車に搭載されていた場合であっても、上記実施形態と同様の効果を奏することができる。   The vehicle-mounted device of Modification 2 configured as described above can achieve the same effects as those of the above embodiment. That is, even if the on-vehicle device is mounted on an electric vehicle, the same effect as in the above embodiment can be obtained.

10…制御装置、11…マイコン、12…不揮発性メモリ、13…揮発性メモリ、14…通信回路、15…電源回路、20,20a…ゲートウェイ、21…記憶部、30…通信機、40…エンジン、50…オルタネータ、60…バッテリ、70…イグニッションスイッチ、80…車載充電器、100,100a…車両、200…センター、300…車外充電器   DESCRIPTION OF SYMBOLS 10 ... Control apparatus, 11 ... Microcomputer, 12 ... Non-volatile memory, 13 ... Volatile memory, 14 ... Communication circuit, 15 ... Power supply circuit, 20, 20a ... Gateway, 21 ... Memory | storage part, 30 ... Communication apparatus, 40 ... Engine 50 ... alternator, 60 ... battery, 70 ... ignition switch, 80 ... on-vehicle charger, 100, 100a ... vehicle, 200 ... center, 300 ... off-vehicle charger

Claims (7)

バッテリ(60)から電力供給されて動作し、プログラムを記憶した不揮発性メモリ(12)を有しており、前記プログラムを車両の外部に設けられた外部機器(200)から送信された更新プログラムに書き換える車載装置であって、
前記外部機器から前記更新プログラムへの書き換えの要求があり、前記バッテリに電力が供給されていない場合、前記バッテリに電力が供給されている場合よりも、前記不揮発性メモリへの書込電圧を低電圧として前記更新プログラムを前記不揮発性メモリに書き込むことで、前記更新プログラムに書き換える第1書換部(S23)と、
前記第1書換部にて前記更新プログラムへの書き換えを実施した場合、前記バッテリに電力が供給された後に、前記不揮発性メモリへの書込電圧を前記第1書換部での書込電圧よりも高電圧として、前記第1書換部と同じ前記更新プログラムを前記不揮発性メモリに書き込むことで、前記更新プログラムに書き換える第2書換部(S31)と、を備えている車載装置。
It has a nonvolatile memory (12) that operates by being supplied with power from the battery (60) and stores the program. The program is updated to an update program transmitted from an external device (200) provided outside the vehicle. An in-vehicle device to be rewritten,
When there is a request to rewrite the update program from the external device, and the power is not supplied to the battery, the write voltage to the nonvolatile memory is lower than when the power is supplied to the battery. A first rewriting unit (S23) for rewriting the update program by writing the update program as a voltage in the nonvolatile memory;
When rewriting to the update program is performed in the first rewriting unit, after power is supplied to the battery, the write voltage to the nonvolatile memory is set higher than the write voltage in the first rewrite unit. An in-vehicle device comprising: a second rewriting unit (S31) that rewrites the update program by writing the same update program as the first rewrite unit into the nonvolatile memory as a high voltage.
前記第1書換部は、前記外部機器から前記更新プログラムへの書き換えの要求があり、前記バッテリに電力が供給されていない場合であり、且つ、前記車両が駐車状態の場合に、前記バッテリに電力が供給されている場合よりも、前記不揮発性メモリへの書込電圧を低電圧として前記更新プログラムを前記不揮発性メモリに書き込むことで、前記更新プログラムに書き換える請求項1に記載の車載装置。   The first rewriting unit is configured to supply power to the battery when there is a request to rewrite the update program from the external device, power is not supplied to the battery, and the vehicle is parked. 2. The in-vehicle device according to claim 1, wherein the update program is rewritten to the update program by writing the update program to the nonvolatile memory with a write voltage to the nonvolatile memory being set to a lower voltage than when the voltage is supplied. 前記第2書換部は、前記第1書換部が前記更新プログラムを書き込んだ前記不揮発性メモリにおける領域と同じ領域に、前記更新プログラムを書き込む請求項1又は2に記載の車載装置。   The in-vehicle device according to claim 1, wherein the second rewriting unit writes the update program in the same area as the area in the nonvolatile memory in which the first rewriting unit has written the update program. 前記第2書換部は、前記バッテリに電力が供給されている間に、前記更新プログラムを書き込む請求項1乃至3のいずれか一項に記載の車載装置。   The in-vehicle device according to any one of claims 1 to 3, wherein the second rewriting unit writes the update program while power is supplied to the battery. 前記第2書換部は、前記バッテリに電力が供給された後であり、前記車両のイグニッションスイッチがオフとなり、前記車載装置への電力供給が停止されるまでの間に、前記更新プログラムを書き込む請求項1乃至3のいずれか一項に記載の車載装置。   The second rewriting unit writes the update program after power is supplied to the battery and before an ignition switch of the vehicle is turned off and power supply to the in-vehicle device is stopped. The in-vehicle device according to any one of Items 1 to 3. 前記バッテリへの電力の供給有無は、前記車両に搭載された他の制御装置からの情報に基づいて判定する請求項1乃至5のいずれか一項に記載の車載装置。   The in-vehicle device according to any one of claims 1 to 5, wherein whether or not electric power is supplied to the battery is determined based on information from another control device mounted on the vehicle. 前記外部機器から前記更新プログラムへの書き換えの要求があり、前記バッテリに電力が供給されている場合、前記第1書換部での書込電圧よりも高電圧として、前記更新プログラムを前記不揮発性メモリに書き込むことで、前記更新プログラムに書き換える第3書換部(S24)と、
前記第3書換部で前記更新プログラムの書き込みを実施する場合、前記更新プログラムを書き込む前に、再度、前記バッテリに電力が供給されていることを確認してから、前記第3書換部による前記更新プログラムの書き込みを許可する確認部(S26)と、をさらに備えている請求項1乃至6のいずれか一項に記載の車載装置。
When there is a request to rewrite the update program from the external device, and the power is supplied to the battery, the update program is set to a voltage higher than the write voltage in the first rewrite unit, and the nonvolatile memory A third rewriting unit (S24) for rewriting the update program by writing to
When writing the update program in the third rewrite unit, before writing the update program, confirm that power is supplied to the battery again, and then update by the third rewrite unit. The in-vehicle device according to any one of claims 1 to 6, further comprising a confirmation unit (S26) that permits writing of the program.
JP2018075528A 2018-04-10 2018-04-10 In-vehicle device Active JP7031461B2 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018075528A JP7031461B2 (en) 2018-04-10 2018-04-10 In-vehicle device
DE102019204996.6A DE102019204996B4 (en) 2018-04-10 2019-04-08 VEHICLE DEVICE FOR REPROGRAMMING A PROGRAM STORED IN A NON-VOLATILE MEMORY

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018075528A JP7031461B2 (en) 2018-04-10 2018-04-10 In-vehicle device

Publications (2)

Publication Number Publication Date
JP2019185398A true JP2019185398A (en) 2019-10-24
JP7031461B2 JP7031461B2 (en) 2022-03-08

Family

ID=67992028

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018075528A Active JP7031461B2 (en) 2018-04-10 2018-04-10 In-vehicle device

Country Status (2)

Country Link
JP (1) JP7031461B2 (en)
DE (1) DE102019204996B4 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022249846A1 (en) * 2021-05-24 2022-12-01 株式会社デンソー Vehicular electronic control device and update program
JP2023503288A (en) * 2019-11-29 2023-01-27 ルノー エス.ア.エス. Methods for Updating Digital Systems

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010055748A (en) * 2009-12-09 2010-03-11 Renesas Technology Corp Data storage device
JP2013165564A (en) * 2012-02-10 2013-08-22 Toyota Motor Corp Vehicle control system
JP2017027549A (en) * 2015-07-28 2017-02-02 矢崎総業株式会社 Software update device and software update system
JP2018037059A (en) * 2016-08-30 2018-03-08 株式会社オートネットワーク技術研究所 In-vehicle update device and in-vehicle update system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3595691B2 (en) 1998-08-25 2004-12-02 株式会社東芝 Nonvolatile semiconductor memory device
DE102010045581B4 (en) 2010-09-16 2018-08-09 Infineon Technologies Ag Method and device for programming data into non-volatile memories
KR101360705B1 (en) 2011-09-22 2014-02-07 기아자동차주식회사 Vehicle Upgrade System and Method thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010055748A (en) * 2009-12-09 2010-03-11 Renesas Technology Corp Data storage device
JP2013165564A (en) * 2012-02-10 2013-08-22 Toyota Motor Corp Vehicle control system
JP2017027549A (en) * 2015-07-28 2017-02-02 矢崎総業株式会社 Software update device and software update system
JP2018037059A (en) * 2016-08-30 2018-03-08 株式会社オートネットワーク技術研究所 In-vehicle update device and in-vehicle update system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2023503288A (en) * 2019-11-29 2023-01-27 ルノー エス.ア.エス. Methods for Updating Digital Systems
JP7793514B2 (en) 2019-11-29 2026-01-05 アンペア エス.ア.エス. Method for updating a digital system
WO2022249846A1 (en) * 2021-05-24 2022-12-01 株式会社デンソー Vehicular electronic control device and update program
JP2022180041A (en) * 2021-05-24 2022-12-06 株式会社デンソー Vehicle electronic controller and update program
JP7484814B2 (en) 2021-05-24 2024-05-16 株式会社デンソー Vehicle electronic control device and update program

Also Published As

Publication number Publication date
DE102019204996A1 (en) 2019-10-10
DE102019204996B4 (en) 2024-10-17
JP7031461B2 (en) 2022-03-08

Similar Documents

Publication Publication Date Title
JP6332580B1 (en) Control device, program update method, and computer program
CN111614710B (en) Software update device, vehicle and software update method
JP6832374B2 (en) Software update device, vehicle and software update method
JP5365489B2 (en) Program update device
CN111989242B (en) Control device, control method and computer program
JP7794233B2 (en) Software update device, software update method, and software update processing program
JP2015037938A (en) Online updating method of on-vehicle device
JP7031461B2 (en) In-vehicle device
US20220244946A1 (en) Ota master, update control method, non-transitory storage medium, and vehicle
JP2000038954A (en) Electronic controller and method of counting number of times in which nonvolatile memory is reloaded
JP4753929B2 (en) Non-volatile memory rewriting system for in-vehicle control unit
US20220204008A1 (en) Arithmetic processing device, vehicle control device, and update method
JP7279707B2 (en) Control device, control method and computer program
KR20220147020A (en) Center, ota master, system, distribution method, non-transitory storage medium, and vehicle
TWI438402B (en) Navigation device for vehicle
JPH0764872A (en) Data storage controller
CN111619484B (en) Control method, device and equipment for programming
JP2007257473A (en) In-vehicle control device
JP5857798B2 (en) Control device
WO2013140570A1 (en) Vehicle-mounted device, data save method, and data save program
JP4655398B2 (en) Vehicle control device with backup function
JP7745353B2 (en) In-vehicle electronic control devices
US20250284485A1 (en) Electronic control device and storage medium
CN113841116B (en) Arithmetic processing device, vehicle control device, and update method
JP2007071079A (en) Electronic control device for vehicle

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210120

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220117

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: 20220125

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220207

R151 Written notification of patent or utility model registration

Ref document number: 7031461

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250