JP2005327210A - Electronic device - Google Patents

Electronic device Download PDF

Info

Publication number
JP2005327210A
JP2005327210A JP2004146745A JP2004146745A JP2005327210A JP 2005327210 A JP2005327210 A JP 2005327210A JP 2004146745 A JP2004146745 A JP 2004146745A JP 2004146745 A JP2004146745 A JP 2004146745A JP 2005327210 A JP2005327210 A JP 2005327210A
Authority
JP
Japan
Prior art keywords
writing
battery
data
voltage
power
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004146745A
Other languages
Japanese (ja)
Inventor
Yutaka Tanaka
豊 田中
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 JP2004146745A priority Critical patent/JP2005327210A/en
Publication of JP2005327210A publication Critical patent/JP2005327210A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To prevent data corruption of a flash memory when battery power is lowered while writing data in a non-volatile memory in an electronic device having the non-volatile memory. <P>SOLUTION: When power of the battery 10 is lowered below predetermined voltage while writing the data in the flash memory 100, power is supplied to a CPU 90, the flash memory 100 and a RAM 100 with charged voltage of capacitors 80, 81, the CPU 90 compares time until the charged voltage becomes below operation voltage by which writing is maintained with time until the writing is completed, when it is judged that the writing can be completed, continues the writing until it is completed as it is. On the other hand, corruption of the data to be written in the flash memory 100 is prevented by interrupting the writing when it is judged that the writing can not be completed by the charged voltage by the capacitors 80, 81, and by restarting the writing from an interrupted place when power of the battery 10 is restored. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、データを書き込み可能な不揮発性メモリを備える電子装置に関するものである。   The present invention relates to an electronic device including a nonvolatile memory capable of writing data.

近年、例えば車両用電子機器において、車両搭載状態でLANを経由して最新のソフトウェアをフラッシュメモリなどの不揮発性メモリに書き込み、アップデートできるようになっている。しかし、もし不揮発性メモリにデータを書き込み中にバッテリ電圧が低下またはその電子機器のスイッチをオフにした場合には、この不揮発性メモリにデータを書き込みするための動作電圧が保持できなくなり、書き込みが正常にできなくなるという問題がある。特許文献1に記載の発明では、コンデンサを採用することによってバッテリから供給される電力を蓄えておき、もし不揮発性メモリにデータを書き込み中に、アクセサリスイッチがオフした場合には、そのコンデンサに蓄えた電力を一定期間不揮発性メモリに供給することにより、データの書き込みの中断を回避している。
特開2003−241863
In recent years, for example, in a vehicle electronic device, the latest software can be written and updated in a nonvolatile memory such as a flash memory via a LAN in a vehicle mounted state. However, if the battery voltage drops while the data is being written to the nonvolatile memory or the electronic device is turned off, the operating voltage for writing data to the nonvolatile memory cannot be maintained and There is a problem that it can not be done normally. In the invention described in Patent Document 1, the power supplied from the battery is stored by adopting a capacitor. If the accessory switch is turned off while data is being written to the nonvolatile memory, the power is stored in the capacitor. The interruption of data writing is avoided by supplying the remaining power to the nonvolatile memory for a certain period.
JP 2003-241863 A

しかし、上記特許文献1に記載の発明は、コンデンサに蓄えた電力によって、不揮発性メモリへの書き込みを完了することを想定しており、例えば、もし書き込むべきデータ量が多く、コンデンサの電力だけでは最後まで書き込むことができない場合には、依然書き込みが正常にできなくなるということが起こる。   However, the invention described in Patent Document 1 assumes that writing to the nonvolatile memory is completed by the power stored in the capacitor. For example, if the amount of data to be written is large and only the power of the capacitor is used. If writing to the end is impossible, writing still cannot be performed normally.

本発明は、上記の問題点に鑑み、不揮発性メモリにデータを書き込み中にバッテリ電圧が低下した場合であっても、書き込むべきデータ量にかかわらず書き込みを正常に行って、これによりデータの破壊が防止できる電子装置を提供することを目的とする。   In view of the above problems, the present invention performs normal writing regardless of the amount of data to be written even if the battery voltage drops while writing data to the nonvolatile memory, thereby destroying the data. An object of the present invention is to provide an electronic device capable of preventing the above-described problem.

請求項1に記載の電子装置は、動作電圧を供給するバッテリと、データを記憶するものであって、バッテリから動作電圧が供給されている時に記憶すべきデータが書き込まれる不揮発性メモリと、バッテリから動作電圧を供給され、書き込まれるデータ量に応じた書き込み完了予定時間を認識し、前記不揮発性メモリへのデータの書き込みを行う書き込み制御手段と、バッテリの電圧を検知する電源検知手段と、バッテリと不揮発性メモリとの間に設けられ、バッテリからの動作電圧の供給に対して、導通・遮断を切り替えるスイッチング手段と、電源検知手段がバッテリが所定の電圧以下になったことを検知したときに、スイッチング手段は遮断状態となり、所定の電圧以上のときは、導通状態となるように制御をするスイッチング制御手段と、スイッチング手段が遮断状態となったときに不揮発性メモリに書き込みを維持できる電力を所定の時間供給する電力供給手段とを備え、書き込み制御手段は、不揮発性メモリにデータを書き込み途中でスイッチング手段が遮断した場合に、データの書き込み完了予定時間が、電力供給手段が書き込みを維持できる電力を供給する所定時間よりも長ければデータの書き込みを途中で中断することを特徴とする。   An electronic device according to claim 1 is a battery for supplying an operating voltage, stores data, and a nonvolatile memory in which data to be stored is written when the operating voltage is supplied from the battery, and a battery Is supplied with an operating voltage, recognizes a scheduled write completion time according to the amount of data to be written, writes control means for writing data to the nonvolatile memory, power supply detection means for detecting battery voltage, and battery Switching means for switching between conduction and interruption with respect to supply of the operating voltage from the battery, and when the power supply detection means detects that the battery has become a predetermined voltage or less. The switching means is in a cut-off state, and is controlled so as to be in a conductive state when the voltage exceeds a predetermined voltage. And a power supply means for supplying power for maintaining a write to the nonvolatile memory for a predetermined time when the switching means is in a shut-off state, the write control means switching means in the middle of writing data to the nonvolatile memory Is interrupted, if the scheduled data write completion time is longer than a predetermined time for supplying power that the power supply means can maintain writing, the data writing is interrupted.

