JP5483930B2 - In-vehicle electronic device and control program - Google Patents

In-vehicle electronic device and control program Download PDF

Info

Publication number
JP5483930B2
JP5483930B2 JP2009124994A JP2009124994A JP5483930B2 JP 5483930 B2 JP5483930 B2 JP 5483930B2 JP 2009124994 A JP2009124994 A JP 2009124994A JP 2009124994 A JP2009124994 A JP 2009124994A JP 5483930 B2 JP5483930 B2 JP 5483930B2
Authority
JP
Japan
Prior art keywords
writing
file
entry information
file entry
write
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2009124994A
Other languages
Japanese (ja)
Other versions
JP2010272044A (en
Inventor
優次 谷口
琢 余川
芳和 植田
秀人 木村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Denso Ten Ltd
Original Assignee
Denso Ten Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Denso Ten Ltd filed Critical Denso Ten Ltd
Priority to JP2009124994A priority Critical patent/JP5483930B2/en
Publication of JP2010272044A publication Critical patent/JP2010272044A/en
Application granted granted Critical
Publication of JP5483930B2 publication Critical patent/JP5483930B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Navigation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

本発明は、単一のファイルを複数の領域に振り分けて格納する記憶デバイスを有するとともに、外部スイッチにより電源が投入・遮断される車載電子機器に関し、特に、前記記憶デバイスにデータ書込み中に電源が遮断されたときに、データを復旧する技術に関する。   The present invention relates to an in-vehicle electronic device that has a storage device that distributes and stores a single file into a plurality of areas, and that is powered on / off by an external switch. The present invention relates to a technique for recovering data when it is blocked.

近年の車載電子機器は、カーナビゲーションだけでなく、オーディオ、ビジュアルといった機能を備えることが求められる。そして、車載電子機器は、地図データ、楽曲データ、映像データといった種々のコンテンツデータを格納するための記憶デバイスを必要とする。これらのコンテンツデータは、大容量であるとともに適宜更新することが求められる。よって、大容量かつ書き換え可能な記憶デバイスとして、ハードディスク装置が用いられる。特許文献1には、コンテンツデータを格納するハードディスク装置について記載されている。   In-vehicle electronic devices in recent years are required to have not only car navigation but also audio and visual functions. The in-vehicle electronic device requires a storage device for storing various content data such as map data, music data, and video data. These contents data have a large capacity and are required to be updated appropriately. Therefore, a hard disk device is used as a large capacity and rewritable storage device. Patent Document 1 describes a hard disk device that stores content data.

ハードディスク装置は一般的に、単一のファイルを複数の領域(セクタ)に振り分けて格納する。またハードディスク装置は、ディスクをデータ領域と管理領域とに分け、データ領域にファイルのデータを格納する。そして、管理領域にファイルのいわば目次に相当する、ファイルエントリ情報とリンクリスト情報とを格納する。ファイルエントリ情報は、ファイルごとの開始位置(セクタ番号)を有する。また、リンクリスト情報は、ファイルが格納されたセクタのリンク順序を有する。   A hard disk device generally stores a single file by dividing it into a plurality of areas (sectors). The hard disk device also divides the disk into a data area and a management area, and stores file data in the data area. Then, file entry information and link list information corresponding to the so-called table of contents of the file are stored in the management area. The file entry information has a start position (sector number) for each file. The link list information has a link order of sectors in which files are stored.

車載電子機器では、ファイルシステムがハードディスク装置に対するファイルの読み書きを制御する。データを読み出すときには、ファイルシステムはまず管理領域のファイルエントリ情報とリンクリスト情報を読み出す。そして、ファイルの開始セクタ番号とセクタのリンク順序とを取得する。そして、データ領域内のセクタをリンク順序に従って開始セクタから順次参照してデータを読み出し、所望のファイルを読み出す。またファイルを書き込むときには、ファイルシステムはハードディスク装置から書込み可能なセクタ番号を取得する。そして、開始セクタ番号を有するファイルエントリ情報とセクタのリンク順序を有するリンクリスト情報とを管理領域に書き込むとともに、データ領域のセクタにファイルのデータを書き込む。   In an in-vehicle electronic device, a file system controls reading / writing of a file with respect to a hard disk device. When reading data, the file system first reads file entry information and link list information in the management area. Then, the start sector number of the file and the link order of the sectors are acquired. Then, the sector in the data area is sequentially referred to from the start sector according to the link order to read the data, and the desired file is read. When writing a file, the file system acquires a writable sector number from the hard disk device. Then, the file entry information having the start sector number and the link list information having the sector link order are written to the management area, and the file data is written to the sector in the data area.

特許第377922号公報Japanese Patent No. 377922

ハードディスク装置は、ファイル書込みの際、セクタごとにデータの書込みが完了したか否かを管理する。データの書込みが完了したセクタでは、以後、随時データの読み出しが可能となる。しかし、データの書込みが完了しないセクタでは、以後、データの読出しができなくなる。かかるセクタを、以下では不良セクタという。   When writing a file, the hard disk device manages whether or not data writing is completed for each sector. In the sector where data writing has been completed, data can be read out at any time thereafter. However, in a sector where data writing is not completed, data cannot be read thereafter. Such a sector is hereinafter referred to as a bad sector.

不良セクタが発生する原因の一つとして、ハードディスク装置にデータを書き込んでいるときの電源の瞬断があげられる。ここで、車載電子機器は一般的に、アクセサリスイッチにより車載バッテリと接続され、電源が投入・遮断される。そして、アクセサリスイッチは、電装品など他の車載機器に対しても電源を投入・遮断するように構成される。よって、ユーザは、アクセサリスイッチを開閉することにより、車載電子機器その他の機器に対する電源の投入・遮断を一括して行う傾向にある。このため、たとえばパーソナルコンピュータなどの汎用コンピュータと比べたときに、車載電子機器の正常な終了手順を経ずに電源が遮断される場合が多くなる。すると、ハードディスク装置において不良セクタが生じ、その後のファイルの読出しに支障をきたす確率が高くなる。   One cause of the occurrence of a bad sector is an instantaneous power interruption when data is being written to the hard disk device. Here, the in-vehicle electronic device is generally connected to the in-vehicle battery by an accessory switch, and the power is turned on / off. The accessory switch is configured to turn on / off power to other in-vehicle devices such as electrical components. Therefore, the user tends to collectively turn on and off power to the vehicle-mounted electronic device and other devices by opening and closing the accessory switch. For this reason, when compared with a general-purpose computer such as a personal computer, for example, the power supply is often shut down without going through a normal termination procedure of the in-vehicle electronic device. Then, a bad sector occurs in the hard disk device, and the probability of hindering subsequent file reading increases.

特に、管理領域に不良セクタが生じると、次のような問題が生じる。たとえばリンクリスト情報に不良セクタが生じると、不良セクタが生じた箇所以降のリンク順序を読み出せなくなり、セクタのリンクをたどれなくなる。すると、ファイルそのものを読み出せなくなる。あるいは、ファイルエントリ情報に不良セクタが生じると、不良セクタが生じた箇所におけるディレクトリとその下位のディレクトリに含まれるファイルの開始位置が読み出せなくなる。このように、書込み途中だったファイルだけでなく、書込みが完了したファイルや、すでに格納されていたファイルまで読み出せなくなる場合がある。   In particular, when a bad sector occurs in the management area, the following problem occurs. For example, if a bad sector occurs in the link list information, the link order after the place where the bad sector occurs cannot be read, and the link of the sector is not traced. Then, the file itself cannot be read. Alternatively, when a bad sector occurs in the file entry information, it is impossible to read the start position of the file included in the directory where the bad sector occurs and the directory below it. As described above, there are cases where it is not possible to read not only the file that was being written but also the file that has been written and the file that has already been stored.

この点、汎用コンピュータであれば、ファイルエントリ情報やリンクリスト情報に書き込むデータの履歴を不揮発メモリまたはハードディスクに格納したり、ハードディスク内にこれらの情報のバックアップデータを作成したりして、復旧に備える方法が提案されている。しかし、前者の方法は大容量のメモリまたはハードディスクを必要とするので、小型化と低コスト化の要望が強い車載電子機器には好ましくない。また、後者の方法では、バックアップしたデータを不良セクタが生じたファイルエントリ情報やリンクリスト情報に移植する復旧処理に、ある程度の時間がかかる。車載電子機器では汎用コンピュータより高頻度で復旧処理が発生しうることを考慮すると、長時間の復旧処理はユーザの利便性を損ねるおそれがあり、好ましくない。   In this regard, if it is a general-purpose computer, the history of data written to file entry information and link list information is stored in nonvolatile memory or a hard disk, or backup data of such information is created in the hard disk to prepare for recovery. A method has been proposed. However, since the former method requires a large-capacity memory or hard disk, it is not preferable for an in-vehicle electronic device that is strongly demanded for downsizing and cost reduction. In the latter method, it takes a certain amount of time to restore the backed up data to the file entry information or link list information in which a bad sector has occurred. Considering that restoration processing can occur more frequently in a vehicle-mounted electronic device than a general-purpose computer, long-time restoration processing is not preferable because it may impair user convenience.

そこで、上記に鑑みてなされた本発明の目的は、コスト増を伴わず、かつ短時間でファイルエントリ情報やリンクリスト情報を復旧可能な、車載電子機器を提供することにある。   Accordingly, an object of the present invention made in view of the above is to provide an in-vehicle electronic device capable of recovering file entry information and link list information in a short time without increasing the cost.

上記の目的を達成するために、本発明の第1の側面における車載電子機器は、単一のファイルを複数の領域に振り分けて格納する記憶デバイスを有するとともに、車載バッテリからの電源が投入・遮断される車載電子機器であって、前記電源が遮断されたときでもデータを保持可能なメモリを有する。そして、書込手段が、前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記リンクリスト情報をその一部である第1の書込み単位ごとに前記記憶デバイスにおける複数のリンクリスト情報書込み位置に書き込む。また、バックアップ手段が、前記複数のリンクリスト情報書込み位置と、当該複数のリンクリスト情報書込み位置に対する前記第1の書込み単位の書込み終了を示すデータとを前記メモリに格納する。さらに、復旧手段が、前記電源が遮断された後再投入されたときに、前記複数のリンクリスト情報書込み位置のうち第1のリンクリスト情報書込み位置に対する前記第1の書込み単位の書込みが終了していない場合には、第2のリンクリスト情報書込み位置に書き込まれたデータを前記第1のリンクリスト情報書込み位置に書き込むことを特徴とする。   In order to achieve the above object, the in-vehicle electronic device according to the first aspect of the present invention has a storage device that distributes and stores a single file into a plurality of areas, and the power from the in-vehicle battery is turned on / off. And a memory capable of holding data even when the power is turned off. Then, the storage unit stores file entry information having a start position of the file when the file is stored in the storage device, and link list information having a link order of the area from the start position. When writing to the storage device, the link list information is written to a plurality of link list information writing positions in the storage device for each first writing unit as a part thereof. Further, the backup means stores the plurality of link list information write positions and data indicating the end of writing of the first write unit for the plurality of link list information write positions in the memory. Further, when the restoration means is turned on again after the power is turned off, writing of the first write unit to the first link list information writing position among the plurality of link list information writing positions is completed. If not, the data written in the second link list information write position is written in the first link list information write position.

また、本発明の第2の側面における車載電子機器は、書込手段が、前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記ファイルエントリ情報をその一部である第2の書込み単位ごとに前記記憶デバイスにおける複数のファイルエントリ情報書込み位置に書き込む。また、バックアップ手段が、前記複数のファイルエントリ情報書込み位置のうち第1のファイルエントリ情報書込み位置を前記記憶デバイスに書き込む。そして、復旧手段が、前記電源が遮断された後再投入されたときに、前記第1のファイルエントリ情報書込み位置に対する前記第2の書込み単位の書込みが終了していない場合には、第2のファイルエントリ情報書込み位置に書き込まれたデータを前記第1のファイルエントリ情報書込み位置に書き込むことを特徴とする。   Further, in the in-vehicle electronic device according to the second aspect of the present invention, the writing means has file entry information having a start position of the file when the file is stored in the storage device, and the area from the start position. When the link list information having the link order is written to the storage device, the file entry information is written to a plurality of file entry information write positions in the storage device for each second write unit as a part thereof. Further, the backup means writes the first file entry information write position among the plurality of file entry information write positions to the storage device. When the restoration means is not turned on when the second file unit is written to the first file entry information write position when the power is turned off and then turned on again, the second means The data written in the file entry information write position is written in the first file entry information write position.

さらに、本発明の第3の側面における車載電子機器は、書込手段が、前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記ファイルエントリ情報をその一部である第2の書込み単位ごとに前記記憶デバイスにおけるファイルエントリ情報書込み位置に書き込む。また、バックアップ手段が、前記第2の書込み単位と前記ファイルエントリ情報書込み位置とを前記メモリに格納する。そして、復旧手段が、前記電源が遮断された後再投入されたときに、前記ファイルエントリ情報書込み位置に対する前記メモリに格納された第2の書込み単位の書込みが終了していない場合には、当該第2の書込み単位を当該ファイルエントリ情報書込み位置に書き込むことを特徴とする。   Furthermore, in the vehicle-mounted electronic device according to the third aspect of the present invention, the writing means stores file entry information having a start position of the file when the file is stored in the storage device, and the area from the start position. When the link list information having the link order is written to the storage device, the file entry information is written to the file entry information write position in the storage device for each second write unit as a part thereof. The backup unit stores the second write unit and the file entry information write position in the memory. When the restoration means is not turned on when the second write unit stored in the memory with respect to the file entry information write position is finished when the power is turned off and then turned on again, The second writing unit is written in the file entry information writing position.

本発明によれば、コスト増を伴わず、かつ短時間でリンクリスト情報やファイルエントリ情報を復旧可能な車載電子機器が提供される。   According to the present invention, an in-vehicle electronic device capable of recovering link list information and file entry information in a short time without increasing costs is provided.

本実施形態における車載電子機器の使用状況を説明する図である。It is a figure explaining the use condition of the vehicle-mounted electronic device in this embodiment. 車載電子機器10の構成を説明するブロック図である。2 is a block diagram illustrating a configuration of an in-vehicle electronic device 10. FIG. ハードディスク装置19に対するデータの読み書きについて説明する図である。FIG. 4 is a diagram for explaining reading and writing of data with respect to a hard disk device 19. リンクリスト情報の復旧における、書込手段、バックアップ手段としてのファイルシステム128aの動作について説明する図である。It is a figure explaining operation | movement of the file system 128a as a writing means and a backup means in recovery | restoration of link list information. ファイルシステム128aの復旧手段としての動作について説明する図である。It is a figure explaining the operation | movement as a recovery means of the file system 128a. リンクリスト情報LLの復旧方法における変形例について説明する図である。It is a figure explaining the modification in the restoration method of link list information LL. ファイルエントリ情報の復旧における、ファイルシステム128aの、書込手段、バックアップ手段としての動作について説明する。The operation of the file system 128a as the writing unit and the backup unit in the restoration of the file entry information will be described. ファイルシステム128aの復旧手段としての動作について説明する図である。It is a figure explaining the operation | movement as a recovery means of the file system 128a. バックアップメモリ18にバックアップデータを作成する方法について説明する図である。3 is a diagram for explaining a method of creating backup data in a backup memory 18. FIG. バックアップメモリ18に格納されるデータについて説明する図である。FIG. 4 is a diagram for explaining data stored in a backup memory 18. ハードディスク装置19にデータを書き込むときの車載電子機器10の動作手順を説明するフローチャート図である。FIG. 5 is a flowchart for explaining an operation procedure of the in-vehicle electronic device 10 when writing data to the hard disk device 19. 復旧方法を実行するときの、車載電子機器10の動作手順を説明するフローチャート図である。It is a flowchart figure explaining the operation | movement procedure of the vehicle-mounted electronic device 10 when performing the recovery method. リンクリスト情報復旧処理の手順を説明するフローチャート図である。It is a flowchart figure explaining the procedure of a link list information restoration process. ファイルエントリ情報復旧処理の手順を説明するフローチャート図である。It is a flowchart figure explaining the procedure of a file entry information recovery process. ファイルエントリ情報復旧処理の別の手順を説明するフローチャート図である。It is a flowchart explaining another procedure of file entry information recovery processing.

以下、図面にしたがって本発明の実施の形態について説明する。但し、本発明の技術的範囲はこれらの実施の形態に限定されず、特許請求の範囲に記載された事項とその均等物まで及ぶものである。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the technical scope of the present invention is not limited to these embodiments, but extends to the matters described in the claims and equivalents thereof.

図1は、本実施形態における車載電子機器の使用状況を説明する図である。車載電子機器10は、カーナビゲーション、オーディオ、及びビジュアル機能が一体化された車載電子機器である。車載電子機器10は、地図データ、楽曲データ、映像データといったコンテンツデータを格納するためのハードディスク装置19を有する。また、車載電子機器10は、ハードディスク装置19に対するコンテンツデータの読み書きを制御する読み書き制御部128を有する。車載電子機器10は、読み書き制御部128によりハードディスク装置19に格納した地図データを読み出し、経路探索を行う。また、車載電子機器10は、読み書き制御部128によりハードディスク装置19に格納した楽曲データや映像データを読み出し、楽曲や映像を再生出力する。   FIG. 1 is a diagram for explaining a usage state of an in-vehicle electronic device in the present embodiment. The in-vehicle electronic device 10 is an in-vehicle electronic device in which car navigation, audio, and visual functions are integrated. The in-vehicle electronic device 10 includes a hard disk device 19 for storing content data such as map data, music data, and video data. The in-vehicle electronic device 10 includes a read / write control unit 128 that controls reading / writing of content data with respect to the hard disk device 19. The in-vehicle electronic device 10 reads the map data stored in the hard disk device 19 by the read / write control unit 128 and performs a route search. The in-vehicle electronic device 10 reads out music data and video data stored in the hard disk device 19 by the read / write control unit 128 and reproduces and outputs the music and video.

車載電子機器10は、公衆通信網50と接続可能に構成される。公衆通信網50は、たとえばインターネットやVICS(Vehicle Information and Communication System)通信網である。車載電子機器10は、公衆通信網50を介してコンテンツデータ提供者のサーバ(図示は省略)に接続し、コンテンツデータをダウンロードする。そして、ダウンロードしたコンテンツデータをハードディスク装置19に格納する。かかるコンテンツデータには、上記のような楽曲データや映像データのほかに、音楽CDのTOC(Table of Contents)やCDDB(CD Data Base)などが含まれる。また、車載電子機器10は、公衆通信網50以外に、無線放送により伝送されるコンテンツデータを受信してもよい。   The in-vehicle electronic device 10 is configured to be connectable to the public communication network 50. The public communication network 50 is, for example, the Internet or a VICS (Vehicle Information and Communication System) communication network. The in-vehicle electronic device 10 connects to a content data provider server (not shown) via the public communication network 50 and downloads the content data. The downloaded content data is stored in the hard disk device 19. Such content data includes TOC (Table of Contents) of music CD, CDDB (CD Data Base), etc. in addition to the music data and video data as described above. Further, the in-vehicle electronic device 10 may receive content data transmitted by wireless broadcasting in addition to the public communication network 50.

また、車載電子機器10は、外部の記憶媒体7と接続可能に構成される。記憶媒体7は、たとえばUSBメモリやSDカードである。車載電子機器10は、外部の記憶媒体7からコンテンツデータを読み出し、ハードディスク装置19に格納する。ユーザは、汎用コンピュータその他の情報処理装置を用いてこれら記憶媒体7にコンテンツデータを格納することにより、記憶媒体7を介して車載電子機器10にコンテンツデータを移植することができる。   The in-vehicle electronic device 10 is configured to be connectable to an external storage medium 7. The storage medium 7 is, for example, a USB memory or an SD card. The in-vehicle electronic device 10 reads content data from the external storage medium 7 and stores it in the hard disk device 19. The user can transplant the content data to the in-vehicle electronic device 10 through the storage medium 7 by storing the content data in the storage medium 7 using a general-purpose computer or other information processing apparatus.

このように、車載電子機器10は、ユーザの希望により随時、公衆通信網50や記憶媒体7により新規のコンテンツデータを取得できる。よって、ハードディスク装置19に格納されるコンテンツデータは、適宜、更新される。   In this way, the in-vehicle electronic device 10 can acquire new content data from the public communication network 50 or the storage medium 7 at any time according to the user's request. Therefore, the content data stored in the hard disk device 19 is updated as appropriate.

また、車載電子機器10は、車載バッテリ20と車載電子機器10外部のアクセサリ(ACC)スイッチ22により接続され電源が投入・遮断される。車載電子機器10は、ACCスイッチ22がオンのときに電源が投入されて動作する。一方、ACCスイッチ22がオフのときには電源が遮断され、動作を中断する。またACCスイッチ22は、同じ車両に搭載された電装品などの機器に車載バッテリ20からの電源を投入・遮断する。よって、ユーザがACCスイッチ22を開閉することにより、車載電子機器10を含む機器への電源を一括して投入・遮断する場合がある。   Further, the in-vehicle electronic device 10 is connected by an in-vehicle battery 20 and an accessory (ACC) switch 22 outside the in-vehicle electronic device 10 to be turned on / off. The in-vehicle electronic device 10 operates by turning on the power when the ACC switch 22 is on. On the other hand, when the ACC switch 22 is off, the power is cut off and the operation is interrupted. The ACC switch 22 turns on / off the power from the in-vehicle battery 20 to devices such as electrical components mounted on the same vehicle. Therefore, when the user opens / closes the ACC switch 22, the power to the devices including the in-vehicle electronic device 10 may be turned on / off collectively.

ここで、ハードディスク装置19がデータの書込みを行っているときに電源が遮断されると、ハードディスクに不良セクタが生じる。すると読み書き制御部128が不良セクタに対する読み書きをしようとしたときに、ハードディスク装置19は読み書き制御部128にエラーを通知する。よって、データの読み書きに支障を来すようになる。本実施形態では、後述する方法により、不良セクタが生じた場合であっても以後のデータ読出しを可能にする。   Here, if the power is turned off while the hard disk device 19 is writing data, a bad sector is generated in the hard disk. Then, when the read / write control unit 128 tries to read / write a bad sector, the hard disk device 19 notifies the read / write control unit 128 of an error. Therefore, the reading and writing of data will be hindered. In the present embodiment, the method described later enables subsequent data reading even when a defective sector occurs.

図2は、車載電子機器10の構成を説明するブロック図である。車載電子機器10では、CPU(Central Processing Unit)12が、種々の制御プログラムや処理プログラムを実行して、システム制御部122、ナビゲーション制御部124、メイン制御部126、読み書き制御部128、及びデコード部140を構成する。ROM(Read Only Memory)14は、CPU12が実行する制御プログラムや処理プログラムを格納する。RAM(Random Access Memory)16は、CPU12が動作するときに各種演算のためのデータを一時的に格納し、作業領域として用いられる。   FIG. 2 is a block diagram illustrating the configuration of the in-vehicle electronic device 10. In the in-vehicle electronic device 10, a CPU (Central Processing Unit) 12 executes various control programs and processing programs, and a system control unit 122, a navigation control unit 124, a main control unit 126, a read / write control unit 128, and a decoding unit. 140 is configured. A ROM (Read Only Memory) 14 stores a control program and a processing program executed by the CPU 12. A RAM (Random Access Memory) 16 temporarily stores data for various calculations when the CPU 12 operates, and is used as a work area.

システム制御部122は、車載電子機器10全体の動作を統括的に制御する。また、車載電子機器10への電源投入を検知して、ナビゲーション制御部124、メイン制御部126、読み書き制御部128、及びデコード部140を起動する。   The system control unit 122 controls the overall operation of the in-vehicle electronic device 10. In addition, the navigation control unit 124, the main control unit 126, the read / write control unit 128, and the decoding unit 140 are activated upon detection of power-on to the in-vehicle electronic device 10.

ナビゲーション制御部124は、地図データに基づきカーナビゲーションのための経路探索処理を行う。地図データは、ハードディスク装置19に格納される。また、表示部3や操作入力部4と、他の各部とのインターフェイスを提供する。すなわち、表示部3に表示させる画像データを生成したり、操作入力部4からの入力を他の各部に受け渡したりする。   The navigation control unit 124 performs a route search process for car navigation based on the map data. The map data is stored in the hard disk device 19. In addition, an interface between the display unit 3 and the operation input unit 4 and other units is provided. That is, image data to be displayed on the display unit 3 is generated, or input from the operation input unit 4 is transferred to other units.

メイン制御部126は、カーオーディオやビジュアル機能を実現するための制御を行う。メイン制御部126は、ユーザによる楽曲再生指示や映像再生指示を操作入力部4から受ける。そして、読み書き制御部128を介して楽曲データや映像データなどのコンテンツデータを取得する。コンテンツデータは、接続ポート6に接続される記憶媒体7やハードディスク装置19に格納される。あるいは、メイン制御部126は、オーディオデッキ21からコンテンツデータを取得する。オーディオデッキ21は、CDやDVDといった記憶媒体からコンテンツデータを読み出す。そして、メイン制御部126は、コンテンツデータをデコード部140に渡す。   The main control unit 126 performs control for realizing car audio and visual functions. The main control unit 126 receives a music reproduction instruction and a video reproduction instruction from the user from the operation input unit 4. Then, content data such as music data and video data is acquired via the read / write controller 128. The content data is stored in the storage medium 7 or the hard disk device 19 connected to the connection port 6. Alternatively, the main control unit 126 acquires content data from the audio deck 21. The audio deck 21 reads content data from a storage medium such as a CD or a DVD. Then, the main control unit 126 passes the content data to the decoding unit 140.

デコード部140は、楽曲データをデコードして音声信号を生成し、車載されたスピーカ8に出力する。あるいは、映像データをデコードして映像信号を生成し、ナビゲーション制御部124を介して表示部3に出力する。   The decoding unit 140 decodes the music data to generate an audio signal and outputs it to the speaker 8 mounted on the vehicle. Alternatively, the video data is decoded to generate a video signal, which is output to the display unit 3 via the navigation control unit 124.

またメイン制御部126は、ユーザによるコンテンツデータのダウンロード指示を操作入力部4から受ける。そして、通信部19を介して公衆通信網50に接続し、公衆通信網50経由でコンテンツデータ提供者のサーバに接続する。通信部19は、無線通信により公衆通信網50と接続可能に構成される。そしてメイン制御部126は、そのサーバからコンテンツデータをダウンロードする。そして、ダウンロードしたコンテンツデータを、読み書き制御部128を介してハードディクス装置19に格納する。あるいは、通信部19は、無線放送により伝送されるコンテンツデータを受信してもよい。   The main control unit 126 receives a content data download instruction from the operation input unit 4 by the user. Then, it connects to the public communication network 50 via the communication unit 19 and connects to the server of the content data provider via the public communication network 50. The communication unit 19 is configured to be connectable to the public communication network 50 by wireless communication. The main control unit 126 then downloads content data from the server. Then, the downloaded content data is stored in the hard disk device 19 via the read / write control unit 128. Alternatively, the communication unit 19 may receive content data transmitted by wireless broadcasting.

また、メイン制御部126は、ユーザによるコンテンツデータの転送指示を操作入力部4から受ける。そして、読み書き制御部128を介して記憶媒体7からコンテンツデータを取得する。そして、取得したコンテンツデータを読み書き制御部128を介してハードディクス装置19に格納する。   The main control unit 126 receives a content data transfer instruction from the operation input unit 4 by the user. Then, content data is acquired from the storage medium 7 via the read / write controller 128. Then, the acquired content data is stored in the hard disk device 19 via the read / write control unit 128.

読み書き制御部128は、接続ポート6に接続される記憶媒体7やハードディスク装置19に対し、コンテンツデータの読出しや書込みを行う。読み書き制御部128は、デバイスドライバ128bとファイルシステム128aを有する。デバイスドライバ128bは、記憶媒体7とハードディスク装置19に対し、コンテンツデータを読み書きする位置とコンテンツデータの受渡しを行う。ファイルシステム128aは、デバイスドライバ128bに対し、コンテンツデータをファイルとして読み書きする位置の指示と、コンテンツデータの受渡しを行う。その動作については、後に詳述する。   The read / write control unit 128 reads and writes content data from and to the storage medium 7 and the hard disk device 19 connected to the connection port 6. The read / write control unit 128 includes a device driver 128b and a file system 128a. The device driver 128b delivers the content data reading / writing position and the content data to the storage medium 7 and the hard disk device 19. The file system 128a instructs the device driver 128b to read / write the content data as a file and deliver the content data. The operation will be described in detail later.

ハードディスク装置19は、磁性体が塗布されたハードディスク19aと、これにデータを書き込む磁気ヘッド、及びこれらのドライブ機構とその制御回路を有する。ハードディスクは、管理領域とデータ領域とを有する。ハードディスク装置19は、管理領域とデータ領域においてセクタ単位でデータを格納する。このとき、単一のファイルを複数のセクタに振り分けて格納する。ハードディスク装置19は、ACCスイッチ22がオンのときに電源が投入されて動作する。そして、ACCスイッチ22がオフのときには電源が遮断され、動作を中断する。   The hard disk device 19 includes a hard disk 19a coated with a magnetic material, a magnetic head for writing data on the hard disk 19a, a drive mechanism thereof, and a control circuit for the magnetic head. The hard disk has a management area and a data area. The hard disk device 19 stores data in units of sectors in the management area and the data area. At this time, a single file is distributed and stored in a plurality of sectors. The hard disk device 19 operates when the power is turned on when the ACC switch 22 is on. When the ACC switch 22 is off, the power is cut off and the operation is interrupted.

車載電子機器10は、ROM14やRAM16のほかに、バックアップメモリ18を有する。バックアップメモリ18は、ACCスイッチ22により車載バッテリ20からの電源が遮断されたときでも、格納したデータを保持できるように構成される。たとえば、バックアップ電源を有するDRAM(Dynamic RAM)やSDRAM(Synchronous DRAM)で構成される。あるいは、EEPROM(Electrically Erasable and Programmable ROM)などの書換え可能な不揮発性メモリで構成してもよい。本実施形態では、バックアップメモリ18はハードディスク装置19に格納されるファイルの復旧に必要なデータを保持する。その詳細については後に詳述する。   The in-vehicle electronic device 10 includes a backup memory 18 in addition to the ROM 14 and the RAM 16. The backup memory 18 is configured to retain stored data even when the power from the in-vehicle battery 20 is cut off by the ACC switch 22. For example, it is composed of DRAM (Dynamic RAM) or SDRAM (Synchronous DRAM) having a backup power source. Alternatively, a rewritable nonvolatile memory such as an EEPROM (Electrically Erasable and Programmable ROM) may be used. In this embodiment, the backup memory 18 holds data necessary for recovery of files stored in the hard disk device 19. Details thereof will be described later.

図3は、ハードディスク装置19に対するデータの読み書きについて説明する図である。ハードディスク装置19のハードディスク19aは、管理領域MAとデータ領域DAを有する。ハードディスク装置19は、管理領域MAにファイルエントリ情報FEとリンクリスト情報LLを格納し、データ領域DAにデータのファイルを格納する。またハードディスク装置19は、管理領域MAとデータ領域DAでは、セクタ単位でデータを格納する。   FIG. 3 is a diagram for explaining reading and writing of data with respect to the hard disk device 19. The hard disk 19a of the hard disk device 19 has a management area MA and a data area DA. The hard disk device 19 stores file entry information FE and link list information LL in the management area MA, and stores a data file in the data area DA. The hard disk device 19 stores data in units of sectors in the management area MA and the data area DA.

ファイルエントリ情報FEは、ファイル名「File_001」、「File_002」、「File_003」・・・と、ファイルの開始位置である開始セクタ番号を有する。ファイルエントリ情報FEはさらに、図示を省略するが、ファイルごとのデータ容量を有する。リンクリスト情報LLは、ファイルが格納されたセクタのリンク順序を有する。リンクリスト情報LLはたとえば、FAT(File Allocation Table)である。FATの場合、複数のセクタを1つのクラスタとして取り扱い、クラスタ単位でセクタのリンク順序を有する。ただし、ここでは便宜上、リンクリスト情報LLはセクタ単位でリンク順序を有するものとして説明する。   The file entry information FE has file names “File — 001”, “File — 002”, “File — 003”, and so on, and a start sector number that is the start position of the file. The file entry information FE further has a data capacity for each file, although not shown. The link list information LL has a link order of sectors in which files are stored. The link list information LL is, for example, FAT (File Allocation Table). In the case of FAT, a plurality of sectors are handled as one cluster, and the sector link order is provided in cluster units. However, here, for convenience, the link list information LL will be described as having a link order in units of sectors.

まず、ファイル「File_001」を例として、ファイルの書込みについて説明する。   First, file writing will be described by taking the file “File_001” as an example.

ハードディスク装置19は、データ領域DAの空き状況に応じて、ファイル「File_001」をセクタSECに格納する。ここで、セクタSECは、それぞれセクタ番号「001」、「008」、「010」、「003」、「020」を有する。そして、セクタSECは、この順序でリンクする。ここで、ファイル「File_001」の開始セクタ番号は「001」である。   The hard disk device 19 stores the file “File_001” in the sector SEC according to the availability of the data area DA. Here, the sector SEC has sector numbers “001”, “008”, “010”, “003”, and “020”, respectively. The sectors SEC are linked in this order. Here, the start sector number of the file “File_001” is “001”.

ファイルシステム128aは、各セクタ番号をハードディスク装置19から受け取る。そして、ファイルエントリ情報FEに、ファイル名「File_001」と開始セクタ番号「001」を書き込む(矢印F1)。   The file system 128 a receives each sector number from the hard disk device 19. Then, the file name “File — 001” and the start sector number “001” are written in the file entry information FE (arrow F1).

そして、ファイルシステム128aは、リンクリスト情報LLにセクタのリンク順序を書き込む。リンクリスト情報LLのインデックス番号は、セクタ番号に対応する。そして、各インデックス番号には次のセクタ番号が対応づけて登録される。よって、ファイル「File_001」のセクタのリンク順序は、インデックス番号に従って「001」「008」、「010」、「003」、「020(END)」のようにたどることができる。   Then, the file system 128a writes the sector link order in the link list information LL. The index number of the link list information LL corresponds to the sector number. Each index number is registered in association with the next sector number. Therefore, the link order of the sector of the file “File_001” can be traced as “001”, “008”, “010”, “003”, “020 (END)” according to the index number.

次に、ファイルの読出しについて説明する。上記このようにして書き込まれたファイル「File_001」を読み出すときには、ファイルシステム128aはまずファイルエントリ情報FEからファイル名「File_001」とその開始セクタ位置「001」を検索する。そして、リンクリスト情報LLからセクタSECのリンク順序を取得する。つまり、インデックス番号「001」「008」、「010」、「003」、「020(END)」を検索する。そして、データ領域DAのセクタSECをその順序で参照して、格納されたデータを読み出す。このようにして、ファイル「File_001」が読み出される。   Next, file reading will be described. When reading the file “File — 001” written as described above, the file system 128 a first searches the file entry information FE for the file name “File — 001” and its start sector position “001”. Then, the link order of the sector SEC is acquired from the link list information LL. That is, the index numbers “001”, “008”, “010”, “003”, and “020 (END)” are searched. Then, the stored data is read by referring to the sectors SEC in the data area DA in that order. In this way, the file “File_001” is read.

なお、一旦書き込んだファイルを更新するときには、ファイルシステム128aは、上記のようにして検索したリンク順序で、セクタSECに対し順次更新データを書き込む。   When the file once written is updated, the file system 128a sequentially writes the update data to the sector SEC in the link order searched as described above.

ここで、ファイルエントリ情報FEやリンクリスト情報LLを書き込むときに車載電子機器10の電源が遮断され、管理領域MAに不良セクタが生じると、以後のファイル読み出しに支障をきたす。かかる場合にファイルエントリ情報FEやリンクリスト情報LLの復旧を行うために、ファイルシステム128aは次のような処理を実行する。本実施形態では、以下で説明するファイルエントリ情報FEやリンクリスト情報LLの復旧処理を行うファイルシステム128aが、本発明における「書込手段」、「バックアップ手段」、及び「復旧手段」に対応する。   Here, when the power source of the in-vehicle electronic device 10 is cut off when the file entry information FE and the link list information LL are written and a defective sector is generated in the management area MA, the subsequent file reading is hindered. In such a case, in order to recover the file entry information FE and the link list information LL, the file system 128a executes the following processing. In the present embodiment, the file system 128a that performs recovery processing of the file entry information FE and link list information LL described below corresponds to the “writing unit”, “backup unit”, and “recovery unit” in the present invention. .

説明の便宜上、まずリンクリスト情報LLの復旧方法について説明する。次いで、ファイルエントリ情報FEの復旧方法について説明する。   For convenience of explanation, a method for restoring the link list information LL will be described first. Next, a method for restoring the file entry information FE will be described.

[1] リンクリスト情報LLの復旧方法
図4、図5は、リンクリスト情報LLの復旧方法について説明する図である。本実施形態では、ファイルシステム128aは、リンクリスト情報LLのバックアップデータをハードディスク19aの管理領域MAに作成する。そうすることによりデータを冗長化して、不良セクタが生じたときに備える。なお、FATの仕様によれば、管理領域MAには2つのFATを格納するための領域を設けることが可能である。以下では、リンクリスト情報LL1とそのバックアップデータのリンクリスト情報LL2を例として説明する。
[1] Method for Restoring Link List Information LL FIGS. 4 and 5 are diagrams illustrating a method for restoring the link list information LL. In the present embodiment, the file system 128a creates backup data of the link list information LL in the management area MA of the hard disk 19a. By doing so, data is made redundant so that a bad sector is prepared. According to the FAT specification, the management area MA can be provided with areas for storing two FATs. Hereinafter, the link list information LL1 and the link list information LL2 of the backup data will be described as an example.

まず図4で、書込手段、バックアップ手段としてのファイルシステム128aの動作について説明する。ファイルシステム128は、書込手段として、リンクリスト情報LL1、LL2をハードディスク装置19に書き込む際、所定の書込み単位WUごとにリンクリスト情報LL1、LL2の一部を作成してRAMに格納する(S1)。ここで書込み単位WUは、たとえば1セクタに相当する512バイト分のデータである。   First, referring to FIG. 4, the operation of the file system 128a as a writing unit and a backup unit will be described. When writing the link list information LL1 and LL2 to the hard disk device 19 as writing means, the file system 128 creates part of the link list information LL1 and LL2 for each predetermined write unit WU and stores it in the RAM (S1). ). Here, the write unit WU is, for example, 512 bytes of data corresponding to one sector.