このように、請求項1に記載の電子装置は、不揮発性メモリにデータを書き込み中にバッテリの電圧が所定の電圧以下になったときは、それを検知し、別の電力供給源により所定時間不揮発性メモリに電力を供給することにより、その動作電圧を確保し書き込みの異常終了を回避する。そして、その電力供給源からの電力によって、これから書き込まれる残りのデータ量に対して、書き込みが最後まで完了できるようであれば、そのまま書き込みを続行させ、最後まで完了させる。一方、その電力供給源によっても、当該書き込みが最後まで完了できないようであれば、途中で書き込みを中断し、書き込みの異常終了によるデータの破壊を回避する。   As described above, the electronic device according to claim 1 detects when the voltage of the battery becomes equal to or lower than a predetermined voltage while data is being written to the nonvolatile memory, and detects it for a predetermined time by another power supply source. By supplying power to the non-volatile memory, the operating voltage is secured and abnormal termination of writing is avoided. If the writing from the power supply source can be completed to the end with respect to the remaining amount of data to be written, the writing is continued as it is and completed to the end. On the other hand, if the writing cannot be completed to the end even by the power supply source, the writing is interrupted halfway to avoid data destruction due to abnormal termination of writing.

請求項2に記載の電子装置は、書き込み制御手段は、不揮発性メモリへのデータの書き込みを中断する際に、不揮発性メモリの所定のアドレスに、書き込み中断に関する情報を書き込み、その後バッテリの電圧が所定の電圧以上に復活した場合には、書き込み中断に関する情報に基づき書き込みを中断したところから書き込みを再開することを特徴とする。   In the electronic device according to claim 2, when the writing control unit interrupts the writing of data to the nonvolatile memory, the writing control unit writes information regarding the writing interruption to a predetermined address of the nonvolatile memory, and then the voltage of the battery is When the voltage is restored to a predetermined voltage or higher, the writing is resumed from the point where the writing is interrupted based on the information regarding the interruption of writing.

このように、請求項1に記載の電子装置において、書き込みを一時中断するときに書き込み中断に関する情報(例えば、書き込みが完了した不揮発性メモリのアドレス等)を記憶しておくことにより、その後書き込みを再開するときには、その情報を読み込むことにより、書き込みを中断したところから再開することができる。   As described above, in the electronic device according to claim 1, when writing is temporarily interrupted, information related to the writing interruption (for example, an address of the nonvolatile memory in which writing is completed) is stored, and then writing is performed. When resuming, the information can be read to resume from where the writing was interrupted.

請求項3に記載の電子装置は、不揮発性メモリはフラッシュメモリであることを特徴とする。   The electronic device according to claim 3 is characterized in that the nonvolatile memory is a flash memory.

このように、不揮発性メモリとしてフラッシュメモリを使うことによって、データを電気的に書き込み、消去が可能で、データ保持に電源が不要となるため、機器の小型化・軽量化・省電力化に貢献できる。   In this way, by using flash memory as a non-volatile memory, data can be written and erased electrically, eliminating the need for a power source for data retention, contributing to equipment miniaturization, weight reduction, and power saving. it can.

また、請求項4に記載の電子装置は、電力供給手段は、バッテリから供給される電力をスイッチング手段を介して蓄え、この蓄えた電力を不揮発性メモリに、蓄えた電力に応じた時間供給することを特徴とする。   In the electronic device according to claim 4, the power supply means stores the power supplied from the battery via the switching means, and supplies the stored power to the nonvolatile memory for a time corresponding to the stored power. It is characterized by that.

これにより、バッテリとは別にバックアップ用電源装置を用意する必要がないので、機器を小型に構成することができる。   As a result, it is not necessary to prepare a backup power supply device separately from the battery, so that the device can be made compact.

請求項5に記載の電子装置のように、電力を蓄える手段としてコンデンサを使ってもよい。これにより、電力供給手段として簡単な構成で実現することができる。   As in the electronic device according to claim 5, a capacitor may be used as means for storing electric power. Thereby, it is realizable with a simple structure as an electric power supply means.

以下、本発明を実施するための形態について図面に基づいて説明する。なお、本実施形態では、電子装置として車両に搭載される車両用電子装置を例に挙げて説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. In the present embodiment, a vehicle electronic device mounted on a vehicle will be described as an example of the electronic device.

図1は本発明の実施形態における車両用電子装置200の概略構成を示したブロック図である。同図に示すように、当該車両用電子装置200は、バッテリ10、スイッチ20、抵抗素子30、31、保護回路32、A/D変換器40、電源制御CPU50、半導体スイッチ60、電源回路70、コンデンサ80、81、CPU90、RAM110、フラッシュメモリ100から構成される。   FIG. 1 is a block diagram showing a schematic configuration of a vehicle electronic device 200 according to an embodiment of the present invention. As shown in the figure, the vehicle electronic device 200 includes a battery 10, a switch 20, resistance elements 30, 31, a protection circuit 32, an A / D converter 40, a power control CPU 50, a semiconductor switch 60, a power circuit 70, The capacitors 80 and 81, the CPU 90, the RAM 110, and the flash memory 100 are configured.

バッテリ10は、車両用電子装置200を動作させるための電力供給源である。例えば車両用電子装置200がナビゲーション装置の場合、このバッテリ10により装置内に電力が供給され、車両の現在位置を検出し画面に表示することができる。一般的に車両用電子装置では、車両に搭載の出力電圧12Vの鉛蓄電池から電力を供給され作動している。なお、本発明では発明の構成要件としてバッテリ10を含み込ませているが、前述のように、電力を供給できるものであれば、外部のバッテリを使ってもよい。   The battery 10 is a power supply source for operating the vehicle electronic device 200. For example, when the vehicle electronic device 200 is a navigation device, electric power is supplied into the device by the battery 10, and the current position of the vehicle can be detected and displayed on the screen. In general, an electronic device for a vehicle is operated by being supplied with electric power from a lead storage battery having an output voltage of 12 V mounted on the vehicle. In the present invention, the battery 10 is included as a constituent element of the invention. However, an external battery may be used as long as it can supply power as described above.

スイッチ20は、バッテリ10の電力を車両用電子装置200に供給し又は遮断するために設けられている。スイッチ20をONすることにより、車両用電子装置200はバッテリ10からの電力の供給を受けて、所定の動作をすることができる。なお、スイッチ20としては、エンジン始動に伴って自動的にスイッチ20がONにされるものや、リモコン操作によるスイッチON、OFFの切り替えや、直接ユーザーが操作することによるスイッチ等がある。   The switch 20 is provided to supply or cut off the electric power of the battery 10 to the vehicle electronic device 200. By turning on the switch 20, the vehicle electronic device 200 can receive a supply of electric power from the battery 10 and perform a predetermined operation. Examples of the switch 20 include a switch that is automatically turned ON when the engine is started, a switch ON / OFF switch by a remote control operation, a switch by a direct user operation, and the like.

CPU90は、バッテリ10から所定の動作電圧を受けて車両用電子装置200の種種の動作に関する制御処理を実行する。本発明では、特にフラッシュメモリ100やRAM110に記憶されているデータの読み出しや書き込みを行い又は書き込みを中断させる書込み制御部としての役割を担っている。なお、本実施形態における当該書き込まれるデータとしては車両電子装置のバージョンアップ用の実行プログラムなどがあり、そのデータは車両電子装置の外部に備え付けられた書き込み装置300から読み込まれ、フラッシュメモリ100へ記憶する。この、書き込み装置300としては、CD−ROMやDVD−ROM駆動装置など書き込まれるデータの供給源に対応する装置が考えられる。   The CPU 90 receives a predetermined operating voltage from the battery 10 and executes control processing related to various operations of the vehicle electronic device 200. In particular, the present invention plays a role as a write control unit that reads or writes data stored in the flash memory 100 or the RAM 110 or interrupts the writing. The data to be written in this embodiment includes an execution program for upgrading the version of the vehicle electronic device, and the data is read from the writing device 300 provided outside the vehicle electronic device and stored in the flash memory 100. To do. As the writing device 300, a device corresponding to a supply source of data to be written, such as a CD-ROM or a DVD-ROM driving device, can be considered.

フラッシュメモリ100は、不揮発性メモリの一種であり、電子装置の制御プログラムなどのデータを記憶することができる素子である。他に不揮発性メモリとしては、ROM(Read Only Memory)がある。このフラッシュメモリ100は、データの書き込みを行うときは、書き込みを維持するための動作電圧を外部から供給されることが必要であり、一旦書き込まれたデータは、電力供給がなくてもデータの保持ができる。本実施形態では、フラッシュメモリ100には、フラッシュメモリ100にデータの書き込みを制御する制御プログラムと、書き込み以外の車両用電子装置200の動作を制御するその他制御プログラム及び制御プログラム以外のデータ(例えば、ナビゲーション装置の場合は、現在位置のデータや目的地への経路データ等)が記憶されている(図2)。   The flash memory 100 is a kind of non-volatile memory, and is an element capable of storing data such as a control program for an electronic device. In addition, as a nonvolatile memory, there is a ROM (Read Only Memory). When writing data, the flash memory 100 needs to be supplied with an operating voltage for maintaining the writing from the outside, and once the data is written, the data can be retained even without power supply. Can do. In the present embodiment, the flash memory 100 includes a control program that controls writing of data to the flash memory 100, other control programs that control the operation of the vehicle electronic device 200 other than writing, and data other than the control program (for example, In the case of a navigation device, current position data, route data to a destination, etc.) are stored (FIG. 2).

一方、RAM110は揮発性メモリの一種で、例えばDRAM(Dynamic Random Access Memory)やSRAM(Static Random Access Memory)などがある。RAM110もフラッシュメモリ100と同様にデータを記憶することができるが、一般的に不揮発性メモリよりも高い集積度と記憶速度が可能である。また、記憶されたデータの保持に所定の動作電圧を確保する必要があるため、もし電子装置200のバッテリ10の電圧が低下又はスイッチ20がOFFした場合には、記憶されていたデータは消去してしまう。そのため、RAM110にはCPU90の制御処理に伴うデータが一時的に保存される。なお、本実施形態では、フラッシュメモリ100にデータを書き込む際には、CPU90はフラッシュメモリ100に記憶されている書き込み制御プログラムを読出し、そのプログラムをRAM110に転送し書き込みを行わせる。   On the other hand, the RAM 110 is a kind of volatile memory, such as DRAM (Dynamic Random Access Memory) and SRAM (Static Random Access Memory). The RAM 110 can store data in the same manner as the flash memory 100, but generally has a higher degree of integration and storage speed than a nonvolatile memory. In addition, since it is necessary to secure a predetermined operating voltage to hold the stored data, if the voltage of the battery 10 of the electronic device 200 decreases or the switch 20 is turned off, the stored data is deleted. End up. Therefore, data accompanying the control process of the CPU 90 is temporarily stored in the RAM 110. In this embodiment, when data is written to the flash memory 100, the CPU 90 reads the write control program stored in the flash memory 100, and transfers the program to the RAM 110 for writing.

電源回路70は、バッテリ10から供給される電力を、CPU90、フラッシュメモリ100及びRAM110に対してそれぞれが動作可能な電圧に変換して出力する。一般的に、車両用電子機器は、車両に搭載の直流12Vバッテリから電力を供給されるが、その電子機器のCPU等が動作するための動作電圧はそのバッテリ電圧よりも低い所定の値(例えば5V)になっており、通常バッテリ電圧とCPU等の動作電圧は異なっている。したがって、本実施形態においてもバッテリ10から供給される動作電圧を電源回路70で変換(DC−DC変換)している。   The power supply circuit 70 converts the power supplied from the battery 10 into an operable voltage for the CPU 90, the flash memory 100, and the RAM 110, and outputs the converted voltage. Generally, electric power for a vehicle is supplied from a DC 12V battery mounted on the vehicle, but an operating voltage for operating a CPU or the like of the electronic device is a predetermined value (for example, lower than the battery voltage). 5V), and the normal battery voltage and the operating voltage of the CPU are different. Therefore, also in this embodiment, the operating voltage supplied from the battery 10 is converted (DC-DC conversion) by the power supply circuit 70.