そして、ファイルシステム128aがバックアップ手段として、書込み単位WUを書き込む位置と、書込み終了を示すフラグデータ(以下、書込みフラグ)とをバックアップメモリ18に格納する。ここで、書込み単位WUを書き込む位置は、セクタ番号やそのアドレスである。このときファイルシステム128aは、リンクリスト情報LL1、LL2ごとに、書込み位置WP1、WP2と書込みフラグWF1、WF2をバックアップメモリ18に格納する(S2)。ここにおいて、書込み位置WP1、WP2が、「リンクリスト情報書込み位置」に対応する。また以下では、書込みフラグWF1、WF2の値「ON」は書込みが完了していない状態を示し、「OFF」は書込み完了を示す。そして、書込みフラグWP1、WP2は、「OFF」を初期値として書き込まれる。   Then, the file system 128a stores, as backup means, the position where the write unit WU is written and flag data indicating the end of writing (hereinafter, write flag) in the backup memory 18. Here, the position where the write unit WU is written is the sector number or its address. At this time, the file system 128a stores the write positions WP1 and WP2 and the write flags WF1 and WF2 in the backup memory 18 for each of the link list information LL1 and LL2 (S2). Here, the write positions WP1 and WP2 correspond to the “link list information write position”. In the following, the values “ON” of the write flags WF1 and WF2 indicate a state where the writing is not completed, and “OFF” indicates the completion of writing. The write flags WP1 and WP2 are written with “OFF” as an initial value.