コンデンサ80、81は、バッテリ10から供給される電力を蓄えることができ、もしバッテリ10の電圧が低下した場合には代わりにCPU90、フラッシュメモリ100及びRAM110に対してその蓄えた電力を所定時間供給する。これにより、もしフラッシュメモリ100にデータを書き込み中にバッテリ10の電圧が低下した場合には、その書き込みを異常終了させることがなく、所定時間は書き込みを続行することが可能となる。   Capacitors 80 and 81 can store electric power supplied from the battery 10. If the voltage of the battery 10 decreases, the stored electric power is supplied to the CPU 90, the flash memory 100, and the RAM 110 instead for a predetermined time. To do. As a result, if the voltage of the battery 10 decreases while data is being written to the flash memory 100, the writing can be continued for a predetermined time without abnormal termination.

なお、前述の所定時間は、コンデンサ80、81の充電電圧とコンデンサ80、81とCPU90、フラッシュメモリ100及びRAM110の各消費電力などによって決定される。したがって、コンデンサ80,81の充電電圧によりフラッシュメモリ100にデータの書き込みを行うときは、あらかじめ、どの程度の時間その書き込みが続行可能かを予測することができるのである。   The predetermined time is determined by the charging voltage of the capacitors 80 and 81, the power consumption of the capacitors 80 and 81, the CPU 90, the flash memory 100, and the RAM 110. Therefore, when data is written to the flash memory 100 by the charging voltages of the capacitors 80 and 81, it is possible to predict in advance how long the data can be written.

なお、コンデンサ80とコンデンサ81は、前述の役割を果たすという意味においてはどちらも同じであるが、この二つのコンデンサを設けることにより、一つのみのときよりもより多くの電力を蓄えることができ、CPU90、フラッシュメモリ100及びRAM110に長く電力を供給することができる。ただし、本実施形態のようにコンデンサを2つ設けなくても、1つのみでも良い。   Capacitor 80 and capacitor 81 are both the same in the meaning of the above-mentioned role, but by providing these two capacitors, more power can be stored than when only one capacitor is provided. The power can be supplied to the CPU 90, the flash memory 100, and the RAM 110 for a long time. However, it is not necessary to provide two capacitors as in the present embodiment.

電源制御CPU50は、バッテリ10の電圧値に応じて半導体スイッチ60をON、OFFさせ、またその情報をCPU90に知らせる。これにより、バッテリ10の電圧値が所定の値以下になった場合には半導体スイッチ60をOFF(遮断状態)し、バッテリの異常によるフラッシュメモリ100に記憶されているデータの破壊を防いでいる。また、その一方でCPU90、フラッシュメモリ100及びRAM110への電力供給源をコンデンサ80、81に切り替えることができる。その後バッテリ10が所定の電圧に回復した場合には電源制御CPUはそれを検知して半導体スイッチ60をON(導通状態)する。   The power control CPU 50 turns on and off the semiconductor switch 60 according to the voltage value of the battery 10 and informs the CPU 90 of the information. As a result, when the voltage value of the battery 10 becomes a predetermined value or less, the semiconductor switch 60 is turned OFF (shut off state) to prevent the data stored in the flash memory 100 from being destroyed due to the abnormality of the battery. On the other hand, the power supply source to the CPU 90, the flash memory 100, and the RAM 110 can be switched to the capacitors 80 and 81. Thereafter, when the battery 10 recovers to a predetermined voltage, the power supply control CPU detects it and turns on the semiconductor switch 60 (conducting state).

なお、半導体スイッチ60は、バッテリ10とCPU90、フラッシュメモリ100及びRAM110との間でスイッチングを行うものであれば、機械式リレーを用いてもよい。また、半導体スイッチ60としては、バイポーラトランジスタや電界効果トランジスタ(FET)などがある。   The semiconductor switch 60 may be a mechanical relay as long as it switches between the battery 10 and the CPU 90, the flash memory 100, and the RAM 110. The semiconductor switch 60 includes a bipolar transistor and a field effect transistor (FET).

以下、電源制御CPU50がバッテリ電圧値を認識する手段を説明する。   Hereinafter, means for the power supply control CPU 50 to recognize the battery voltage value will be described.

バッテリ10の電圧は、抵抗素子30、31によって所定の電圧に分圧され、その分圧電圧はA/D変換器40でアナログ値からデジタル値に変換される。そして、そのデジタル信号を電源制御CPU50が受け取って、その信号に基づいて半導体スイッチ60のON、OFFを決定する。なお、保護回路32は、もしバッテリ10の電圧が異常に上昇した場合に、その異常電圧によるA/D変換器の破壊を防ぐために、例えばその入力電圧を所定の上限電圧以下に制限するものである。   The voltage of the battery 10 is divided into a predetermined voltage by the resistance elements 30 and 31, and the divided voltage is converted from an analog value to a digital value by the A / D converter 40. The power supply control CPU 50 receives the digital signal, and determines whether the semiconductor switch 60 is ON or OFF based on the signal. The protection circuit 32 limits the input voltage to, for example, a predetermined upper limit voltage or less in order to prevent the A / D converter from being damaged by the abnormal voltage if the voltage of the battery 10 increases abnormally. is there.

以下、本実施形態において、フラッシュメモリ100にデータの書き込み中にバッテリ10の電圧が低下し、又はスイッチ20がOFFされた場合に、その書き込み中のデータを保護する手段について図3のフローチャート及び図4に基づいて説明する。   Hereinafter, in the present embodiment, when the voltage of the battery 10 decreases during the writing of data to the flash memory 100 or the switch 20 is turned OFF, the means for protecting the data being written is shown in the flowchart and FIG. 4 will be described.

先ず、ステップS10によりバッテリ10の電圧が所定の電圧以下V1になったか否かを電源制御CPU50が判定する。なお、バッテリ10の電圧の認識手段については前述のとおりである。ここで、バッテリ10の電圧が所定電圧V1以下になっていない(否定判定)と判定した場合には、バッテリ10は正常であると判断し、特別にデータの保護の処理は行わない。   First, in step S10, the power supply control CPU 50 determines whether or not the voltage of the battery 10 is equal to or lower than a predetermined voltage V1. Note that the means for recognizing the voltage of the battery 10 is as described above. Here, if it is determined that the voltage of the battery 10 is not equal to or lower than the predetermined voltage V1 (negative determination), it is determined that the battery 10 is normal, and no special data protection processing is performed.

一方、所定の電圧以下V1になったと判定(肯定判定)した場合には、バッテリ10の電圧が低下、又は車両用電子装置200のスイッチ20がOFFされたと判断し、ステップS20へ処理を進める(図4(1))。   On the other hand, if it is determined (affirmative determination) that the voltage has become equal to or lower than the predetermined voltage V1, it is determined that the voltage of the battery 10 has decreased or the switch 20 of the vehicle electronic device 200 has been turned off, and the process proceeds to step S20 ( FIG. 4 (1)).

ステップS20では、電源制御CPU50の指示に基づいて半導体スイッチ60をOFF(遮断)する処理を行い、次のステップS30へ処理を進める(図4(2))。これにより、バッテリの異常によるフラッシュメモリ100に記憶されているデータの破壊を防いでいる。また、半導体スイッチ60の遮断に伴い、コンデンサ80、81に蓄えられている電力は、CPU90、フラッシュメモリ100及びRAM110に対して放電される(図4(3))。   In step S20, a process for turning off (shut off) the semiconductor switch 60 is performed based on an instruction from the power supply control CPU 50, and the process proceeds to the next step S30 (FIG. 4 (2)). This prevents destruction of data stored in the flash memory 100 due to battery abnormality. Further, as the semiconductor switch 60 is shut off, the electric power stored in the capacitors 80 and 81 is discharged to the CPU 90, the flash memory 100, and the RAM 110 (FIG. 4 (3)).

なお、半導体スイッチ60は電源制御CPU50からローレベル信号を受け取るとOFF(遮断状態)し、ハイレベル信号を受け取るとON(導通状態)するようなバイポーラトランジスタや電界効果型トランジスタ(FET)などが使われる。   The semiconductor switch 60 is a bipolar transistor or a field effect transistor (FET) that is turned off (cut off) when receiving a low level signal from the power control CPU 50 and turned on (conductive) when receiving a high level signal. Is called.

ステップS30では、CPU90は、フラッシュメモリ100にデータを書き込み中であるか否かを判定する。ここで、書き込み中ではないと判定(否定判定)される場合は、特別に処理を行わない。   In step S <b> 30, the CPU 90 determines whether data is being written to the flash memory 100. Here, when it is determined that writing is not in progress (negative determination), no special processing is performed.

一方、書き込み中であると判定(肯定判定)される場合には、ステップS40へ処理を進める。   On the other hand, if it is determined that writing is in progress (positive determination), the process proceeds to step S40.

ステップS40では、CPU90は、コンデンサ80、81からの電力供給によって書き込み中のデータが最後まで書き込み完了できるか否かを判定する。つまり、図4(4)の書き込み完了予定時間T2が、コンデンサ80、81の充電電圧が書き込みを維持できる最低電圧Vminに放電されるまでの時間T1(以下、放電時間T1と言う)との大小を比較する。ここで、コンデンサ80、81の充電電圧が書き込みを維持できる最低電圧Vminは、フラッシュメモリ100の動作電圧、CPU90の動作電圧及びRAM110の動作電圧から決定される。なお、上述したようにコンデンサ80、81の充電電圧が書き込みを維持できる最低電圧に放電されるまでの時間T1は、コンデンサ80、81の充電電圧及びコンデンサ80、81とCPU90、フラッシュメモリ100及びRAM110の各消費電力などによって決定され、また書き込み完了予定時間T2は書き込まれるデータ量と書き込み速度などからあらかじめCPU90は認識している。なお、書き込み完了予定時間T2は、書き込むべきデータ量等に基づいてCPU90において算出する他、書き込み装置300が書き込むべきデータとともにCPU90に与えても良い。   In step S <b> 40, the CPU 90 determines whether or not the data being written can be completely written by supplying power from the capacitors 80 and 81. That is, the write completion scheduled time T2 in FIG. 4 (4) is larger or smaller than the time T1 (hereinafter referred to as the discharge time T1) until the charging voltage of the capacitors 80 and 81 is discharged to the minimum voltage Vmin that can maintain the writing. Compare Here, the minimum voltage Vmin at which the charging voltages of the capacitors 80 and 81 can maintain the writing is determined from the operating voltage of the flash memory 100, the operating voltage of the CPU 90, and the operating voltage of the RAM 110. As described above, the time T1 until the charging voltage of the capacitors 80 and 81 is discharged to the minimum voltage at which writing can be maintained is the charging voltage of the capacitors 80 and 81 and the capacitors 80 and 81 and the CPU 90, the flash memory 100, and the RAM 110. The CPU 90 recognizes the scheduled write completion time T2 in advance from the amount of data to be written and the writing speed. The write completion scheduled time T2 may be calculated by the CPU 90 based on the amount of data to be written or the like, or may be given to the CPU 90 together with the data to be written by the writing device 300.

ここで、図4(4b)のように書き込み完了予定時間T2が放電時間T1よりも短い場合(ステップS40否定判定)は、そのまま書き込み処理を続行し最後まで書き込みを完了させる(図3 ステップS70、S80)。   Here, when the write completion scheduled time T2 is shorter than the discharge time T1 as shown in FIG. 4 (4b) (No in step S40), the write process is continued and the write is completed to the end (FIG. 3, step S70, S80).

一方、図4(4a)のように書き込み完了予定時間T2が放電時間T1よりも長い場合(ステップS40肯定判定)、書き込み処理を中断するために、ステップS50の処理に進む。   On the other hand, when the scheduled write completion time T2 is longer than the discharge time T1 as shown in FIG. 4 (4a) (Yes determination in step S40), the process proceeds to step S50 in order to interrupt the writing process.