次に、ファイルシステム128aが書込手段として、書込み単位WUをハードディスク装置19に書き込む。このとき、まず書込みフラグWF1を「ON」にし、リンクリスト情報LL1に対し書込み単位WUを書き込む(S3)。このとき、書込み位置WP1に対応するセクタSEC_WP1に書込み単位WUを書き込む。そして、リンクリスト情報LL1に対する書込み単位WUの書込みが終了すると、ファイルシステム128aは、バックアップ手段として書込みフラグWF1を「OFF」にする(S3´)。次に、ファイルシステム128aは書込みフラグWF2を「ON」にし、リンクリスト情報LL2に対し書込み単位WUを書き込む(S4)。このとき、書込み位置WP2に対応するセクタSEC_WP2に書込み単位WUを書き込む。そして、リンクリスト情報LL2に対する書込み単位の書込みが終了すると、書込みフラグWF2を「OFF」にする(S4´)。   Next, the file system 128a writes the write unit WU to the hard disk device 19 as a writing means. At this time, first, the write flag WF1 is set to “ON”, and the write unit WU is written to the link list information LL1 (S3). At this time, the write unit WU is written in the sector SEC_WP1 corresponding to the write position WP1. When the writing of the write unit WU to the link list information LL1 is completed, the file system 128a sets the write flag WF1 to “OFF” as backup means (S3 ′). Next, the file system 128a sets the write flag WF2 to “ON” and writes the write unit WU to the link list information LL2 (S4). At this time, the write unit WU is written in the sector SEC_WP2 corresponding to the write position WP2. When the writing of the writing unit to the link list information LL2 is completed, the writing flag WF2 is set to “OFF” (S4 ′).