ステップS50では、書き込みを中断するに当たり、この中断に関する情報(中断フラグ)をフラッシュメモリ100の所定の番地に書き込む。その後書き込み処理を中断する(ステップS60)。この書き込みを中断する時期は、コンデンサ80,81の充電電圧が書き込みを維持できる最低電圧Vmin以下になる前に中断すればよい。なおこの中断フラグには、書き込み済みアドレスが付加されている。これにより、バッテリ10が回復したときは、この中断フラグの有無をチェックし、中断フラグが書き込まれていたときは中断フラグに付加されているアドレスの次のアドレスから書き込みを再開することができる。   In step S50, when the writing is interrupted, information regarding the interruption (interruption flag) is written in a predetermined address of the flash memory 100. Thereafter, the writing process is interrupted (step S60). The timing for interrupting the writing may be interrupted before the charging voltage of the capacitors 80 and 81 becomes equal to or lower than the minimum voltage Vmin that can maintain the writing. Note that a written address is added to the interruption flag. Thereby, when the battery 10 is recovered, the presence or absence of the interruption flag is checked, and when the interruption flag is written, writing can be resumed from the address next to the address added to the interruption flag.

以下、バッテリ10が回復した場合に中断されていた書き込みを再開する処理について図5のフローチャートを用いて説明する。   Hereinafter, processing for resuming writing that has been interrupted when the battery 10 recovers will be described with reference to the flowchart of FIG. 5.

ステップS90では、電源制御CPU50がバッテリ10の電圧が所定電圧V1以上のなったか否かを判定する。判定処理については、前述の図3ステップS10の処理と同じである。   In step S90, the power supply control CPU 50 determines whether or not the voltage of the battery 10 is equal to or higher than a predetermined voltage V1. The determination process is the same as the process in step S10 in FIG.

ここで、バッテリ10の電圧がV1以上ではないと判定(否定判定)された場合には、バッテリ10は未だ回復していないと判断し待機状態となる。   Here, when it is determined that the voltage of the battery 10 is not equal to or higher than V1 (negative determination), it is determined that the battery 10 has not yet recovered and enters a standby state.

一方、電源制御CPU50がバッテリ10の電圧が所定電圧V1以上になったと判定(肯定判定)した場合は、バッテリ10が回復したと判断し、次のステップ(ステップS100)に処理を進める。   On the other hand, when the power supply control CPU 50 determines (affirmative determination) that the voltage of the battery 10 has become equal to or higher than the predetermined voltage V1, it determines that the battery 10 has recovered and proceeds to the next step (step S100).

ステップS100では、電源制御CPU50の指示に基づいて半導体スイッチ60をON(導通)する処理を行い、次のステップS110へ処理を進める。これにより、バッテリ10の電力をCPU90、フラッシュメモリ100及びRAM110に供給が再開される。   In step S100, a process of turning on (conducting) the semiconductor switch 60 based on an instruction from the power supply control CPU 50 is performed, and the process proceeds to the next step S110. Thereby, the supply of the power of the battery 10 to the CPU 90, the flash memory 100, and the RAM 110 is resumed.

ステップS110では、フラッシュメモリ100の所定の番地に中断フラグが書き込まれているか否かを判定する。ここで、中断フラグが書き込まれていないと判定(否定判定)される場合は、以前に書き込みの中断はなかったと判断する。   In step S110, it is determined whether or not an interruption flag is written at a predetermined address of the flash memory 100. If it is determined that the interruption flag has not been written (negative determination), it is determined that the writing has not been interrupted before.

一方、中断フラグが書き込まれていると判定(肯定判定)される場合は、以前に書き込みの中断があったと判断し、書き込みの再開を行うために以降のステップ(ステップS120、S130)に処理を進める。   On the other hand, if it is determined that the interruption flag has been written (affirmative determination), it is determined that the writing has been interrupted before, and processing is performed in subsequent steps (steps S120 and S130) in order to resume writing. Proceed.

ステップS120では、書き込み装置300に対し書き込み要求を送信することによって書き込み装置300からのデータ送信を開始させ、ステップS110でチェックした中断フラグに付加されている書き込み済みアドレスの次のアドレスから書き込みを再開する。そして、すべてのデータがフラッシュメモリ100に書き込まれるまで書き込み処理を続ける(ステップS130)。   In step S120, data transmission from the writing device 300 is started by transmitting a write request to the writing device 300, and writing is resumed from the address next to the written address added to the interruption flag checked in step S110. To do. The writing process is continued until all data is written to the flash memory 100 (step S130).

以上のように、本実施形態では、例えば、車両用電子装置200のバージョンアップ又は工場内での実装工程によりフラッシュメモリ100に制御プログラムなどのデータを書き込み中にバッテリ10の電圧が所定電圧以下に低下した場合、書き込みを維持できる最低電圧Vmin以下に低下する時間T1と書き込みが完了するまでの時間T2とを比較し、このまま書き込み完了できると判断したときはそのまま続行し、書き込みが完了できないと判断したときは一時中断させて、フラッシュメモリ100のデータの破壊を防ぐことができる。また、その後バッテリ10が回復したときは、書き込みを中断したところから書き込みを再開することも可能である。なお、コンデンサ80、81が満充電する前にバッテリ10の電圧が所定電圧以下に低下した場合は、その時点におけるコンデンサ80、81の充電量に対応した放電時間T1によって、上述の書き込みデータ保護処理を行う。   As described above, in the present embodiment, for example, the voltage of the battery 10 is reduced to a predetermined voltage or lower while data such as a control program is written in the flash memory 100 by upgrading the version of the vehicle electronic device 200 or mounting in the factory. In the case of a decrease, the time T1 when the write voltage can be maintained is reduced to a time T1 that is lower than the minimum voltage Vmin, and the time T2 until the write is completed is determined. In such a case, the data in the flash memory 100 can be prevented from being destroyed by temporarily interrupting it. Further, when the battery 10 is recovered thereafter, the writing can be resumed from the point where the writing was interrupted. If the voltage of the battery 10 drops below a predetermined voltage before the capacitors 80 and 81 are fully charged, the above-described write data protection process is performed according to the discharge time T1 corresponding to the charge amount of the capacitors 80 and 81 at that time. I do.