このような動作を繰り返すことにより、リンクリスト情報LL1、LL2が管理領域MAに書き込まれる。このとき、バックアップメモリ18に格納される書込み位置WP1、WP2は、書込み単位WUごとに上書きされる。また書込みフラグWP1、WP2の初期値は、その度ごとに「OFF」に設定される。   By repeating such an operation, the link list information LL1, LL2 is written in the management area MA. At this time, the write positions WP1 and WP2 stored in the backup memory 18 are overwritten for each write unit WU. The initial values of the write flags WP1 and WP2 are set to “OFF” each time.

上記の処理において、たとえばリンクリスト情報LL1に書込み単位WUを書き込んでいるときに電源が遮断されると、書込みフラグWF1は「ON」、書込みフラグWF2は「OFF」の状態でバックアップメモリ18に保持される。また、リンクリスト情報LL2に書込み単位を書き込んでいるときに電源が遮断されると、書込みフラグWF1は「OFF」、書込みフラグWF2は「ON」の状態でバックアップメモリ18に保持される。   In the above processing, for example, if the power is shut down while writing unit WU is written in link list information LL1, write flag WF1 is held in backup memory 18 with "ON" and write flag WF2 being "OFF". Is done. Further, when the power is shut off while writing the write unit in the link list information LL2, the write flag WF1 is held in the backup memory 18 in a state of “OFF” and the write flag WF2 is “ON”.

よって、電源が復帰した後に、ファイルシステム128aは復旧手段として、まず書込みフラグWF1、WF2を読み出して、リンクリスト情報LL1、LL2のどちらを書き込んでいるときに電源が遮断されたかを検出する。   Therefore, after the power is restored, the file system 128a first reads the write flags WF1 and WF2 as a recovery means, and detects which of the link list information LL1 and LL2 is being written when the power is shut off.

次に図5を用いて、ファイルシステム128aの復旧手段としての動作について説明する。まず説明の便宜上、図5(A)を用いてリンクリスト情報LL2を書き込んでいるときに電源が遮断された場合について説明する。この場合、書込みフラグWF1は「OFF」、書込みフラグWF2は「ON」の状態でバックアップメモリ18に格納されている。よってこのとき、リンクリスト情報LL2を構成するセクタに不良セクタが発生しているものと判断できる。そして、その位置は、電源遮断時に書込みが行われていた位置、すなわちバックアップメモリ18に格納されたリンクリスト情報LL2の書込み位置WP2に対応する。   Next, the operation of the file system 128a as a recovery unit will be described with reference to FIG. First, for convenience of explanation, a case where the power is shut off while the link list information LL2 is being written will be described with reference to FIG. In this case, the write flag WF1 is stored in the backup memory 18 in a state of “OFF” and the write flag WF2 is “ON”. Therefore, at this time, it can be determined that a bad sector has occurred in the sectors constituting the link list information LL2. The position corresponds to the position where writing was performed at the time of power-off, that is, the writing position WP2 of the link list information LL2 stored in the backup memory 18.

よって、ファイルシステム128aは、バックアップメモリ18から書込み位置WP2を読み出す(S5)。そして、書込み位置WP2に対応する書込み位置、つまり書込み位置WP1を読み出す(S6)。そして、書込み位置WP1におけるリンクリスト情報LL1のセクタSEC_WP1からデータを読み出す(S7)。このときリンクリスト情報LL1に対する書込み単位WUの書込みは既に終了しており、そのデータはセクタSEC_WP1に格納されている。よって、ファイルシステム128aは、読み出したデータをリンクリスト情報LL2の書込み位置WP2に対応するセクタSEC_WP2に書き込む(S8)。このようにすることで、セクタSEC_WP2のデータが確定される。よって、セクタSEC_WP2が不良セクタであった場合にこれを解消でき、それとともにリンクリスト情報LL2を復旧できる。   Therefore, the file system 128a reads the write position WP2 from the backup memory 18 (S5). Then, the writing position corresponding to the writing position WP2, that is, the writing position WP1 is read (S6). Then, data is read from the sector SEC_WP1 of the link list information LL1 at the write position WP1 (S7). At this time, the writing of the write unit WU to the link list information LL1 has already been completed, and the data is stored in the sector SEC_WP1. Therefore, the file system 128a writes the read data to the sector SEC_WP2 corresponding to the write position WP2 of the link list information LL2 (S8). In this way, the data of sector SEC_WP2 is determined. Therefore, when the sector SEC_WP2 is a bad sector, this can be solved, and the link list information LL2 can be recovered together with it.

次に、図5(B)を用いて、リンクリスト情報LL1を書き込んでいるときに電源が遮断された場合について説明する。この場合、書込みフラグWF1は「ON」、書込みフラグWF2は「OFF」の状態でバックアップメモリ18に格納されている。よってこのとき、リンクリスト情報LL1を構成するセクタに不良セクタが発生しているものと判断できる。そして、その位置は、電源遮断時に書込みが行われていた位置、すなわちバックアップメモリ18に格納された書込み位置WP1に対応する。   Next, with reference to FIG. 5B, a case where the power is shut off while the link list information LL1 is being written will be described. In this case, the write flag WF1 is stored in the backup memory 18 in a state of “ON” and the write flag WF2 is “OFF”. Therefore, at this time, it can be determined that a bad sector has occurred in the sectors constituting the link list information LL1. The position corresponds to the position where writing was performed at the time of power-off, that is, the writing position WP 1 stored in the backup memory 18.

よって、ファイルシステム128aは、バックアップメモリ18から書込み位置WP1を読み出す(S15)。そして、その書込み位置WP1に対応する書込み位置、つまり書込み位置WP2を読み出す(S16)。そして、書込み位置WP2におけるリンクリスト情報LL2のセクタSEC_WP2からデータを読み出す(S17)。このときリンクリスト情報LL2は、書込みが行われる前の状態であるので、過去のデータが読み出される。そして、ファイルシステム128aは、読み出したデータを書込み位置WP1に対応するリンクリスト情報LL1のセクタSEC_WP1に書き込む(S18)。このようにすることで、セクタSEC_WP1のデータが確定される。よって、セクタSEC_WP1が不良セクタであった場合に、これが解消される。なお、上述したように、セクタSEC_WP2に書き込まれるデータは過去のリンクリスト情報のデータであるが、不良セクタを解消することで、以後の読み出しを可能にできる。よって、再度コンテンツデータの書込みを実行することができるようになる。   Therefore, the file system 128a reads the write position WP1 from the backup memory 18 (S15). Then, the writing position corresponding to the writing position WP1, that is, the writing position WP2 is read (S16). Then, data is read from the sector SEC_WP2 of the link list information LL2 at the write position WP2 (S17). At this time, since the link list information LL2 is in a state before writing, past data is read out. Then, the file system 128a writes the read data to the sector SEC_WP1 of the link list information LL1 corresponding to the write position WP1 (S18). In this way, the data of sector SEC_WP1 is determined. Therefore, when the sector SEC_WP1 is a bad sector, this is solved. As described above, the data written in the sector SEC_WP2 is the data of the past link list information. However, the subsequent reading can be enabled by eliminating the defective sector. Therefore, the content data can be written again.

このようにして、リンクリスト情報LL1、LL2を復旧できる。また、バックアップメモリ18は書込み単位WU全体(512バイト)を格納するのではなく、その書込み位置WP1、WP2と書込みフラグWF1、WF2を格納することとした。よって、バックアップメモリ18の最小限の容量(たとえば4バイト)を用いることでリンクリスト情報LL1、LL2の復旧が可能となる。特に、コンテンツデータのファイルの容量が大きくなると、これに伴いリンクリスト情報LL1、LL2のデータ容量も大きくなる。しかし、このようにすれば、コンテンツデータのファイルの容量にかかわらず、バックアップメモリ18の一定の容量を使用するだけでリンクリスト情報LL1、LL2の復旧が可能となる。そして、バックアップメモリ18の容量を最小限とすることができるので、車載電子機器10全体として回路規模を小型化でき、低コスト化が可能になる。   In this way, the link list information LL1 and LL2 can be restored. The backup memory 18 does not store the entire write unit WU (512 bytes), but stores the write positions WP1 and WP2 and the write flags WF1 and WF2. Therefore, the link list information LL1 and LL2 can be restored by using the minimum capacity (for example, 4 bytes) of the backup memory 18. In particular, as the capacity of the content data file increases, the data capacity of the link list information LL1 and LL2 increases accordingly. However, in this way, the link list information LL1 and LL2 can be restored only by using a certain capacity of the backup memory 18 regardless of the capacity of the content data file. And since the capacity | capacitance of the backup memory 18 can be made into the minimum, the circuit scale can be reduced as the vehicle-mounted electronic device 10 whole, and cost reduction is attained.

さらに、リンクリスト情報LL1、LL2のうち一方の全体のデータを他方に書き込むのではなく、不良セクタ分のデータを書き込むようにした。よって、復旧処理にかかる時間を最小限とすることが可能となるので、ユーザの利便性を向上させることができる。   Further, the entire data of one of the link list information LL1 and LL2 is not written to the other, but the data for the defective sector is written. Therefore, it is possible to minimize the time required for the restoration process, and the convenience for the user can be improved.

[2] リンクリスト情報の復旧方法における変形例
バックアップメモリ18は、上述したように、ACCスイッチ22がオフされたときでも格納されたデータを保持できるように構成される。そのためにはたとえば、EEPROMなどの書換え可能な不揮発性メモリで構成することが可能であるが、より望ましくは、バックアップ電源を有するDRAMやSDRAMで構成される。SDRAMやDRAMは読み書き速度がEEPROMより速いので処理を高速化でき、またEEPROMと比べて小容量単位での書込みが可能であるのでハードウェア資源を最適に利用できる。
[2] Modified Example of Link List Information Restoration Method As described above, the backup memory 18 is configured to hold the stored data even when the ACC switch 22 is turned off. For this purpose, for example, a rewritable non-volatile memory such as an EEPROM can be used, but more preferably, a DRAM or SDRAM having a backup power source is used. Since SDRAM and DRAM have a faster read / write speed than EEPROM, processing can be speeded up, and writing can be performed in units of small capacity compared to EEPROM, so that hardware resources can be optimally used.

バックアップ電源としては、車載バッテリ20とは別個に電池を備えることや、ACCスイッチ22とは別系統で車載バッテリ20から電源供給を受けることが可能である。ここで後者の場合に、車載バッテリ20との接続が取り外されることにより、バックアップメモリ18のデータが消失してしまうことがある。たとえば、検査などの目的で車載電子機器10が車体から取り外されるような場合である。   As a backup power source, it is possible to provide a battery separately from the in-vehicle battery 20 or to receive power supply from the in-vehicle battery 20 in a separate system from the ACC switch 22. Here, in the latter case, the data in the backup memory 18 may be lost by disconnecting the connection with the in-vehicle battery 20. For example, this is a case where the in-vehicle electronic device 10 is removed from the vehicle body for the purpose of inspection or the like.

そこで、変形例におけるファイルシステム128aは、バックアップメモリ18のデータが消失した場合に、次のような方法によりリンクリスト情報LL1、LL2を復旧する。   Therefore, when the data in the backup memory 18 is lost, the file system 128a in the modified example restores the link list information LL1 and LL2 by the following method.

図6は、リンクリスト情報LLの復旧方法における変形例について説明する図である。まず、図6(A)で、ハードディスク19aの管理領域MAに格納されたリンクリスト情報LL2に不良セクタが含まれる場合について説明する。ファイルシステム128aは、復旧手段としてまず、バックアップメモリ18に格納した書込み位置WP1、WP2を参照する。しかし、このとき書込み位置WP1、WP2は消失している。あるいは、たとえば後述するように、バックアップメモリ18に予め格納されるチェックコードが消失している場合に、書込み位置WP1、WP2が消失していることを判断してもよい。そして、この時点ではリンクリスト情報LL1、LL2のいずれに不良セクタが含まれるかは不明である。   FIG. 6 is a diagram illustrating a modification of the link list information LL restoration method. First, referring to FIG. 6A, a case where a bad sector is included in the link list information LL2 stored in the management area MA of the hard disk 19a will be described. The file system 128a first refers to the write positions WP1 and WP2 stored in the backup memory 18 as recovery means. However, at this time, the write positions WP1 and WP2 have disappeared. Alternatively, for example, as will be described later, when the check code stored in advance in the backup memory 18 is lost, it may be determined that the write positions WP1 and WP2 are lost. At this time, it is unknown which of the link list information LL1 and LL2 contains the defective sector.