本実施形態に係わる、車両用電子機器の概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the electronic device for vehicles concerning this embodiment. 本実施形態に係わる、フラッシュメモリ100のデータ記憶状況を示す図である。FIG. 3 is a diagram showing a data storage status of the flash memory 100 according to the present embodiment. 本実施形態に係わる、フラッシュメモリ100にデータを書き込み中にバッテリ10の電圧低下が発生した場合における、書き込みの続行又は中断処理を示すフローチャートである。6 is a flowchart showing a write continuation or interruption process when a voltage drop of the battery 10 occurs while writing data to the flash memory 100 according to the present embodiment. 本実施形態に係わる、バッテリ10、半導体スイッチ60、コンデンサ80,81及びフラッシュメモリ100への書き込みの各動作を示す図である。FIG. 4 is a diagram illustrating each operation of writing to the battery 10, the semiconductor switch 60, the capacitors 80 and 81, and the flash memory 100 according to the present embodiment. 本実施形態に係わる、書き込み中断後バッテリ10が回復した場合における、書き込みの再開処理を示すフローチャートである。It is a flowchart which shows the restart process of writing in case the battery 10 recovers after writing interruption concerning this embodiment.

符号の説明Explanation of symbols

200 車両用電子装置
10 バッテリ
20 スイッチ
30 抵抗素子
31 抵抗素子
32 保護回路
40 A/D変換器
50 電源制御CPU
60 半導体スイッチ
70 電源回路
80 コンデンサ
81 コンデンサ
90 CPU
100 フラッシュメモリ
110 RAM
300 書き込み装置
DESCRIPTION OF SYMBOLS 200 Vehicle electronic device 10 Battery 20 Switch 30 Resistance element 31 Resistance element 32 Protection circuit 40 A / D converter 50 Power supply control CPU
60 Semiconductor Switch 70 Power Supply Circuit 80 Capacitor 81 Capacitor 90 CPU
100 flash memory 110 RAM
300 writing device

Claims (5)

動作電圧を供給するバッテリと、
データを記憶するものであって、前記バッテリから動作電圧が供給されている時に記憶すべきデータが書き込まれる不揮発性メモリと、
バッテリから動作電圧を供給され、書き込まれるデータ量に応じた書き込み完了予定時間を認識し、前記不揮発性メモリへのデータの書き込みを行う書き込み制御手段と、
前記バッテリの電圧を検知する電源検知手段と、
前記バッテリと前記不揮発性メモリとの間に設けられ、前記バッテリからの動作電圧の供給に対して、導通・遮断を切り替えるスイッチング手段と、
前記電源検知手段が前記バッテリが所定の電圧以下になったことを検知したときに、前記スイッチング手段は遮断状態となり、前記所定の電圧以上のときは、導通状態となるように制御をするスイッチング制御手段と、
前記スイッチング手段が遮断状態となったときに前記不揮発性メモリに前記書き込みを維持できる電力を所定の時間供給する電力供給手段とを備え、
前記書き込み制御手段は、前記不揮発性メモリにデータを書き込み途中で前記スイッチング手段が遮断した場合に、前記データの書き込み完了予定時間が、前記電力供給手段が前記書き込みを維持できる電力を供給する所定時間よりも長ければ前記データの書き込みを途中で中断することを特徴とする電子装置。
A battery for supplying an operating voltage;
A non-volatile memory for storing data, in which data to be stored is written when an operating voltage is supplied from the battery;
A write control unit that is supplied with an operating voltage from a battery, recognizes a scheduled write completion time according to the amount of data to be written, and writes data to the nonvolatile memory;
Power detection means for detecting the voltage of the battery;
Switching means provided between the battery and the non-volatile memory, and switching between conduction and interruption with respect to supply of an operating voltage from the battery;
Switching control for controlling the power supply detection means so that the switching means is in a cut-off state when it detects that the battery is lower than a predetermined voltage, and is in a conduction state when it is higher than the predetermined voltage. Means,
Power supply means for supplying power that can maintain the writing to the nonvolatile memory for a predetermined time when the switching means is cut off;
The write control means is a predetermined time for supplying the power for the power supply means to maintain the writing when the switching means is interrupted while the data is being written to the nonvolatile memory. The electronic device is characterized in that the writing of the data is interrupted if the length is longer than that.
前記書き込み制御手段は、前記不揮発性メモリへのデータの書き込みを中断する際に、前記不揮発性メモリの所定のアドレスに、書き込み中断に関する情報を書き込み、その後前記バッテリの電圧が所定の電圧以上に復活した場合には、前記書き込み中断に関する情報に基づき書き込みを中断したところから書き込みを再開することを特徴とする請求項1に記載の電子装置。   The write control means writes information relating to the write interruption to a predetermined address of the non-volatile memory when interrupting the writing of data to the non-volatile memory, and then the voltage of the battery is restored to a predetermined voltage or higher. 2. The electronic device according to claim 1, wherein the writing is resumed from the point where the writing is interrupted based on the information regarding the interruption of writing. 前記不揮発性メモリはフラッシュメモリであることを特徴とする請求項1〜2のいずれか一つに記載の電子装置。   The electronic device according to claim 1, wherein the nonvolatile memory is a flash memory. 前記電力供給手段は、前記バッテリから供給される電力を前記スイッチング手段を介して蓄え、この蓄えた電力を前記不揮発性メモリに、前記蓄えた電力に応じた時間供給することを特徴とする請求項1〜3のいずれか一つに記載の電子装置。   The power supply means stores the power supplied from the battery via the switching means, and supplies the stored power to the nonvolatile memory for a time corresponding to the stored power. The electronic device according to any one of 1 to 3. 前記電力供給手段は、コンデンサであることを特徴とする請求項4に記載の電子装置。   The electronic device according to claim 4, wherein the power supply unit is a capacitor.
JP2004146745A 2004-05-17 2004-05-17 Electronic device Pending JP2005327210A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004146745A JP2005327210A (en) 2004-05-17 2004-05-17 Electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004146745A JP2005327210A (en) 2004-05-17 2004-05-17 Electronic device

Publications (1)

Publication Number Publication Date
JP2005327210A true JP2005327210A (en) 2005-11-24

Family

ID=35473508

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004146745A Pending JP2005327210A (en) 2004-05-17 2004-05-17 Electronic device