そこでファイルシステム128aは、まずリンクリスト情報LL1の開始位置から順次セクタSEC1_1、2、・・・、Nごとにデータを読み出す。そして、読み出したデータをリンクリスト情報LL2のセクタSEC2_1、2、・・・、Nに順次書き込む(S20)。ここで、リンクリスト情報LL1における全セクタの読み出しが完了すれば、リンクリスト情報LL2に不良セクタが含まれる蓋然性が高い。しかしこのとき、リンクリスト情報LL1のデータを移植することにより、リンクリスト情報LL2を復旧することができる。   Therefore, the file system 128a first reads out data for each of the sectors SEC1_1, 2,..., N sequentially from the start position of the link list information LL1. Then, the read data is sequentially written in the sectors SEC2_1, 2,..., N of the link list information LL2 (S20). Here, if reading of all sectors in the link list information LL1 is completed, there is a high probability that the link list information LL2 includes a defective sector. However, at this time, the link list information LL2 can be restored by transplanting the data of the link list information LL1.

次に、図6(B)で、リンクリスト情報LL1に不良セクタが含まれる場合について説明する。図6(A)の動作を実行しているときに、リンクリスト情報LL1におけるセクタSEC1_Nが不良セクタである場合には、ハードディスク装置19からエラーが通知され、その位置で読み出しができなくなる。するとファイルシステム128aは、リンクリスト情報LL1の読み出しを一旦中止する。そして、読み出せないセクタSEC1_Nに対応するリンクリスト情報LL2のセクタSEC2_Nのデータを読み出す。そして、読み出したデータをリンクリスト情報LL1のセクタSEC1_Nに書き込む(S22)。そして、リンクリスト情報LL1における続きのセクタSEC1_N+1からデータの読出しを再開し、読み出したデータをリンクリスト情報LL2のセクタSEC2_N+1から書き込む(S24)。   Next, a case where a bad sector is included in the link list information LL1 will be described with reference to FIG. If the sector SEC1_N in the link list information LL1 is a bad sector during the operation of FIG. 6A, an error is notified from the hard disk device 19, and reading cannot be performed at that position. Then, the file system 128a once stops reading the link list information LL1. Then, the data of the sector SEC2_N of the link list information LL2 corresponding to the sector SEC1_N that cannot be read is read. Then, the read data is written in the sector SEC1_N of the link list information LL1 (S22). Then, data reading is resumed from the subsequent sector SEC1_N + 1 in the link list information LL1, and the read data is written from the sector SEC2_N + 1 in the link list information LL2 (S24).

このようにすれば、リンクリスト情報LL1を復旧することができる。なおこの場合、リンクリスト情報LL2は、書込みが行われる前の状態であるので、最新の情報のデータではない。しかし、不良セクタを解消することで、以後の読出しを可能にできる。よって、再度コンテンツデータの書込みを実行することができるようになる。   In this way, the link list information LL1 can be restored. In this case, the link list information LL2 is not the latest information data because it is in a state before writing. However, the subsequent reading can be made possible by eliminating the defective sector. Therefore, the content data can be written again.

[3] ファイルエントリ情報の第1の復旧方法
次に、ファイルエントリ情報FEの復旧方法について説明する。本実施形態では、ファイルシステム128aはファイルエントリ情報FEをハードディスク19aに書き込む際、2つの方法でデータを冗長化させ、復旧に備える。第1の方法は、ハードディスク19a内にファイルエントリ情報のバックアップデータを作成する方法である。第2の方法は、ハードディスク19aに書き込むときの書込み単位をバックアップメモリ18に格納する方法である。次では、まず第1の方法について説明し、次いで第2の方法について説明する。
[3] First Method for Restoring File Entry Information Next, a method for restoring the file entry information FE will be described. In this embodiment, when the file system 128a writes the file entry information FE to the hard disk 19a, data is made redundant by two methods to prepare for recovery. The first method is to create backup data of file entry information in the hard disk 19a. The second method is a method of storing the write unit when writing to the hard disk 19 a in the backup memory 18. Next, the first method will be described first, and then the second method will be described.

図7、図8は、ハードディスク19aにファイルエントリ情報FEのバックアップデータを作成することにより、ファイルエントリ情報FEを復旧する方法について説明する図である。ここでは、ファイルエントリ情報FE1とそのバックアップデータのファイルエントリ情報FE2を例として説明する。   7 and 8 are diagrams for explaining a method of restoring the file entry information FE by creating backup data of the file entry information FE on the hard disk 19a. Here, the file entry information FE1 and the file entry information FE2 of the backup data will be described as an example.

まず図7を用いて、ファイルシステム128aの、書込手段、バックアップ手段としての動作について説明する。ファイルシステム128aは、書込手段として、ファイルエントリ情報FE1のバックアップデータのファイルエントリ情報FE2を作成する際、所定の書込み単位fWUごとにファイルエントリ情報の一部を作成してRAMに格納する(S101)。書込み単位fWUは、たとえば1セクタに対応する512バイト分のデータである。そしてファイルシステム128aは、書込み単位fWUをハードディスク装置19に書き込む。このとき、まずファイルエントリ情報FE1に対し書込み単位fWUを書き込む(S103)。このとき、書込み位置fWP1に対応するセクタSEC_fWP1に書込み単位fWUを書き込む。ここにおいて、書込み位置fWP1が、「ファイルエントリ情報書込み位置」に対応する。   First, the operation of the file system 128a as a writing unit and a backup unit will be described with reference to FIG. When creating the file entry information FE2 of the backup data of the file entry information FE1 as writing means, the file system 128a creates part of the file entry information for each predetermined writing unit fWU and stores it in the RAM (S101). ). The write unit fWU is, for example, 512 bytes of data corresponding to one sector. Then, the file system 128 a writes the write unit fWU to the hard disk device 19. At this time, the write unit fWU is first written to the file entry information FE1 (S103). At this time, the write unit fWU is written in the sector SEC_fWP1 corresponding to the write position fWP1. Here, the write position fWP1 corresponds to the “file entry information write position”.

次に、ファイルシステム128aは、バックアップ手段として、ファイルエントリ情報FE2に対し書込み単位fWUを書き込む(S104)。このときファイルエントリ情報FE2は、管理領域MAではなく固定の未使用領域DA1に書き込まれる。また、書込み位置fWP2に対応するセクタSEC_fWP2に書込み単位fWUが書き込まれる。そしてファイルシステム128aは、書込み位置fWP1をハードディスク装置19の固定の未使用領域DA1に格納する(S105)。   Next, the file system 128a writes the write unit fWU to the file entry information FE2 as backup means (S104). At this time, the file entry information FE2 is written not in the management area MA but in the fixed unused area DA1. Further, the write unit fWU is written in the sector SEC_fWP2 corresponding to the write position fWP2. Then, the file system 128a stores the write position fWP1 in the fixed unused area DA1 of the hard disk device 19 (S105).

このような動作を繰り返すことにより、ファイルエントリ情報FE1がハードディスク19aの管理領域MAに、ファイルエントリ情報FE2が固定の未使用領域DA1に書き込まれる。ただし、ファイルエントリ情報を格納する領域により本実施形態が限定されるものではない。なお、書込み位置fWP1も固定の未使用領域DA1に書き込まれるが、書込み位置fWP1は書込み単位fWUごとに上書きされる。   By repeating such an operation, the file entry information FE1 is written in the management area MA of the hard disk 19a, and the file entry information FE2 is written in the fixed unused area DA1. However, the present embodiment is not limited by the area for storing the file entry information. The write position fWP1 is also written in the fixed unused area DA1, but the write position fWP1 is overwritten for each write unit fWU.

図8は、ファイルシステム128aの復旧手段としての動作について説明する図である。ここでは、ファイルエントリ情報FE1に書き込んでいるときに電源が遮断された場合について説明する。   FIG. 8 is a diagram for explaining the operation as the recovery means of the file system 128a. Here, a case will be described in which the power is shut off while writing to the file entry information FE1.

ファイルシステム128aは、復旧手段としてハードディスク装置19の固定の未使用領域DA1から書込み位置fWP1を読み出す(S115)。そして、ファイルエントリ情報FE2における書込み位置fWP1に対応する書込み位置、つまり書込み位置fWP2のセクタSEC_fWP2からデータを読み出して(S116)、書込み位置fWP1に対応するファイルエントリ情報FE1のセクタSEC_fWP1に、読み出したデータを書き込む(S118)。このようにすることで、セクタSEC_fWP1が不良セクタであった場合に、これが解消される。なお、このときファイルエントリ情報FE2は、書込みが行われる前の状態であるので、最新の情報のデータではないが、不良セクタを解消することで、以後の読み出しを可能にできる。よって、再度コンテンツデータの書込みを実行することができるようになる。   The file system 128a reads the write position fWP1 from the fixed unused area DA1 of the hard disk device 19 as a recovery means (S115). Then, data is read from the write position corresponding to the write position fWP1 in the file entry information FE2, that is, the sector SEC_fWP2 at the write position fWP2 (S116), and the read data is read into the sector SEC_fWP1 of the file entry information FE1 corresponding to the write position fWP1. Is written (S118). In this way, when the sector SEC_fWP1 is a bad sector, this is solved. At this time, since the file entry information FE2 is in a state before writing, it is not the latest information data, but it can be read later by eliminating the defective sector. Therefore, the content data can be written again.

このように、ファイルエントリ情報FE1を復旧できる。また、ハードディスク装置19の未使用領域DA1に書込み位置fWP1を格納することとしたので、ハードディスク装置19の容量増大を必要とせず、最小限の容量を用いることでファイルエントリ情報FE1の復旧が可能となる。また、バックアップRAM18の容量増大を必要としない。よって、車載電子機器10全体として回路規模を小型化でき、低コスト化が可能になる。   In this way, the file entry information FE1 can be recovered. Since the write position fWP1 is stored in the unused area DA1 of the hard disk device 19, the capacity of the hard disk device 19 is not increased, and the file entry information FE1 can be restored by using the minimum capacity. Become. Further, it is not necessary to increase the capacity of the backup RAM 18. Therefore, the circuit scale of the in-vehicle electronic device 10 as a whole can be reduced, and the cost can be reduced.

さらに、ファイルエントリ情報FE2の全体のデータをファイルエントリ情報FE1に書き込むのではなく、不良セクタ分のデータを書き込むようにしたので、復旧処理にかかる時間を最小限とすることが可能となり、ユーザの利便性を向上させることができる。   Furthermore, since the entire data of the file entry information FE2 is not written to the file entry information FE1, but data for bad sectors is written, it is possible to minimize the time required for the recovery process, Convenience can be improved.

[4] ファイルエントリ情報の第2の復旧方法
図9は、バックアップメモリ18にバックアップデータを作成する方法について説明する図である。まずファイルエントリ情報FEをハードディスク19の管理領域MAに書き込むときに、ファイルシステム128aは書込手段として、所定の書込み単位fWUごとにファイルエントリ情報FEの一部のデータを生成してRAM16に格納する(S201)。ここで書込み単位fWUは、たとえば1セクタに相当する512バイトである。
[4] Second Method for Restoring File Entry Information FIG. 9 is a diagram for explaining a method for creating backup data in the backup memory 18. First, when writing the file entry information FE into the management area MA of the hard disk 19, the file system 128a generates a part of the data of the file entry information FE for each predetermined writing unit fWU and stores it in the RAM 16 as writing means. (S201). Here, the write unit fWU is, for example, 512 bytes corresponding to one sector.

そして、ファイルシステム128aは、バックアップ手段として、書込み単位を書き込む位置fWPと、書込み単位fWUのデータとをバックアップメモリ18に格納する(S202、S203)。   Then, the file system 128a stores, as backup means, the position fWP at which the write unit is written and the data of the write unit fWU in the backup memory 18 (S202, S203).

そして、ファイルシステム128aは、書込手段として、書込み単位fWUをハードディスク装置19に書き込む(S204)。このような動作を繰り返すことにより、ファイルエントリ情報FEが管理領域MAに書き込まれる。このとき、バックアップメモリ18に格納される書込み単位fWUと書込み位置fWPは、書込み単位ごとに上書きされる。   Then, the file system 128a writes the write unit fWU to the hard disk device 19 as writing means (S204). By repeating such an operation, the file entry information FE is written in the management area MA. At this time, the write unit fWU and the write position fWP stored in the backup memory 18 are overwritten for each write unit.

上記の処理において、ファイルエントリ情報FEに書込み単位fWUを書き込んでいるときに電源が遮断される。そして電源が復帰した後、ファイルシステム128aは復旧手段として、まずファイルエントリ情報FEにおける書込み位置fWPのデータを確認する。そして、これが読み出せない場合には、ファイルエントリ情報FEに不良セクタが発生しているものと判断できる。よって、バックアップメモリ18に格納された書込み単位fWUを、書込み位置fWPに対応するセクタSEC_fWPに書き込む(S210)。そうすることにより、不良セクタを解消するとともにデータを復旧できる。   In the above processing, the power is shut off when the write unit fWU is written in the file entry information FE. After the power is restored, the file system 128a first confirms the data at the write position fWP in the file entry information FE as a recovery means. If this cannot be read, it can be determined that a bad sector has occurred in the file entry information FE. Therefore, the write unit fWU stored in the backup memory 18 is written to the sector SEC_fWP corresponding to the write position fWP (S210). By doing so, defective sectors can be eliminated and data can be recovered.

このように、ファイルエントリ情報FEを復旧できる。なおこの方法によれば、バックアップメモリ18はハードディスク装置19より読み書きが高速であるので、書込み単位fWUを書き込む際の処理が高速化される。また、リンクリスト情報LLの場合は上述したようにファイルの容量が大きくなるのに伴いデータ容量が大きくなるが、ファイルエントリ情報FEの場合はそのデータ容量はリンクリスト情報LLほどファイルの容量に依存しない。よって、バックアップメモリ18に書込み単位fWUを格納する方法は、処理を高速化させるうえで好適な態様である。   In this way, the file entry information FE can be recovered. According to this method, since the backup memory 18 reads and writes faster than the hard disk device 19, the processing when writing the write unit fWU is speeded up. In the case of the link list information LL, the data capacity increases as the file capacity increases as described above. In the case of the file entry information FE, the data capacity depends on the file capacity as the link list information LL. do not do. Therefore, the method of storing the write unit fWU in the backup memory 18 is a preferable aspect for speeding up the processing.

上述の説明において、リンクリスト情報LLとファイルエントリ情報FEの復旧方法を示した。本実施形態には、リンクリスト情報LLの復旧とファイルエントリ情報FEの復旧の両方を行う場合も、いずれか一方のみを行う場合も含まれる。   In the above description, the recovery method of the link list information LL and the file entry information FE has been shown. The present embodiment includes a case where both the restoration of the link list information LL and the restoration of the file entry information FE are performed, and the case where only one of them is performed.

[5] バックアップメモリ18に保持されたデータの正確性を担保するための変形例
上述したリンクリスト情報LLや、ファイルエントリ情報FEの第2の復旧方法では、バックアップメモリ18に格納されたデータに基づいて復旧が行われる。よって、バックアップメモリ18に格納されるデータの正確性が要求される。ここで、バックアップメモリ18に格納されたデータの正確性を担保するための変形例について説明する。
[5] Modification for Ensuring Accuracy of Data Held in Backup Memory 18 In the above-described second recovery method of link list information LL and file entry information FE, data stored in backup memory 18 Recovery is performed based on this. Therefore, the accuracy of the data stored in the backup memory 18 is required. Here, a modified example for ensuring the accuracy of the data stored in the backup memory 18 will be described.

本変形例は、リンクリスト情報LLとファイルエントリ情報FEの復旧方法のいずれにも適用可能である。本変形例では、ファイルシステム128aがバックアップ手段として、バックアップメモリ18に次のようなデータを格納しておく。これにより、復旧手段としてバックアップメモリ18のデータを読み出す際に、その正確性を確認することができる。   The present modification can be applied to both the link list information LL and the file entry information FE recovery method. In this modification, the file system 128a stores the following data in the backup memory 18 as backup means. Thereby, the accuracy of the data can be confirmed when the data in the backup memory 18 is read out as the recovery means.

図10は、バックアップメモリ18に格納されるデータについて説明する図である。バックアップチェックコードbCHは、車載電子機器10の初期化時などに書き込まれる所定のデータ(たとえば文字列)である。ファイルシステム128aは、バックアップチェックコードbCHを読み出すことができたときに、バックアップメモリ18全体としてのデータが消失していないことを確認できる。   FIG. 10 is a diagram for explaining data stored in the backup memory 18. The backup check code bCH is predetermined data (for example, a character string) written when the in-vehicle electronic device 10 is initialized. When the file system 128a can read the backup check code bCH, it can confirm that the data of the entire backup memory 18 is not lost.

リンクリスト情報LLの書込み位置WP、リンクリスト情報LLの書込みフラグWF、ファイルエントリ情報FEの書込み位置fWP、ファイルエントリ情報FEの書込み単位fWUについては上述したとおりである。なおここでは、リンクリスト情報LLとファイルエントリ情報FEの両方の復旧を行う場合を示すが、いずれか一方のみの場合には、それぞれに必要なデータが書き込まれる。また、ファイルエントリ情報FEのバックアップデータをハードディスク装置19に作成する第1の方法の場合には、ファイルエントリ情報FEの書込み単位fWUを省略することが可能である。   The write position WP of the link list information LL, the write flag WF of the link list information LL, the write position fWP of the file entry information FE, and the write unit fWU of the file entry information FE are as described above. Here, a case where both the link list information LL and the file entry information FE are restored is shown, but in the case of only one of them, necessary data is written in each. In the case of the first method for creating backup data of the file entry information FE in the hard disk device 19, the writing unit fWU of the file entry information FE can be omitted.

ファイルエントリ情報FEの書込み単位チェックコードfCHは、バックアップメモリ18の所定領域、たとえば512バイト分の予め確保された領域の末尾に書き込まれる所定のデータ(たとえば文字列)である。ファイルシステム128aは、書込み単位チェックコードfCHを初期化時に書き込む。そしてファイルエントリ情報FEの書込み単位fWUをこの所定領域に正常に書き込むと、この書込み単位チェックコードfCHは上書きされる。よって、ファイルシステム128aは、この書込み単位チェックコードfCHを読み出すことができないときに、書込み単位fWUが正常に書き込まれたことを確認できる。   The write unit check code fCH of the file entry information FE is predetermined data (for example, a character string) written at the end of a predetermined area of the backup memory 18, for example, an area reserved in advance for 512 bytes. The file system 128a writes the write unit check code fCH at initialization. When the write unit fWU of the file entry information FE is normally written in this predetermined area, the write unit check code fCH is overwritten. Therefore, the file system 128a can confirm that the write unit fWU has been normally written when the write unit check code fCH cannot be read.

さらに、ファイルシステム128aは、ファイルエントリ情報FE2に書き込まれた書込み単位fWUの正確性を確認するために、ファイルエントリ情報FE2の書込み単位fWUのチェックサムCSMを格納する。ファイルシステム128aは、ハードディスク装置19から書込み単位fWUを読み出してそのチェックサムを算出し、格納されたチェックサムCSMと一致すれば、ファイルエントリ情報FE2に書き込まれた書込み単位が正確であることを確認できる。   Furthermore, the file system 128a stores the checksum CSM of the write unit fWU of the file entry information FE2 in order to confirm the accuracy of the write unit fWU written in the file entry information FE2. The file system 128a reads the write unit fWU from the hard disk device 19, calculates its checksum, and confirms that the write unit written in the file entry information FE2 is correct if it matches the stored checksum CSM. it can.

[6] 本実施形態における車載電子機器10の動作手順
次に、本実施形態における車載電子機器10の動作手順について、図11〜図15を用いて説明する。
[6] Operation Procedure of In-Vehicle Electronic Device 10 in the Present Embodiment Next, the operation procedure of the in-vehicle electronic device 10 in the present embodiment will be described with reference to FIGS.

図11は、リンクリスト情報LL1、LL2やファイルエントリ情報FE1、FE2をハードディスク装置19に書き込むときの車載電子機器10の動作手順を説明するフローチャート図である。図11(A)の手順は、電源が投入された状態で、たとえばユーザからの指示入力に応答してコンテンツデータをハードディスク装置19に格納する際に実行される。図11(A)の手順は、ファイルシステム128aが実行する手順である。   FIG. 11 is a flowchart for explaining the operation procedure of the in-vehicle electronic device 10 when the link list information LL1, LL2 and the file entry information FE1, FE2 are written in the hard disk device 19. The procedure in FIG. 11A is executed when the content data is stored in the hard disk device 19 in response to an instruction input from the user, for example, in a state where the power is turned on. The procedure in FIG. 11A is a procedure executed by the file system 128a.

ファイルシステム128aは、まずリンクリスト情報の書込みを、対応するすべてのセクタが終了するまでループして実行する(S100、S110)。すなわち、ファイルシステム128aは、書込み単位WUごとに、書込み位置WP1をバックアップメモリ18に格納する(S101)。そして、書込みフラグWF1を初期値の「OFF」から「ON」に変更する(S102)。そしてリンクリスト情報LL1の書き込み位置WP1に書込み単位WUを書き込む(S103)。そして、書込み位置WP1に対する書込みが終了すると書込みフラグWF1の値を「ON」から「OFF」に変更する(S104)。   The file system 128a first executes writing of link list information in a loop until all corresponding sectors are completed (S100, S110). That is, the file system 128a stores the write position WP1 in the backup memory 18 for each write unit WU (S101). Then, the write flag WF1 is changed from the initial value “OFF” to “ON” (S102). Then, the write unit WU is written in the write position WP1 of the link list information LL1 (S103). When the writing to the writing position WP1 is completed, the value of the writing flag WF1 is changed from “ON” to “OFF” (S104).

次に、ファイルシステム128aは、リンクリスト情報LL2の書き込み位置WP2をバックアップメモリ18に格納する(S105)。そして、書込みフラグWF2を初期値の「OFF」から「ON」に変更する(S106)。そして、リンクリスト情報LL2の書込み位置WP2に書込み単位WUを書き込む(S107)。そして、書込み位置WP2に対する書込みが終了すると書込みフラグWF2の値を「ON」から「OFF」に変更する(S108)。このように、ファイルシステム128aは、手順S102から手順S108を、リンクリスト情報LL1、LL2に対応するすべてのセクタにデータを書き込むまで繰り返す。   Next, the file system 128a stores the write position WP2 of the link list information LL2 in the backup memory 18 (S105). Then, the write flag WF2 is changed from the initial value “OFF” to “ON” (S106). Then, the write unit WU is written in the write position WP2 of the link list information LL2 (S107). When the writing to the writing position WP2 is completed, the value of the writing flag WF2 is changed from “ON” to “OFF” (S108). As described above, the file system 128a repeats steps S102 to S108 until data is written in all sectors corresponding to the link list information LL1 and LL2.

次に、ファイルシステム128aは、ファイルエントリ情報の書込みを、対応するすべてのセクタが終了するまでループして実行する(S112、S122)。ここでは、例として、ファイルエントリ情報FE1、FE2をハードディスク装置19に書き込む場合を示す。   Next, the file system 128a executes the writing of the file entry information in a loop until all the corresponding sectors are completed (S112, S122). Here, as an example, a case where the file entry information FE1 and FE2 are written in the hard disk device 19 is shown.

ファイルシステム128aは、、固定の未使用領域DA1のファイルエントリ情報FE2に書込み単位fWUを書き込み(S118)、更に書込み位置WP1を書き込む(S119)。そして、ファイルエントリ情報FE1の書込み位置fWP1に書込み単位fWUを書き込む(S120)。このように、ファイルシステム128aは、手順S112から手順S122を、ファイルエントリ情報FE1、FE2に対応するすべてのセクタに書き込むまで繰り返す。   The file system 128a writes the write unit fWU to the file entry information FE2 of the fixed unused area DA1 (S118), and further writes the write position WP1 (S119). Then, the write unit fWU is written in the write position fWP1 of the file entry information FE1 (S120). As described above, the file system 128a repeats the steps S112 to S122 until all the sectors corresponding to the file entry information FE1 and FE2 are written.

なお、書込み単位fWUをバックアップメモリ18に格納する場合には、手順S118〜S120の代わりに、図11(B)に示すように、バックアップメモリ18に書込み単位fWUと書込み位置WPを格納し(S113)、ファイルエントリ情報FEに書込み単位fWUの書込みを行う(S115)。   When the write unit fWU is stored in the backup memory 18, the write unit fWU and the write position WP are stored in the backup memory 18 as shown in FIG. 11B instead of steps S118 to S120 (S113). ), The writing unit fWU is written in the file entry information FE (S115).

また、ここでは図示を省略したが、ファイルシステム128aは、上記の手順に加え、ハードディスク19aのデータ領域DAに対し、コンテンツデータのファイルの書込みを行う。   Although not shown here, in addition to the above procedure, the file system 128a writes a content data file to the data area DA of the hard disk 19a.

次に、図11の手順を実行するときに電源が遮断され、再投入されたときの復旧処理について図12を用いて説明する。   Next, recovery processing when the power is turned off and turned on again when the procedure of FIG. 11 is executed will be described with reference to FIG.

図12は、上述した復旧方法を実行するときの、車載電子機器10の動作手順を説明するフローチャート図である。図12の手順は、電源が投入されたときに、車載電子機器10全体としての初期化動作の一部としてファイルシステム128aが実行する手順である。ファイルシステム128aは、まずリンクリスト情報の復旧処理を実行する(S1000)。そして、ファイルエントリ情報の復旧処理を実行する(S1002)。リンクリスト情報の復旧処理(S1000)と、ファイルエントリ情報の復旧処理(S1002)は、いずれか一方のみであってもよい。   FIG. 12 is a flowchart for explaining the operation procedure of the in-vehicle electronic device 10 when the above-described recovery method is executed. The procedure of FIG. 12 is a procedure executed by the file system 128a as part of the initialization operation of the in-vehicle electronic device 10 as a whole when the power is turned on. The file system 128a first executes link list information recovery processing (S1000). Then, the file entry information recovery process is executed (S1002). Only one of the link list information recovery process (S1000) and the file entry information recovery process (S1002) may be used.

図13は、リンクリスト情報復旧処理の手順を説明するフローチャート図である。図13の手順は、図12における手順S1000のサブルーチンに対応する。図13の手順は、復旧手段としてのファイルシステム128aが実行する。   FIG. 13 is a flowchart for explaining the procedure of the link list information restoration process. The procedure of FIG. 13 corresponds to the subroutine of procedure S1000 in FIG. The procedure of FIG. 13 is executed by the file system 128a as a recovery means.