Country Status (1)

Country Link
JP (1) JP2005327210A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008065453A (en) * 2006-09-05 2008-03-21 Toa Corp Backup device
WO2010109880A1 (en) * 2009-03-26 2010-09-30 京セラ株式会社 Radio communication terminal
EP2312419A1 (en) 2009-10-19 2011-04-20 Ricoh Company, Ltd. Power supply control device, image forming apparatus, and method of controlling power supply
CN102183950A (en) * 2011-03-21 2011-09-14 浙江吉利汽车研究院有限公司 ECU (electronic control unit) data flashing device
JP2013045245A (en) * 2011-08-23 2013-03-04 Tdk Corp Power supply circuit, flash memory system having the power supply circuit, and power supply method
JP2013115866A (en) * 2011-11-25 2013-06-10 Mitsubishi Electric Corp Control device, storage device, and display device
US8806271B2 (en) 2008-12-09 2014-08-12 Samsung Electronics Co., Ltd. Auxiliary power supply and user device including the same
JP2014157455A (en) * 2013-02-15 2014-08-28 Mitsubishi Nichiyu Forklift Co Ltd Data writing control device and data writing control method
US9214197B2 (en) 2012-11-13 2015-12-15 Samsung Electronics Co., Ltd. Secondary memory device and electronic system employing the same
JP2016189110A (en) * 2015-03-30 2016-11-04 日本電気株式会社 Electronic circuit, arithmetic processing control method, program, and multi-core processor
US10281965B2 (en) 2017-02-13 2019-05-07 Apple Inc. Reduced power operation using stored capacitor energy
JP2020204921A (en) * 2019-06-18 2020-12-24 株式会社デンソー Data storing control unit and data storing control system

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008065453A (en) * 2006-09-05 2008-03-21 Toa Corp Backup device
US9626259B2 (en) 2008-12-09 2017-04-18 Samsung Electronics Co., Ltd. Auxiliary power supply and user device including the same
US8806271B2 (en) 2008-12-09 2014-08-12 Samsung Electronics Co., Ltd. Auxiliary power supply and user device including the same
US8781405B2 (en) 2009-03-26 2014-07-15 Kyocera Corporation Radio communication terminal
WO2010109880A1 (en) * 2009-03-26 2010-09-30 京セラ株式会社 Radio communication terminal
KR101527480B1 (en) * 2009-03-26 2015-06-09 교세라 가부시키가이샤 Radio communication terminal
JP5701746B2 (en) * 2009-03-26 2015-04-15 京セラ株式会社 Wireless communication terminal
CN102362239A (en) * 2009-03-26 2012-02-22 京瓷株式会社 Radio communication terminal
JP2011108219A (en) * 2009-10-19 2011-06-02 Ricoh Co Ltd Power supply control device, image forming apparatus, and method of controlling power supply
US8874278B2 (en) 2009-10-19 2014-10-28 Ricoh Company, Limited Power supply control device, image forming apparatus, and method of controlling power supply
EP2312419A1 (en) 2009-10-19 2011-04-20 Ricoh Company, Ltd. Power supply control device, image forming apparatus, and method of controlling power supply
CN102183950A (en) * 2011-03-21 2011-09-14 浙江吉利汽车研究院有限公司 ECU (electronic control unit) data flashing device
JP2013045245A (en) * 2011-08-23 2013-03-04 Tdk Corp Power supply circuit, flash memory system having the power supply circuit, and power supply method
JP2013115866A (en) * 2011-11-25 2013-06-10 Mitsubishi Electric Corp Control device, storage device, and display device
US9214197B2 (en) 2012-11-13 2015-12-15 Samsung Electronics Co., Ltd. Secondary memory device and electronic system employing the same
JP2014157455A (en) * 2013-02-15 2014-08-28 Mitsubishi Nichiyu Forklift Co Ltd Data writing control device and data writing control method
JP2016189110A (en) * 2015-03-30 2016-11-04 日本電気株式会社 Electronic circuit, arithmetic processing control method, program, and multi-core processor
US10534418B2 (en) 2015-03-30 2020-01-14 Nec Corporation Electronic circuit, arithmetic processing control method, program, and multi-core processor
US10281965B2 (en) 2017-02-13 2019-05-07 Apple Inc. Reduced power operation using stored capacitor energy
US10845856B2 (en) 2017-02-13 2020-11-24 Apple Inc. Reduced power operation using stored capacitor energy
JP2020204921A (en) * 2019-06-18 2020-12-24 株式会社デンソー Data storing control unit and data storing control system
US11210030B2 (en) 2019-06-18 2021-12-28 Denso Corporation Data storage control device and data storage control system
JP7279534B2 (en) 2019-06-18 2023-05-23 株式会社デンソー Data storage controller and data storage control system

Similar Documents

Publication Publication Date Title
JP2005327210A (en) Electronic device
JP2005051935A (en) Uninterruptible power supply unit
US6442702B1 (en) On-vehicle computer having function of protecting vehicular battery
JP2010055531A (en) Data processor
JP4135510B2 (en) Electronic control device and program
JP2001155781A (en) Secondary battery device
JP5018063B2 (en) Vehicle power supply
WO2001095335A1 (en) Data backup device and step-up/step-down power supply
JP2007156864A (en) Data retention unit
JP2003330580A (en) In-vehicle apparatus
JP6231752B2 (en) Device control apparatus and device control method
KR101076395B1 (en) Method of Controlling Power in an Video Recording Apparatus for Vehicles
JP2980704B2 (en) Programmable controller
JP2005339151A (en) Programmable controller
JP2003339125A (en) Backup power supply control circuit
JP2001341595A (en) Power source control device
JP3775001B2 (en) Vehicle navigation device
JP3226301B2 (en) Microcomputer system
JPH05342115A (en) Memory data protecting device against power source interruption
WO2015056426A1 (en) Data-storage control device
JPH0628267A (en) Information processor
JP4244965B2 (en) Power supply
JP4496938B2 (en) Nonvolatile memory writing circuit, portable information terminal, and data writing method of nonvolatile memory
JP2009181624A (en) Nonvolatile semiconductor memory device
JP3553452B2 (en) Gaming machine memory backup controller