まず、ファイルシステム128aは、バックアップメモリ18にデータが格納されているかを確認する(S1010)。このとき、図10で示したバックアップチェックコードbCHが読み出されたときに、データが格納されていることを確認する。格納されていれば(S1010のYES)、書込みフラグWF1、WF2に基づいて、リンクリスト情報LL1、LL2のうちどちらで不良セクタが生じたかを判断する(S1014)。リンクリスト情報LL2と判断した場合には(S1014の「LL2」)、リンクリスト情報LL1からリンクリスト情報LL2に書込みを行い(S1018)、処理を終了する。一方、リンクリスト情報LL1と判断した場合には(S1014の「LL1」)、リンクリスト情報LL2からリンクリスト情報LL1に書込みを行い(S1016)、処理を終了する。   First, the file system 128a checks whether data is stored in the backup memory 18 (S1010). At this time, when the backup check code bCH shown in FIG. 10 is read, it is confirmed that data is stored. If it is stored (YES in S1010), it is determined which of the link list information LL1 and LL2 has a bad sector based on the write flags WF1 and WF2 (S1014). If it is determined that the link list information is LL2 (“LL2” in S1014), the link list information LL1 is written to the link list information LL2 (S1018), and the process is terminated. On the other hand, if it is determined that the link list information is LL1 (“LL1” in S1014), the link list information LL2 is written into the link list information LL1 (S1016), and the process is terminated.

また、ファイルシステム128aは、バックアップメモリ18にデータが格納されていない場合には(S1010のNO)、リンクリスト情報LL11のすべてのデータをリンクリスト情報LL2に書き込む(S1018)。全セクタの書込みが完了するまで、リンクリスト情報LL1からリンクリスト情報LL2にデータを書き込む処理を実行する(S1024のNO)。そして、全てのセクタの書込みが完了すると(S1024のYES)、処理を終了する。このとき、リンクリスト情報LL1に不良セクタがある場合(S1020のYES)、リンクリスト情報LL2におけるそのセクタのデータをリンクリスト情報LL1に書き込み(S1022)、処理を終了する。   If no data is stored in the backup memory 18 (NO in S1010), the file system 128a writes all the data in the link list information LL11 to the link list information LL2 (S1018). Until writing of all sectors is completed, a process of writing data from the link list information LL1 to the link list information LL2 is executed (NO in S1024). Then, when the writing of all sectors is completed (YES in S1024), the process ends. At this time, if there is a bad sector in the link list information LL1 (YES in S1020), the data of that sector in the link list information LL2 is written in the link list information LL1 (S1022), and the process is terminated.

このような手順によれば、リンクリスト情報LL1、LL2を短時間で復旧できる。また、バックアップメモリ18のデータが消失していた場合であっても、リンクリスト情報LL1、LL2を復旧できる。   According to such a procedure, the link list information LL1 and LL2 can be restored in a short time. Even if the data in the backup memory 18 is lost, the link list information LL1 and LL2 can be recovered.

図14は、ファイルエントリ情報復旧処理の手順を説明するフローチャート図である。図14の手順は、図12における手順S1002のサブルーチンに対応する。図14の手順は、復旧手段としてのファイルシステム128aが実行する手順である。またこの手順は、ハードディスク装置19にファイルエントリ情報のバックアップデータを作成する第1の方法に対応する。   FIG. 14 is a flowchart for explaining the procedure of the file entry information recovery process. The procedure of FIG. 14 corresponds to the subroutine of procedure S1002 in FIG. The procedure of FIG. 14 is a procedure executed by the file system 128a as a recovery means. This procedure corresponds to the first method for creating backup data of file entry information in the hard disk device 19.

まず、ファイルシステム128aは、ハードディスク装置19からファイルエントリ情報FE2の書込み単位WUを読出し(S1119)、そのチェックサムを算出して、図10で示した書込み単位チェックサムCSMと一致するかを確認する(S1120)。一致していれば(S1120のOK)、ファイルエントリ情報FE2に対する書込みが正常に終了していると判断できる。そして、ファイルシステム128aは、ファイルエントリ情報FE1の書込み位置WPを読読出す(S1122)。そして、読出されないときにはファイルエントリ情報FE1で不良セクタが生じたと判断し(S1124のYES)、ファイルエントリ情報FE2からファイルエントリ情報FE1に書込みを行い(S1126)、処理を終了する。なお、ファイルエントリ情報FE2の書込み単位WUから求めたチェックサムが書込み単位チェックサムCSMと一致しない場合や(S1120のNG)、情報FE1で不良セクタが生じていないと判断した場合(S1124のNO)には、処理を終了する。   First, the file system 128a reads the write unit WU of the file entry information FE2 from the hard disk device 19 (S1119), calculates its checksum, and confirms whether it matches the write unit checksum CSM shown in FIG. (S1120). If they match (OK in S1120), it can be determined that the writing to the file entry information FE2 has been completed normally. Then, the file system 128a reads and reads the write position WP of the file entry information FE1 (S1122). If not read, it is determined that a bad sector has occurred in the file entry information FE1 (YES in S1124), the file entry information FE2 is written to the file entry information FE1 (S1126), and the process is terminated. When the checksum obtained from the write unit WU of the file entry information FE2 does not match the write unit checksum CSM (NG of S1120), or when it is determined that no bad sector has occurred in the information FE1 (NO of S1124) Then, the process ends.

このような手順によれば、ファイルエントリ情報FE1を短時間で復旧できる。   According to such a procedure, the file entry information FE1 can be recovered in a short time.

図15は、ファイルエントリ情報復旧処理の別の手順を説明するフローチャート図である。図15の手順は、バックアップメモリ18にファイルエントリ情報の書込み単位のバックアップデータを作成する第2の方法に対応する。すなわち、この手順は、図12における手順S1002のサブルーチンとして、図14の手順の代わりに復旧手段としてのファイルシステム128aが実行する。   FIG. 15 is a flowchart for explaining another procedure of the file entry information recovery process. The procedure of FIG. 15 corresponds to a second method of creating backup data in units of writing file entry information in the backup memory 18. That is, this procedure is executed by the file system 128a as a recovery means instead of the procedure of FIG. 14 as a subroutine of step S1002 in FIG.

まず、ファイルシステム128aは、バックアップメモリ18にデータが格納されているかを確認する(S1130)。具体的には、図10で示したバックアップチェックコードbCHが読み出されれば、格納されていると判断できる。そして、格納されていれば(S1130のYES)、そのデータが正確であるかを確認する(S1132)。具体的には、図10で示した書込み単位チェックコードfCHが読み出されれば、正確であると判断できる。そして、正確であれば(S1132のYES)、書込み位置WPを読み出し(S133)、ファイルエントリ情報で不良セクタが生じたかを判断する(S1134)。読出しができず、不良セクタが生じていると判断した場合には(S1134のYES)、バックアップメモリ18が格納するファイルエントリ情報の一部、つまり書込み単位fWUをハードディスク19aの管理領域MA内のファイルエントリ情報FEに書き込み(S1136)、処理を終了する。   First, the file system 128a checks whether data is stored in the backup memory 18 (S1130). Specifically, if the backup check code bCH shown in FIG. 10 is read, it can be determined that it is stored. If it is stored (YES in S1130), it is confirmed whether the data is accurate (S1132). Specifically, if the write unit check code fCH shown in FIG. 10 is read, it can be determined that it is accurate. If it is correct (YES in S1132), the write position WP is read (S133), and it is determined whether a bad sector has occurred in the file entry information (S1134). If it cannot be read and it is determined that a bad sector has occurred (YES in S1134), a part of the file entry information stored in the backup memory 18, that is, the write unit fWU is stored in the file in the management area MA of the hard disk 19a. The entry information FE is written (S1136), and the process is terminated.

また、バックアップメモリ18にデータが格納されていない場合や(S1130のNO)、そのデータが正確でない場合には(S1132のNO)、復旧処理を行わずに終了する。   If no data is stored in the backup memory 18 (NO in S1130) or if the data is not accurate (NO in S1132), the process ends without performing the recovery process.

このような手順によれば、ファイルエントリ情報FEを短時間で復旧できる。そしてさらに、バックアップメモリ18のデータが消失または一部が破壊されていた場合であっても、ファイルエントリ情報FEを復旧できる。   According to such a procedure, the file entry information FE can be recovered in a short time. Furthermore, even if the data in the backup memory 18 is lost or partially destroyed, the file entry information FE can be recovered.

上述の説明では、ハードディスク装置19を記憶デバイスの例として示した。しかし、1つのファイルを複数の領域に振り分けて格納する、EEPROMなどの記憶デバイスにも本実施形態は適用できる。また、リンクリスト情報については、セクタ単位でリンク順序を有する場合を例として説明した。しかし、FATなどクラスタ単位でセクタのリンク順序を有する場合であっても、本実施形態の範囲内に含まれる。さらに、上述の説明では、リンクリスト情報やファイルエントリ情報に対する書込み単位の例として、セクタの容量に対応した書込み単位について説明した。しかし、書込み単位の大きさはこれに限られず、たとえばクラスタ単位であってもよい。また、記憶デバイスがEEPROMで構成される場合には、1または複数のブロック単位であってもよい。   In the above description, the hard disk device 19 is shown as an example of a storage device. However, the present embodiment can also be applied to a storage device such as an EEPROM that stores one file in a plurality of areas. In addition, the link list information has been described as an example in which a link order is provided for each sector. However, even if the sector link order is in cluster units such as FAT, it is included in the scope of the present embodiment. Furthermore, in the above description, the write unit corresponding to the capacity of the sector has been described as an example of the write unit for the link list information and the file entry information. However, the size of the writing unit is not limited to this, and may be, for example, a cluster unit. Further, when the storage device is composed of an EEPROM, one or a plurality of block units may be used.

また、外部スイッチにより電源が投入・遮断される電子機器として、車載電子機器を例として説明したが、かかる構成を有する電子機器であれば、他の電子機器であっても本実施形態は適用できる。   In addition, an in-vehicle electronic device has been described as an example of an electronic device whose power is turned on / off by an external switch. However, the present embodiment can be applied to other electronic devices as long as the electronic device has such a configuration. .

以上のように、本実施形態によれば、低コストかつ迅速にファイルエントリ情報やリンクリスト情報の復旧が可能となる。   As described above, according to the present embodiment, file entry information and link list information can be quickly restored at low cost.

10:車載電子機器、18:バックアップメモリ、19:ハードディスク装置、128:読み書き制御部、128a:ファイルシステム、LL1、LL2:リンクリスト情報、FE1、FE2:ファイルエントリ情報 10: vehicle-mounted electronic device, 18: backup memory, 19: hard disk device, 128: read / write controller, 128a: file system, LL1, LL2: link list information, FE1, FE2: file entry information

Claims (12)

単一のファイルを複数の領域に振り分けて格納する記憶デバイスを有するとともに、車載バッテリからの電源が投入・遮断される車載電子機器であって、
前記電源が遮断されたときでもデータを保持可能なメモリと、
前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記リンクリスト情報をその一部である第1の書込み単位ごとに前記記憶デバイスにおける複数のリンクリスト情報書込み位置に書き込む書込手段と、
前記第1の書込み単位ごとに、前記複数のリンクリスト情報書込み位置と、当該複数のリンクリスト情報書込み位置に対する前記第1の書込み単位の書込み終了を示すデータとを前記メモリに格納するバックアップ手段と、
前記電源が遮断された後再投入されたときに、前記複数のリンクリスト情報書込み位置のうち第1のリンクリスト情報書込み位置に対する前記第1の書込み単位の書込みが終了していない場合には、第2のリンクリスト情報書込み位置に書き込まれたデータを前記第1のリンクリスト情報書込み位置に書き込む復旧手段とを有することを特徴とする車載電子機器。
In-vehicle electronic equipment that has a storage device that distributes and stores a single file into multiple areas, and that is powered on and off from the in-vehicle battery,
A memory capable of holding data even when the power is turned off;
When the file entry information having the start position of the file when storing the file in the storage device and the link list information having the link order of the area from the start position are written to the storage device, the link Writing means for writing the list information to a plurality of linked list information writing positions in the storage device for each first writing unit that is part of the list information;
For each of the first write unit, wherein a plurality of linked list information writing position, and backup means for storing the data in the memory indicating the write end of the first write unit for the plurality of linked list information writing position ,
When the first write unit writing to the first link list information writing position among the plurality of link list information writing positions is not completed when the power is turned off and then turned on again, A vehicle-mounted electronic device comprising: a recovery unit that writes data written at a second link list information writing position to the first link list information writing position.
請求項1において、
前記書込手段は、更に前記ファイルエントリ情報をその一部である第2の書込み単位ごとに前記記憶デバイスにおける複数のファイルエントリ情報書込み位置に書き込み、
前記バックアップ手段は、更に前記複数のファイルエントリ情報書込み位置のうち第1のファイルエントリ情報書込み位置を前記記憶デバイスに書き込み、
前記復旧手段は、前記電源が遮断された後再投入されたとき更に、前記第1のファイルエントリ情報書込み位置に対する前記第2の書込み単位の書込みが終了していない場合には、第2のファイルエントリ情報書込み位置に書き込まれたデータを前記第1のファイルエントリ情報書込み位置に書き込むことを特徴とする車載電子機器。
In claim 1,
The writing means further writes the file entry information to a plurality of file entry information writing positions in the storage device for each second writing unit that is a part of the file entry information.
The backup means further writes a first file entry information write position among the plurality of file entry information write positions to the storage device,
When the power is turned off and then turned on again, the recovery means further stores the second file if the writing of the second writing unit to the first file entry information writing position is not completed. An in-vehicle electronic device, wherein data written at an entry information writing position is written into the first file entry information writing position.
請求項1において、
前記復旧手段は、前記電源が再投入されたときに、前記メモリに予め格納されるチェックコードが所定の状態でない場合には、前記記憶デバイスに格納された複数のリンクリスト情報のうち1つのリンクリスト情報を他のリンクリスト情報に書き込むことを特徴とする車載電子機器。
In claim 1,
If the check code stored in advance in the memory is not in a predetermined state when the power is turned on again, the recovery means is one link among the plurality of link list information stored in the storage device. An in-vehicle electronic device characterized by writing list information into other linked list information.
請求項1において、
前記復旧手段は、前記電源が再投入されたときに、前記メモリにデータが格納されていない場合には、前記記憶デバイスに格納された複数のリンクリスト情報のうち1つのリンクリスト情報を他のリンクリスト情報に書き込むことを特徴とする車載電子機器。
In claim 1,
The restoration means, when data is not stored in the memory when the power is turned on again, sets one link list information among a plurality of link list information stored in the storage device to another An in-vehicle electronic device characterized by writing in link list information.
請求項1において、
前記ファイルの数または容量にかかわらず、前記メモリが所定容量であることを特徴とする車載電子機器。
In claim 1,
The on-vehicle electronic device characterized in that the memory has a predetermined capacity regardless of the number or capacity of the files.
単一のファイルを複数の領域に振り分けて格納する記憶デバイスを有するとともに、車載バッテリからの電源が投入・遮断される車載電子機器であって、
前記電源が遮断されたときでもデータを保持可能なメモリと、
前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記ファイルエントリ情報をその一部である第2の書込み単位ごとに前記記憶デバイスにおける複数のファイルエントリ情報書込み位置に書き込む書込手段と、
前記第2の書込み単位ごとに、前記複数のファイルエントリ情報書込み位置のうち第1のファイルエントリ情報書込み位置を前記記憶デバイスに書き込むバックアップ手段と、
前記電源が遮断された後再投入されたときに、前記第1のファイルエントリ情報書込み位置に対する前記第2の書込み単位の書込みが終了していない場合には、第2のファイルエントリ情報書込み位置に書き込まれたデータを前記第1のファイルエントリ情報書込み位置に書き込む復旧手段とを有することを特徴とする車載電子機器。
In-vehicle electronic equipment that has a storage device that distributes and stores a single file into multiple areas, and that is powered on and off from the in-vehicle battery,
A memory capable of holding data even when the power is turned off;
The file entry information having the start position of the file when the file is stored in the storage device and the link list information having the link order of the area from the start position are written to the storage device. Writing means for writing entry information to a plurality of file entry information writing positions in the storage device for each second writing unit that is a part of the entry information;
Backup means for writing the first file entry information write position among the plurality of file entry information write positions to the storage device for each second write unit ;
If the writing of the second writing unit to the first file entry information writing position is not completed when the power is turned off and then turned on again, the second file entry information writing position is set. A vehicle-mounted electronic device comprising: a recovery unit that writes the written data to the first file entry information writing position.
単一のファイルを複数の領域に振り分けて格納する記憶デバイスを有するとともに、車載バッテリからの電源が投入・遮断される車載電子機器であって、
前記電源が遮断されたときでもデータを保持可能なメモリと、
前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記ファイルエントリ情報をその一部である第2の書込み単位ごとに前記記憶デバイスにおけるファイルエントリ情報書込み位置に書き込む書込手段と、
前記第2の書込み単位ごとに、前記第2の書込み単位と、前記ファイルエントリ情報書込み位置とを前記メモリに格納するバックアップ手段と、
前記電源が遮断された後再投入されたときに、前記ファイルエントリ情報書込み位置に対する前記メモリに格納された第2の書込み単位の書込みが終了していない場合には、当該第2の書込み単位を当該ファイルエントリ情報書込み位置に書き込む復旧手段とを有することを特徴とする車載電子機器。
In-vehicle electronic equipment that has a storage device that distributes and stores a single file into multiple areas, and that is powered on and off from the in-vehicle battery,
A memory capable of holding data even when the power is turned off;
The file entry information having the start position of the file when the file is stored in the storage device and the link list information having the link order of the area from the start position are written to the storage device. Writing means for writing entry information to a file entry information writing position in the storage device for each second writing unit that is a part of the entry information;
Backup means for storing the second write unit and the file entry information write position in the memory for each second write unit;
When writing of the second write unit stored in the memory for the file entry information write position is not completed when the power is turned off and then turned on again, the second write unit is set to An in-vehicle electronic device comprising: a recovery unit that writes to the file entry information writing position.
請求項1乃至7のいずれかにおいて、
前記車載バッテリからの電源が更に他の車載機器に投入・遮断されることを特徴とする車載電子機器。
In any one of Claims 1 thru | or 7,
An in-vehicle electronic device characterized in that a power source from the in-vehicle battery is further turned on and off to other in-vehicle devices.
単一のファイルを複数の領域に振り分けて格納する記憶デバイスを有するとともに車載バッテリからの電源が投入・遮断され、更に前記電源が遮断されたときでもデータを保持可能なメモリを有する車載電子機器の制御プログラムであって、
前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記リンクリスト情報をその一部である第1の書込み単位ごとに前記記憶デバイスにおける複数のリンクリスト情報書込み位置に書き込む第1の書込工程と、
前記第1の書込み単位ごとに、前記複数のリンクリスト情報書込み位置と、前記複数のリンクリスト情報書込み位置に対する書込み終了を示すデータとを前記メモリに格納する第1のバックアップ工程と、
前記電源が遮断された後再投入されたときに、前記複数のリンクリスト情報書込み位置のうち第1のリンクリスト情報書込み位置に対する前記第1の書込み単位の書込みが終了していない場合には、第2のリンクリスト情報書込み位置に書き込まれたデータを前記第1のリンクリスト情報書込み位置に書き込む第1の復旧工程とを前記車載電子機器に実行させることを特徴とする制御プログラム。
An in-vehicle electronic device having a storage device that distributes and stores a single file into a plurality of areas, has a memory that can hold data even when the power from the on-vehicle battery is turned on and off, and even when the power is turned off A control program,
When the file entry information having the start position of the file when storing the file in the storage device and the link list information having the link order of the area from the start position are written to the storage device, the link A first writing step of writing list information to a plurality of linked list information writing positions in the storage device for each first writing unit that is part of the list information;
A first backup step of storing, in the memory, the plurality of linked list information writing positions and data indicating completion of writing to the plurality of linked list information writing positions for each first writing unit ;
When the first write unit writing to the first link list information writing position among the plurality of link list information writing positions is not completed when the power is turned off and then turned on again, A control program for causing the in-vehicle electronic device to execute a first restoration step of writing data written at a second link list information writing position to the first link list information writing position.
請求項9において、
前記ファイルエントリ情報をその一部である第2の書込み単位ごとに前記記憶デバイスにおける複数のファイルエントリ情報書込み位置に書き込む第2の書込工程と、
前記複数のファイルエントリ情報書込み位置のうち第1のファイルエントリ情報書込み位置を前記記憶デバイスに書き込む第2のバックアップ行程と、
前記電源が遮断された後再投入されたときに、前記第1のファイルエントリ情報書込み位置に対する前記第2の書込み単位の書込みが終了していない場合には、第2のファイルエントリ情報書込み位置に書き込まれたデータを前記第1のファイルエントリ情報書込み位置に書き込む第2の復旧工程とを更に前記車載電子機器に実行させることを特徴とする制御プログラム。
In claim 9,
A second writing step of writing the file entry information to a plurality of file entry information writing positions in the storage device for each second writing unit that is a part of the file entry information;
A second backup step of writing a first file entry information write position among the plurality of file entry information write positions to the storage device;
If the writing of the second writing unit to the first file entry information writing position is not completed when the power is turned off and then turned on again, the second file entry information writing position is set. A control program for causing the in-vehicle electronic device to further execute a second restoration step of writing the written data to the first file entry information writing position.
単一のファイルを複数の領域に振り分けて格納する記憶デバイスを有するとともに車載バッテリからの電源が投入・遮断され、更に前記電源が遮断されたときでもデータを保持可能なメモリを有する車載電子機器の制御プログラムであって、
前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記ファイルエントリ情報をその一部である第2の書込み単位ごとに前記記憶デバイスにおける複数のファイルエントリ情報書込み位置に書き込む書込工程と、
前記第2の書込み単位ごとに、前記複数のファイルエントリ情報書込み位置のうち第1のファイルエントリ情報書込み位置を前記記憶デバイスに書き込むバックアップ工程と、
前記電源が遮断された後再投入されたときに、前記第1のファイルエントリ情報書込み位置に対する前記第2の書込み単位の書込みが終了していない場合には、第2のファイルエントリ情報書込み位置に書き込まれたデータを前記第1のファイルエントリ情報書込み位置に書き込む復旧工程とを前記車載電子機器に実行させることを特徴とする制御プログラム。
An in-vehicle electronic device having a storage device that distributes and stores a single file into a plurality of areas, has a memory that can hold data even when the power from the on-vehicle battery is turned on and off, and even when the power is turned off A control program,
The file entry information having the start position of the file when the file is stored in the storage device and the link list information having the link order of the area from the start position are written to the storage device. A writing step of writing entry information to a plurality of file entry information writing positions in the storage device for each second writing unit that is a part of the entry information;
A backup step of writing a first file entry information write position among the plurality of file entry information write positions to the storage device for each second write unit ;
If the writing of the second writing unit to the first file entry information writing position is not completed when the power is turned off and then turned on again, the second file entry information writing position is set. A control program for causing the in-vehicle electronic device to execute a recovery step of writing the written data to the first file entry information writing position.
単一のファイルを複数の領域に振り分けて格納する記憶デバイスを有するとともに車載バッテリからの電源が投入・遮断され、更に前記電源が遮断されたときでもデータを保持可能なメモリを有する車載電子機器の制御プログラムであって、
前記記憶デバイスに前記ファイルを格納するときの当該ファイルの開始位置を有するファイルエントリ情報と、前記開始位置からの前記領域のリンク順序を有するリンクリスト情報とを前記記憶デバイスに書き込むときに、前記ファイルエントリ情報をその一部である第2の書込み単位ごとに前記記憶デバイスにおけるファイルエントリ情報書込み位置に書き込む書込工程と、
前記第2の書込み単位ごとに、前記第2の書込み単位と前記ファイルエントリ情報書込み位置とを前記メモリに格納するバックアップ工程と、
前記電源が遮断された後再投入されたときに、前記ファイルエントリ情報書込み位置に対する前記メモリに格納された第2の書込み単位の書込みが終了していない場合には、当該第2の書込み単位を当該ファイルエントリ情報書込み位置に書き込む復旧工程とを前記車載電子機器に実行させることを特徴とする制御プログラム。
An in-vehicle electronic device having a storage device that distributes and stores a single file into a plurality of areas, has a memory that can hold data even when the power from the on-vehicle battery is turned on and off, and even when the power is turned off A control program,
The file entry information having the start position of the file when the file is stored in the storage device and the link list information having the link order of the area from the start position are written to the storage device. A writing step of writing entry information to a file entry information writing position in the storage device for each second writing unit that is a part of the entry information;
A backup step for storing the second write unit and the file entry information write position in the memory for each second write unit;
When writing of the second write unit stored in the memory for the file entry information write position is not completed when the power is turned off and then turned on again, the second write unit is set to A control program for causing the in-vehicle electronic device to execute a restoration step of writing to the file entry information writing position.
JP2009124994A 2009-05-25 2009-05-25 In-vehicle electronic device and control program Active JP5483930B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2009124994A JP5483930B2 (en) 2009-05-25 2009-05-25 In-vehicle electronic device and control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2009124994A JP5483930B2 (en) 2009-05-25 2009-05-25 In-vehicle electronic device and control program

Publications (2)

Publication Number Publication Date
JP2010272044A JP2010272044A (en) 2010-12-02
JP5483930B2 true JP5483930B2 (en) 2014-05-07

Family

ID=43419996

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2009124994A Active JP5483930B2 (en) 2009-05-25 2009-05-25 In-vehicle electronic device and control program

Country Status (1)

Country Link
JP (1) JP5483930B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04307643A (en) * 1991-04-04 1992-10-29 Mitsubishi Electric Corp Highly reliable file system
JP3957464B2 (en) * 2000-06-06 2007-08-15 松下電器産業株式会社 Data update device

Also Published As

Publication number Publication date
JP2010272044A (en) 2010-12-02

Similar Documents

Publication Publication Date Title
US20110004871A1 (en) Embedded electronic device and firmware updating method thereof
JP6568947B2 (en) In-vehicle control device, program update system, and program update software
JP5346253B2 (en) Firmware update system, information device, and program
US7730326B2 (en) Method and system for updating firmware stored in non-volatile memory
ES2371995T3 (en) UPDATE OF THE FIRMWARE OF AN ELECTRONIC DEVICE.
US7543137B2 (en) Information processing device and information processing method
CN109634645B (en) Firmware upgrading method and terminal
US20090320012A1 (en) Secure booting for updating firmware over the air
US20040103340A1 (en) Upgrading of firmware with tolerance to failures
US9778926B2 (en) Minimizing image copying during partition updates
JP4160625B1 (en) Error detection control system
CN108170455B (en) Upgrade package packaging method and upgrade method
US20070055969A1 (en) System and method for updating firmware
US20130232325A1 (en) Electronic device to restore mbr, method thereof, and computer-readable medium
JP2013073417A (en) Method and system for arranging object data, server device thereof, client device, and program
CN103430178A (en) Method, apparatus and product of data updating
WO2016085813A1 (en) Method and apparatus for preventing and managing corruption and flash memory contents
US8046529B2 (en) Updating control information in non-volatile memory to control selection of content
US7490321B2 (en) Method for updating firmware via determining program code
CN117093247A (en) Firmware upgrading method and device of embedded device, chip and computing device
US7257030B2 (en) Operating a storage component
JP5483930B2 (en) In-vehicle electronic device and control program
JP6575157B2 (en) Firmware download method and firmware embedded device
US20100146188A1 (en) Replicated file system for electronic devices
CN112130765B (en) EEPROM data reading and writing method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20120227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131016

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20131112

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140110

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140218

R150 Certificate of patent or registration of utility model

Ref document number: 5483930

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250