JP6151976B2 - Recording / reproducing apparatus and control method - Google Patents

Recording / reproducing apparatus and control method Download PDF

Info

Publication number
JP6151976B2
JP6151976B2 JP2013122025A JP2013122025A JP6151976B2 JP 6151976 B2 JP6151976 B2 JP 6151976B2 JP 2013122025 A JP2013122025 A JP 2013122025A JP 2013122025 A JP2013122025 A JP 2013122025A JP 6151976 B2 JP6151976 B2 JP 6151976B2
Authority
JP
Japan
Prior art keywords
data
recording medium
recording
timing signal
delay
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
JP2013122025A
Other languages
Japanese (ja)
Other versions
JP2014238776A5 (en
JP2014238776A (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2013122025A priority Critical patent/JP6151976B2/en
Publication of JP2014238776A publication Critical patent/JP2014238776A/en
Publication of JP2014238776A5 publication Critical patent/JP2014238776A5/ja
Application granted granted Critical
Publication of JP6151976B2 publication Critical patent/JP6151976B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Description

本発明は記録再生装置及び制御方法に関し、特に記録媒体に対するデータ書き込み/読み出しに係るタイミング制御技術に関する。   The present invention relates to a recording / reproducing apparatus and a control method, and more particularly to a timing control technique related to data writing / reading on a recording medium.

従来、メモリカード等の記録媒体に画像データや音声データ等を書き込み、あるいは記録媒体に記録されたデータを読み出して再生する装置が存在する。このような記録媒体が接続される装置(ホスト装置)と記録媒体との間におけるデータの読み書きは、ホスト装置で発生されるクロック信号に合わせて行われる。データの読み書きやコマンドに対するレスポンスはクロック信号の1つのクロックパルスを送信してから、書き込みあるいは読み出しの対象となるデータの送受信あるいはレスポンスの受信が行われる。このため、クロックパルスとデータやレスポンスとは完全に同期したタイミングで送受信されるものではない。例えば、SDメモリカードからデータの読み出しを行う場合、ホスト装置からカードにクロックパルスが与えられてからデータ送信が行われるまでは、規格化された固定値の分だけ遅延することになる。このため、ホスト装置はクロックパルスの送信から固定値分遅延させて記録媒体から送信されたデータをラッチすることで、記録媒体から送信されたデータを取得している。   2. Description of the Related Art Conventionally, there are apparatuses that write image data, audio data, or the like on a recording medium such as a memory card, or read and reproduce data recorded on a recording medium. Reading and writing data between the recording medium connected to such a recording medium (host device) and the recording medium is performed in accordance with a clock signal generated by the host apparatus. In response to data read / write and command, one clock pulse of a clock signal is transmitted, and then data to be written or read is transmitted / received or a response is received. For this reason, the clock pulse and the data and response are not transmitted and received at completely synchronized timing. For example, when data is read from an SD memory card, there is a delay of a standardized fixed value from the time when a clock pulse is given to the card from the host device until the data is transmitted. Therefore, the host device acquires the data transmitted from the recording medium by latching the data transmitted from the recording medium after being delayed by a fixed value from the transmission of the clock pulse.

一方で、近年このような記録媒体に対する読み書きデータレートの向上に伴い、クロックパルスの送信を高速化する必要があり、データ取得のためのクロックパルスからの遅延量は、固定値で規定することが困難になっている。これに対し、SDメモリカードの高速規格であるUHS−I(Ultra High Speed)では、高速クロックを使用してデータの読み出しを行う場合、カードごとにデータラッチのタイミングを調整した上でデータ読み出しを行うことが規定されている。該ラッチタイミングの調整作業はチューニングと呼ばれる(例えば、特許文献1参照)。   On the other hand, in recent years, with an increase in the read / write data rate for such a recording medium, it is necessary to speed up the transmission of the clock pulse, and the delay amount from the clock pulse for data acquisition can be specified as a fixed value. It has become difficult. In contrast, in UHS-I (Ultra High Speed), which is a high-speed standard for SD memory cards, when data is read using a high-speed clock, data read is performed after adjusting the timing of data latch for each card. It is prescribed to do. The operation of adjusting the latch timing is called tuning (see, for example, Patent Document 1).

特開2010−157058号公報JP 2010-157058 A

記録媒体に対するチューニングに係る処理は、一般的にはホスト装置のシステム起動時あるいはホスト装置において記録媒体が認識された際に行われる。しかしながら、クロックパルスからの遅延量は記録媒体の温度等の外的要因によって変動しうるため、起動時や媒体認識時のチューニングが有効とならない可能性があった。即ち、起動時や媒体認識時にチューニングが行われたとしても、外的要因による遅延量の変動によって、データの読み書きが失敗する可能性があった。   The processing related to the tuning of the recording medium is generally performed when the host apparatus is started up or when the recording medium is recognized by the host apparatus. However, since the amount of delay from the clock pulse can vary depending on external factors such as the temperature of the recording medium, tuning at the time of start-up or medium recognition may not be effective. That is, even if tuning is performed at the time of startup or medium recognition, there is a possibility that data read / write may fail due to a variation in the delay amount due to an external factor.

そこで、起動時や媒体確認時以外のタイミングで再度チューニングを行う方法が考えられる。しかし、チューニング処理を行う間はデータの書き込みや読み出しができないため、過度にチューニングに係る処理を実行することは、反対にデータの書き込み/読み出し効率を低下させる可能性があった。   Therefore, a method of performing tuning again at a timing other than at the time of starting or checking the medium can be considered. However, since data cannot be written or read during the tuning process, excessively performing the process related to tuning may adversely reduce the data writing / reading efficiency.

本発明は、上述の問題点に鑑みてなされたものであり、記録媒体から読み出すデータの信頼性を確保しつつ、不要なチューニング処理によるパフォーマンス低下を防止する記録再生装置及び制御方法を提供することを目的とする。   The present invention has been made in view of the above-described problems, and provides a recording / reproducing apparatus and a control method that prevent performance degradation due to unnecessary tuning processing while ensuring the reliability of data read from a recording medium. With the goal.

前述の目的を達成するために、本発明の記録再生装置は、以下の構成を備えることを特徴とする。具体的には記録再生装置は、記録媒体に対してクロック信号を出力する出力手段と、記録媒体に命令を送信すると共に、クロック信号を遅延させることにより得られたタイミング信号に応じて、記録媒体から送信されたデータを取得する通信手段と、記録媒体に対するアクセス要求に応じて、所定のデータ列を有する所定のデータの出力命令を記録媒体に出力するように通信手段を制御し、所定のデータの出力命令に応じて記録媒体から送信されて通信手段により取得されたデータが所定のデータ列を有していることを確認する処理を行う制御手段とを有し、制御手段は、取得されたデータが所定のデータ列を有している場合、タイミング信号の位相の調整処理を実行することなく、アクセス要求に応じた命令を記録媒体に送信するように通信手段を制御し、取得されたデータが所定のデータ列を有していない場合、タイミング信号の位相の調整処理を実行し、タイミング信号の位相の調整処理を実行した後に、アクセス要求に応じた命令を記録媒体に送信するように通信手段を制御することを特徴とする。 In order to achieve the above object, a recording / reproducing apparatus of the present invention is characterized by having the following configuration. Specifically, the recording / reproducing apparatus outputs an output means for outputting a clock signal to the recording medium, and sends a command to the recording medium, and in accordance with a timing signal obtained by delaying the clock signal, Communication means for acquiring data transmitted from the recording medium, and in response to an access request to the recording medium, the communication means is controlled to output an output command of predetermined data having a predetermined data string to the recording medium. the data obtained by the transmission has been communicating means from the recording medium have a control means for processing to ensure that it has a predetermined data sequence in response to an output instruction, the control unit has been acquired If the data has a predetermined data string, the command corresponding to the access request is transmitted to the recording medium without executing the phase adjustment process of the timing signal. When the acquired data does not have a predetermined data string, the timing signal phase adjustment processing is executed, and the timing signal phase adjustment processing is executed, and then an instruction corresponding to the access request is executed. The communication means is controlled to transmit to the recording medium .

このような構成により本発明によれば、記録媒体から読み出すデータの信頼性を確保しつつ、不要なチューニング処理によるパフォーマンス低下を防止することが可能となる。   With this configuration, according to the present invention, it is possible to prevent performance degradation due to unnecessary tuning processing while ensuring the reliability of data read from the recording medium.

本発明の実施形態に係るデジタルカメラ100の機能構成を示したブロック図1 is a block diagram showing a functional configuration of a digital camera 100 according to an embodiment of the present invention. 本発明の実施形態に係るメモリカードコントローラ113の内部構成を示したブロック図The block diagram which showed the internal structure of the memory card controller 113 which concerns on embodiment of this invention. 本発明の実施形態に係るデジタルカメラ100において実行されるチューニング処理を例示したフローチャートThe flowchart which illustrated the tuning process performed in the digital camera 100 which concerns on embodiment of this invention. 本発明の実施形態に係るチューニング処理による遅延段数の決定方法を説明するための図The figure for demonstrating the determination method of the delay stage number by the tuning process which concerns on embodiment of this invention 本発明の実施形態1に係るデジタルカメラ100において実行される遅延チェック処理を例示したフローチャートThe flowchart which illustrated the delay check process performed in the digital camera 100 which concerns on Embodiment 1 of this invention. 本発明の実施形態1に係る遅延チェック処理による動作を説明するための図The figure for demonstrating the operation | movement by the delay check process which concerns on Embodiment 1 of this invention. 本発明の実施形態2に係るデジタルカメラ100において実行される遅延チェック処理を例示したフローチャートThe flowchart which illustrated the delay check process performed in the digital camera 100 which concerns on Embodiment 2 of this invention. 本発明の実施形態2に係る遅延チェック処理において、受信結果の判断に使用されるパターンを例示した図The figure which illustrated the pattern used for judgment of a reception result in the delay check processing concerning Embodiment 2 of the present invention.

[実施形態1]
以下、本発明の例示的な実施形態について、図面を参照して詳細に説明する。なお、以下に説明する一実施形態は、記録再生装置の一例としての、接続されたメモリカードに対してデータの書き込み/読み出しが可能なデジタルカメラに、本発明を適用した例を説明する。しかし、本発明は、記録媒体に対するデータの書き込み/読み出しが可能な任意の機器(ホスト装置)に適用可能である。
[Embodiment 1]
Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. In the following embodiment, an example in which the present invention is applied to a digital camera capable of writing / reading data to / from a connected memory card as an example of a recording / reproducing apparatus will be described. However, the present invention can be applied to any device (host device) capable of writing / reading data to / from a recording medium.

《デジタルカメラ100の構成》
図1は、本発明の実施形態に係るデジタルカメラ100の機能構成を示すブロック図である。
<< Configuration of Digital Camera 100 >>
FIG. 1 is a block diagram showing a functional configuration of a digital camera 100 according to an embodiment of the present invention.

メインマイコン118は、例えばCPUである。メインマイコン118は、デジタルカメラ100が有する各ブロックの動作を制御する。具体的にはメインマイコン118は、ROM119に記憶された、各ブロックに対して後述の各種シーケンスを実行させるためのプログラムを読み出し、SDRAM116に展開して実行することにより各ブロックの動作を制御する。またメインマイコン118は、後述の液晶ドライバ112を制御することで液晶パネル111の表示制御も行う。   The main microcomputer 118 is a CPU, for example. The main microcomputer 118 controls the operation of each block included in the digital camera 100. Specifically, the main microcomputer 118 controls the operation of each block by reading a program stored in the ROM 119 for executing various sequences to be described later for each block, developing the program in the SDRAM 116, and executing the program. The main microcomputer 118 also controls display of the liquid crystal panel 111 by controlling a liquid crystal driver 112 described later.

ROM119は、例えば電気的にデータの消去・記録が可能な不揮発性メモリである。ROM119は、デジタルカメラ100が有する各ブロックの動作プログラムだけでなく、各ブロックの動作において必要となる定数等の情報を記憶する。   The ROM 119 is a non-volatile memory that can electrically erase and record data, for example. The ROM 119 stores not only an operation program for each block of the digital camera 100 but also information such as constants necessary for the operation of each block.

撮像素子103は、例えばCCDやCMOSセンサである。撮像素子103は、撮影レンズ101により撮像面に結像された被写体像を光電変換し、アナログ画像信号を出力する。撮影レンズ101により結像される被写体像の光量は、メインマイコン118による絞り102の開口量制御により制限される。撮像素子103により出力されたアナログ画像信号は、A/D変換器104によりA/D変換処理が適用されることで、デジタルの画像データに変換される。得られた画像データは、画像処理部105においてガンマ補正、ホワイトバランス補正、ノイズリダクションに係る処理が適用された後、フレームメモリ106に非圧縮画像データとして格納される。このような撮影レンズ101、絞り102、撮像素子103、A/D変換器104、画像処理部105、及びフレームメモリ106により、本実施形態のデジタルカメラ100の撮像部が構成される。   The image sensor 103 is, for example, a CCD or a CMOS sensor. The image sensor 103 photoelectrically converts a subject image formed on the imaging surface by the photographing lens 101 and outputs an analog image signal. The amount of light of the subject image formed by the photographing lens 101 is limited by controlling the opening amount of the diaphragm 102 by the main microcomputer 118. The analog image signal output from the image sensor 103 is converted into digital image data by applying A / D conversion processing by the A / D converter 104. The obtained image data is stored as uncompressed image data in the frame memory 106 after the processing relating to gamma correction, white balance correction, and noise reduction is applied in the image processing unit 105. The imaging lens 101, the aperture 102, the imaging element 103, the A / D converter 104, the image processing unit 105, and the frame memory 106 constitute an imaging unit of the digital camera 100 according to the present embodiment.

JPEG符号化部108は、本実施形態のデジタルカメラ100が静止画像を記録する際の符号化形式(JPEG形式)に従って、非圧縮画像データを圧縮符号化し、JPEG静止画像データを生成する。またMPEG符号化部109は、本実施形態のデジタルカメラ100が動画像を記録する際の動画符号化形式(MPEG形式)に従って、非圧縮画像データをフレームとして圧縮符号化し、MPEG動画像データを生成する。JPEG符号化部108及びMPEG符号化部109により生成された各種データは、データバス107を介してSDRAM116に一時的に書き込まれる。   The JPEG encoding unit 108 compresses and encodes uncompressed image data according to an encoding format (JPEG format) when the digital camera 100 of the present embodiment records a still image, and generates JPEG still image data. The MPEG encoding unit 109 generates MPEG moving image data by compressing and encoding uncompressed image data as frames in accordance with the moving image encoding format (MPEG format) when the digital camera 100 of the present embodiment records moving images. To do. Various data generated by the JPEG encoding unit 108 and the MPEG encoding unit 109 are temporarily written in the SDRAM 116 via the data bus 107.

SDRAM116は、揮発性メモリである。SDRAM116には、JPEG符号化部108及びMPEG符号化部109により生成されたデータに加え、液晶パネル111への表示用に変換された画像データが格納される。またSDRAM116は、メモリカード115へのデータ書き込みにおいて、書き込み状況に応じたデータ読み出し、及びメモリカード115との間の記録速度の調停を行うためのバッファメモリ空間として利用される。   The SDRAM 116 is a volatile memory. The SDRAM 116 stores image data converted for display on the liquid crystal panel 111 in addition to the data generated by the JPEG encoding unit 108 and the MPEG encoding unit 109. In addition, the SDRAM 116 is used as a buffer memory space for data reading according to the writing status and mediation of the recording speed with the memory card 115 when writing data to the memory card 115.

液晶パネル111は、例えばLCD等のデジタルカメラ100が有する表示装置である。上述したように、液晶パネル111の表示制御はメインマイコン118により行われる。具体的にはメインマイコン118からの命令を受けた液晶ドライバ112が、SDRAM116に格納されている表示用の画像データを液晶表示信号に変換して液晶パネル111に出力することで、表示制御が行われる。また液晶パネル111は、画素数変換回路110により液晶パネル111の表示画素数に変更された非圧縮画像データが液晶表示信号に変換されて入力されることで、電子ビューファインダとして機能する(スルー表示)。   The liquid crystal panel 111 is a display device included in the digital camera 100 such as an LCD. As described above, the display control of the liquid crystal panel 111 is performed by the main microcomputer 118. Specifically, the liquid crystal driver 112 that has received a command from the main microcomputer 118 converts display image data stored in the SDRAM 116 into a liquid crystal display signal and outputs the liquid crystal display signal to the liquid crystal panel 111, thereby performing display control. Is called. The liquid crystal panel 111 functions as an electronic viewfinder by converting the non-compressed image data, which has been changed to the number of display pixels of the liquid crystal panel 111 by the pixel number conversion circuit 110, into a liquid crystal display signal and inputting it (through display). ).

メモリカード115は、デジタルカメラ100に着脱可能に接続されることで、データの書き込み/読み出しが可能な記録媒体である。本実施形態ではメモリカード115は、NAND型フラッシュメモリで構成されているメモリカードであり、PC互換性を持つFAT(File Allocation Table)ファイルシステムに準拠したフォーマットでデータの管理がなされる。メモリカード115は、カードスロット114を介してデジタルカメラ100に接続される。カードスロット114は、カード検出スイッチを有しており、カードスロット114にメモリカード115が装着されたことを検出すると、検出信号をメインマイコン118に出力する。   The memory card 115 is a recording medium capable of writing / reading data by being detachably connected to the digital camera 100. In this embodiment, the memory card 115 is a memory card composed of a NAND flash memory, and data is managed in a format conforming to a FAT (File Allocation Table) file system having PC compatibility. The memory card 115 is connected to the digital camera 100 via the card slot 114. The card slot 114 has a card detection switch, and outputs a detection signal to the main microcomputer 118 when it is detected that the memory card 115 is inserted into the card slot 114.

メモリカード115へのデータの書き込み、及びメモリカード115からのデータの読み出し等の通信は、メモリカードコントローラ113により行われる。メモリカードコントローラ113は、データの書き込み時はSDRAM116から記録用のデータを読み出し、メモリカード115への書き込みを行う。またメモリカードコントローラ113は、データの読み出し時はメモリカード115からデータを読み出し、SDRAM116に格納する。   Communication such as data writing to the memory card 115 and data reading from the memory card 115 is performed by the memory card controller 113. The memory card controller 113 reads data for recording from the SDRAM 116 and writes the data to the memory card 115 when writing data. The memory card controller 113 reads data from the memory card 115 and stores it in the SDRAM 116 at the time of reading data.

〈メモリカードコントローラ113の構成〉
ここで、本実施形態のメモリカードコントローラ113の詳細構成について図2(a)を用いて詳細を説明する。
<Configuration of Memory Card Controller 113>
Here, the detailed configuration of the memory card controller 113 of the present embodiment will be described in detail with reference to FIG.

メモリカードコントローラ113は、メモリカード115へのデータの書き込み及び読み出しにおいて、CLKライン、CMDライン、及びDATラインを介して信号及びデータの送受信を行う。具体的には、クロック源201は、読み書きのタイミング制御に利用される、クロックパルスで構成されたクロック信号(CLK信号)をCLKラインを介して出力する。ホストコントローラ202は、読み書きに係るコマンド信号の出力、及びメモリカード115からのコマンドに対するレスポンス信号の受信を、CMDラインを介して行う。またホストコントローラ202は、メモリカード115に書き込むデータ、あるいはメモリカード115から読み出したデータを、DATラインを介して送受信する制御を行う。   The memory card controller 113 transmits and receives signals and data through the CLK line, the CMD line, and the DAT line in writing and reading data to and from the memory card 115. Specifically, the clock source 201 outputs a clock signal (CLK signal) composed of clock pulses used for read / write timing control via the CLK line. The host controller 202 outputs a command signal related to reading and writing and receives a response signal for the command from the memory card 115 via the CMD line. The host controller 202 performs control to transmit / receive data to be written to the memory card 115 or data read from the memory card 115 via the DAT line.

データの読み書きにおいて、上述したようにクロックパルスとデータの送受信のタイミングは異なる。このため、遅延素子203は例えばメモリカード115からのデータの読み出し時にクロック信号の位相をメインマイコン118の制御に従って遅延させ、メモリカード115から出力されたデータをラッチするタイミング信号を生成する。そしてフリップフロップ204は、遅延素子203から出力されたタイミング信号に従って、メモリカード115から出力されたデータをラッチする。なお、コマンドの入出力、及びデータの送受信に応じたCMDラインとDATラインとの間の切り替えは、信号分岐部205により行われる。   In reading and writing data, the timing of transmission and reception of clock pulses and data is different as described above. For this reason, the delay element 203 delays the phase of the clock signal in accordance with the control of the main microcomputer 118 when reading data from the memory card 115, for example, and generates a timing signal for latching the data output from the memory card 115. The flip-flop 204 latches the data output from the memory card 115 in accordance with the timing signal output from the delay element 203. The signal branching unit 205 switches between the CMD line and the DAT line according to command input / output and data transmission / reception.

さらに、遅延素子203の内部構成について、図2(b)を用いて説明する。遅延素子203は、所定数の遅延回路206と、各遅延回路206からの出力のうちの1つを選択するセレクタ207とで構成される。本実施形態の遅延素子203は、15個の遅延回路206を有し、遅延段数を16段階に変更可能であるものとして説明する。各遅延回路206は、クロック源201が出力したクロック信号、あるいは直前の遅延回路206から出力されたクロック信号を、所定の時間だけ遅延させる。本実施形態では各遅延回路206における遅延量は、クロック源201からの出力されるクロックパルス周期の1/16の期間であるとし、全ての遅延回路206で遅延がなされることでクロックパルスは1周期分の遅延量となるものとする。セレクタ207は、メインマイコン118からの指示に応じて、クロック源201及び各遅延回路206のいずれかが出力したクロック信号を、フリップフロップ204の動作クロック(ラッチクロック)として出力する。このように、セレクタ207が選択するクロック信号を変更することで、フリップフロップ204の動作クロックが有する遅延量を調整可能である。   Further, the internal configuration of the delay element 203 will be described with reference to FIG. The delay element 203 includes a predetermined number of delay circuits 206 and a selector 207 that selects one of the outputs from each delay circuit 206. The delay element 203 of the present embodiment will be described as having 15 delay circuits 206 and the number of delay stages being changeable to 16. Each delay circuit 206 delays the clock signal output from the clock source 201 or the clock signal output from the immediately preceding delay circuit 206 by a predetermined time. In the present embodiment, the delay amount in each delay circuit 206 is 1/16 of the clock pulse period output from the clock source 201, and the delay is performed in all the delay circuits 206, so that the clock pulse is 1 Assume that the amount of delay is equal to the period. The selector 207 outputs a clock signal output from either the clock source 201 or each delay circuit 206 as an operation clock (latch clock) of the flip-flop 204 in accordance with an instruction from the main microcomputer 118. As described above, by changing the clock signal selected by the selector 207, the delay amount of the operation clock of the flip-flop 204 can be adjusted.

また、本実施形態のデジタルカメラ100は、操作入力部117を有する。操作入力部117は、デジタルカメラ100が備えるユーザインタフェースである。操作入力部117は、デジタルカメラ100に設けられた各種操作キーがユーザによって操作された場合、該操作により出力される信号を受信し、操作に対応する制御信号をメインマイコン118に出力する。   In addition, the digital camera 100 according to the present embodiment includes an operation input unit 117. The operation input unit 117 is a user interface provided in the digital camera 100. When various operation keys provided on the digital camera 100 are operated by the user, the operation input unit 117 receives a signal output by the operation and outputs a control signal corresponding to the operation to the main microcomputer 118.

《動作概要》
以下、まず本実施形態のデジタルカメラ100の各ブロックの動作について、その概要を説明する。
<Operation overview>
Hereinafter, the outline of the operation of each block of the digital camera 100 of the present embodiment will be described first.

デジタルカメラ100が動画撮影モードで起動されると、メインマイコン118は、動画撮影の待機状態に各ブロックを制御する。具体的にはメインマイコン118は、撮像部を駆動させて撮像動作を開始させ、順次得られた画像データを液晶パネル111に表示させ、スルー表示状態とする。   When the digital camera 100 is activated in the moving image shooting mode, the main microcomputer 118 controls each block in a standby state for moving image shooting. Specifically, the main microcomputer 118 drives the imaging unit to start the imaging operation, displays the sequentially obtained image data on the liquid crystal panel 111, and sets the through display state.

撮影待機状態において撮影開始指示に対応する制御信号を操作入力部117から受信すると、メインマイコン118は、MPEG符号化部109を制御し、非圧縮画像データの符号化処理を開始させる。そして、符号化処理により生成された動画像データに係るデータを順次SDRAM116に格納させる。メインマイコン118は、SDRAM116に格納された動画像データのデータ量が、メモリカード115への書き込みを開始する閾値に達したかを監視し、達した場合に書き込み処理を開始する。   When the control signal corresponding to the shooting start instruction is received from the operation input unit 117 in the shooting standby state, the main microcomputer 118 controls the MPEG encoding unit 109 to start encoding processing of uncompressed image data. Then, the data related to the moving image data generated by the encoding process is sequentially stored in the SDRAM 116. The main microcomputer 118 monitors whether or not the amount of moving image data stored in the SDRAM 116 has reached a threshold value for starting writing to the memory card 115, and starts writing processing when it reaches.

メモリカードコントローラ113は、メインマイコン118からの書き込み指示に応じて、SDRAM116から動画像データを読み出し、カードスロット114を介してメモリカード115に書き込む。このとき、メモリカードコントローラ113のホストコントローラ202は、メモリカード115に対して繰り返し書き込みコマンドを発行する。これにより、動画像データは所定量ずつSDRAM116から読み出されてメモリカード115に書き込まれる。   In response to a write instruction from the main microcomputer 118, the memory card controller 113 reads moving image data from the SDRAM 116 and writes it to the memory card 115 via the card slot 114. At this time, the host controller 202 of the memory card controller 113 repeatedly issues a write command to the memory card 115. Thereby, the moving image data is read from the SDRAM 116 by a predetermined amount and written to the memory card 115.

本実施形態では、メモリカード115に書き込み可能なデータレートは、MPEG符号化部109により符号化された動画像データがフレームメモリ106に格納される際のデータレートよりも大きいものとする。この場合、メモリカードコントローラ113による書き込み処理が開始されると、SDRAM116に格納されている、未記録の動画像データのデータ量は徐々に減少する。メインマイコン118は、メモリカードコントローラ113による書き込みが開始された後、SDRAM116に格納されている動画像データのデータ量が所定値まで減少したことを検出すると、メモリカードコントローラ113による書き込み処理を停止させる。また、その後SDRAM116に格納されている動画像データのデータ量が書き込み処理を開始する閾値に達すると、メインマイコン118は再びメモリカードコントローラ113にメモリカード115への書き込みを開始させる。   In the present embodiment, it is assumed that the data rate that can be written to the memory card 115 is higher than the data rate when moving image data encoded by the MPEG encoding unit 109 is stored in the frame memory 106. In this case, when the writing process by the memory card controller 113 is started, the amount of unrecorded moving image data stored in the SDRAM 116 gradually decreases. When the main microcomputer 118 detects that the data amount of the moving image data stored in the SDRAM 116 has decreased to a predetermined value after the writing by the memory card controller 113 is started, the main microcomputer 118 stops the writing process by the memory card controller 113. . When the amount of moving image data stored in the SDRAM 116 reaches a threshold value for starting the writing process, the main microcomputer 118 causes the memory card controller 113 to start writing to the memory card 115 again.

このように、動画像データの撮影開始指示がなされた後、メモリカードコントローラ113はメモリカード115に対して間欠的に動画像データを書き込む。   As described above, after an instruction to start capturing moving image data is given, the memory card controller 113 writes the moving image data to the memory card 115 intermittently.

また撮影中に撮影終了、即ち記録停止の指示に対応する制御信号を操作入力部117から受信すると、メインマイコン118は、MPEG符号化部109による符号化処理を停止させる。そしてメインマイコン118は、メモリカードコントローラ113にSDRAM116に残存する未記録の動画像データのメモリカード115への書き込みを実行させた後、メモリカード115への記録処理を停止させる。   Further, when the control signal corresponding to the instruction to stop shooting, that is, the recording stop is received from the operation input unit 117 during shooting, the main microcomputer 118 stops the encoding process by the MPEG encoding unit 109. The main microcomputer 118 causes the memory card controller 113 to write the unrecorded moving image data remaining in the SDRAM 116 to the memory card 115 and then stops the recording process to the memory card 115.

また撮影待機状態において静止画記録指示に対応する制御信号を操作入力部117から受信すると、メインマイコン118は撮像部に静止画記録の指示に対応する1画面分の非圧縮画像データを出力させる。メインマイコン118は該非圧縮画像データをJPEG符号化部108に符号化させ、得られた静止画像データをSDRAM116に格納させる。そしてメモリカードコントローラ113はメインマイコン118の制御の下、SDRAM116に格納された静止画像データをメモリカード115に書き込む処理を行う。   When the control signal corresponding to the still image recording instruction is received from the operation input unit 117 in the shooting standby state, the main microcomputer 118 causes the imaging unit to output uncompressed image data for one screen corresponding to the still image recording instruction. The main microcomputer 118 causes the JPEG encoding unit 108 to encode the uncompressed image data, and stores the obtained still image data in the SDRAM 116. The memory card controller 113 performs a process of writing still image data stored in the SDRAM 116 to the memory card 115 under the control of the main microcomputer 118.

《チューニング処理》
以下、上述のような構成を有する本実施形態のデジタルカメラ100において実行される遅延段数の調整処理であるチューニング処理について図3のフローチャートを用いて詳細を説明する。本チューニング処理は、例えば、デジタルカメラ100にメモリカード115が接続されてから記録処理の開始指示がなされるまでの間、あるいはデジタルカメラ100の起動後から記録処理の開始指示がなされるまでの間に実行されるものとして説明する。なお、本チューニング処理の実行中は、記録処理の開始指示がなされたとしても、メインマイコン118は記録処理を実行しないものとする。また、本チューニング処理は、メインマイコン118がメモリカードコントローラ113を制御することにより、メモリカードコントローラ113の各ブロックが対応する処理を実行する。このため、メインマイコン118は、メモリカードコントローラ113における処理において取得されたデータ等を参照可能であるものとして説明する。
《Tuning process》
Hereinafter, the details of the tuning process, which is the process for adjusting the number of delay stages, executed in the digital camera 100 of the present embodiment having the above-described configuration will be described with reference to the flowchart of FIG. This tuning process is performed, for example, after the memory card 115 is connected to the digital camera 100 until a recording process start instruction is issued, or after the digital camera 100 is activated until a recording process start instruction is issued. It will be described as being executed. Note that during execution of the tuning process, the main microcomputer 118 does not execute the recording process even if an instruction to start the recording process is given. In the tuning process, the main microcomputer 118 controls the memory card controller 113 to execute a process corresponding to each block of the memory card controller 113. For this reason, the main microcomputer 118 will be described as being able to refer to data and the like acquired in the processing in the memory card controller 113.

S301で、メインマイコン118は、メモリカードコントローラ113のクロック源201にクロック信号の送信を開始させる。またメインマイコン118は遅延素子203におけるクロック信号の遅延段数(16段階)を「1」に設定する。   In S301, the main microcomputer 118 causes the clock source 201 of the memory card controller 113 to start transmitting a clock signal. The main microcomputer 118 sets the number of delay stages (16 stages) of the clock signal in the delay element 203 to “1”.

S302で、ホストコントローラ202は、メモリカード115にテストデータを送信させる、テストデータ送信コマンドをメモリカード115に対して発行し、CMDラインを介して送信する。テストデータは、予め定められたパターンの64バイトのデータ列であり、メモリカード115は受信しているクロック信号に同期して該データ列を送信するものとする。   In step S302, the host controller 202 issues a test data transmission command for causing the memory card 115 to transmit test data to the memory card 115 and transmits the test data via the CMD line. The test data is a 64-byte data string having a predetermined pattern, and the memory card 115 transmits the data string in synchronization with the received clock signal.

S303で、フリップフロップ204は、遅延素子203により供給されるラッチタイミングでメモリカード115からDATラインを介して受信したデータをラッチする。遅延素子203により供給されるラッチタイミングは、現在設定されている遅延段数に従って遅延素子203がクロック信号を遅延させることで生成される。   In S303, the flip-flop 204 latches the data received from the memory card 115 via the DAT line at the latch timing supplied by the delay element 203. The latch timing supplied by the delay element 203 is generated by the delay element 203 delaying the clock signal according to the currently set number of delay stages.

S304で、メインマイコン118は、フリップフロップ204が受信したデータ列が、予め定められたパターン(メモリカード115が返却したデータ列のパターン)と一致するか否かを判断する。メインマイコン118は、受信したデータ列が予め定められたパターンと一致すると判断した場合は処理をS305に移し、一致しないと判断した場合は処理をS306に移す。   In S304, the main microcomputer 118 determines whether or not the data string received by the flip-flop 204 matches a predetermined pattern (the pattern of the data string returned by the memory card 115). If the main microcomputer 118 determines that the received data string matches a predetermined pattern, the process proceeds to S305. If the main microcomputer 118 determines that the received data string does not match, the process proceeds to S306.

S305で、メインマイコン118は、例えばSDRAM116に格納されている受信結果テーブルに、現在の遅延段数に関連付けて受信成功の情報を記録する。一方、S304において受信したデータ列が予め定められたパターンと一致しないと判断した場合、メインマイコン118はS306で、現在の遅延段数に関連付けて受信失敗の情報を受信結果テーブルに記録する。   In step S <b> 305, the main microcomputer 118 records information on successful reception in association with the current number of delay stages in the reception result table stored in the SDRAM 116, for example. On the other hand, if the main microcomputer 118 determines that the received data string does not match the predetermined pattern in S304, the main microcomputer 118 records information on reception failure in the reception result table in association with the current number of delay stages in S306.

S307で、メインマイコン118は、遅延素子203に設定した遅延段数が最大遅延段数(本実施形態の場合16)であるか否かを判断する。メインマイコン118は、遅延素子203に設定した遅延段数が最大遅延段数ではないと判断した場合、S308で1つ上の遅延段数を遅延素子203に設定し、処理をS302に戻す。またメインマイコン118は、遅延素子203に設定した遅延段数が最大遅延段数であると判断した場合、処理をS309に移す。   In S307, the main microcomputer 118 determines whether or not the number of delay stages set in the delay element 203 is the maximum number of delay stages (16 in this embodiment). When the main microcomputer 118 determines that the number of delay stages set in the delay element 203 is not the maximum number of delay stages, the main microcomputer 118 sets the number of delay stages one level higher in the delay element 203 in S308, and returns the process to S302. If the main microcomputer 118 determines that the number of delay stages set in the delay element 203 is the maximum number of delay stages, the process proceeds to S309.

S309で、メインマイコン118は、SDRAM116に格納されている受信結果テーブルを参照して最適遅延段数を決定し、該段数を遅延素子203に設定して本チューニング処理を完了する。S301乃至S308の処理により、例えば図4に示されるような受信結果テーブルが得られる。本ステップではメインマイコン118は、受信成功した遅延段数の範囲の中心を、最適遅延段数として決定する。図4の例では、遅延段数5から16、及び1周期後の1が受信成功した遅延段数(位相)を示すため、中央値である11が最適遅延段数として決定される。   In step S309, the main microcomputer 118 refers to the reception result table stored in the SDRAM 116, determines the optimum delay stage number, sets the stage number in the delay element 203, and completes the tuning process. A reception result table as shown in FIG. 4 is obtained by the processing of S301 to S308, for example. In this step, the main microcomputer 118 determines the center of the range of the number of delay stages successfully received as the optimum number of delay stages. In the example of FIG. 4, the number of delay stages 5 to 16 and 1 after one period indicate the number of delay stages (phases) successfully received, so the median of 11 is determined as the optimum delay stage number.

このようにすることで、チューニング処理を実行することでメモリカードコントローラ113の遅延素子203がフリップフロップ204に最適なラッチタイミングを出力できるように、遅延素子203の遅延段数を設定することができる。即ち、ホストコントローラ202はメインマイコン118の制御の下、テストデータの出力命令を遅延段数を異ならせて複数回出力することで、各遅延段数について得られた複数回の出力データに基づいて、最適な遅延段数を設定することができる。   In this way, the delay stage number of the delay element 203 can be set so that the delay element 203 of the memory card controller 113 can output the optimum latch timing to the flip-flop 204 by executing the tuning process. That is, under the control of the main microcomputer 118, the host controller 202 outputs the test data output command a plurality of times with different delay stage numbers, so that the optimum data is obtained based on the output data obtained for each delay stage number. It is possible to set the number of delay stages.

《遅延チェック処理》
ところで、このようにチューニング処理の実行により一時的に最適な遅延段数の設定はできるが、上述したように遅延素子による遅延量は温度等の要因によって変化する。即ち、設定した最適な遅延段数は温度変化により最適ではない、あるいはデータの受信エラーを生じうる段数となりうる。このため、本実施形態のデジタルカメラ100では、静止画像データあるいは動画像データの記録処理中にラッチクロックの有効性をチェックする遅延チェック処理を実行する。
《Delay check processing》
By the way, although the optimum delay stage number can be temporarily set by executing the tuning process as described above, the delay amount by the delay element varies depending on factors such as temperature as described above. That is, the set optimum number of delay stages may not be optimum due to a temperature change, or may be a stage number that may cause a data reception error. For this reason, in the digital camera 100 of the present embodiment, a delay check process for checking the validity of the latch clock is performed during the recording process of still image data or moving image data.

以下、本実施形態のデジタルカメラ100において実行される遅延チェック処理について、図5のフローチャートを用いて詳細を説明する。なお、本遅延チェック処理は、上位層プログラムにおいてメモリカード115へのデータ書き込み開始要求がなされた際に開始されるものとして説明する。   Hereinafter, the delay check process executed in the digital camera 100 of the present embodiment will be described in detail using the flowchart of FIG. The delay check process will be described as being started when a data write start request to the memory card 115 is made in the upper layer program.

S501で、メインマイコン118は、なされたデータ書き込み開始要求が遅延させる位相(遅延量)の有効性のチェックを実行する条件に該当するか否かを判断する。本実施形態ではデータ書き込み開始要求がなされた場合にS502以降のチェック処理を実行するものとして説明するが、チェックを実行する条件はこれに限られるものではない。チェックを実行する条件は、例えば前回のチェック実行から経過した時間が所定の時間に達した場合、書き込み開始要求が所定回数なされた場合、あるいは書き込みを行うデータ量が所定量以上の要求がなされた場合等について設定されてもよい。メインマイコン118は、なされたデータ書き込み開始要求がチェックを実行する条件に該当すると判断した場合は処理をS502に移し、該当しないと判断した場合は処理をS506に移す。   In step S <b> 501, the main microcomputer 118 determines whether or not a condition for executing the validity check of the phase (delay amount) delayed by the data write start request made is satisfied. In the present embodiment, it is assumed that the check processing after S502 is executed when a data write start request is made, but the condition for executing the check is not limited to this. The conditions for executing the check are, for example, when the time elapsed since the previous check execution has reached a predetermined time, when the write start request is made a predetermined number of times, or when the amount of data to be written is a predetermined amount or more You may set about a case etc. If the main microcomputer 118 determines that the data write start request made corresponds to the condition for executing the check, the process proceeds to S502. If the main microcomputer 118 determines that the request does not correspond, the process proceeds to S506.

S502で、ホストコントローラ202は、テストデータ送信コマンドをメモリカード115に対して発行し、CMDラインを介して送信する。   In step S502, the host controller 202 issues a test data transmission command to the memory card 115 and transmits the command via the CMD line.

S503で、フリップフロップ204は、遅延素子203により供給されるラッチタイミングでメモリカード115からDATラインを介して受信したデータをラッチする。遅延素子203により供給されるラッチタイミングは、上述のチューニング処理において設定された遅延段数に従って遅延素子203がクロック信号を遅延させることで生成される。   In S503, the flip-flop 204 latches the data received from the memory card 115 via the DAT line at the latch timing supplied by the delay element 203. The latch timing supplied by the delay element 203 is generated by the delay element 203 delaying the clock signal in accordance with the number of delay stages set in the tuning process described above.

S504で、メインマイコン118は、フリップフロップ204が受信したデータ列が、予め定められたパターンと一致するか否かを判断する。メインマイコン118は、受信したデータ列が予め定められたパターンと一致すると判断した場合は処理をS506に移し、一致しないと判断した場合は処理をS505に移す。   In step S504, the main microcomputer 118 determines whether or not the data string received by the flip-flop 204 matches a predetermined pattern. If the main microcomputer 118 determines that the received data string matches a predetermined pattern, the process proceeds to S506. If the main microcomputer 118 determines that the received data string does not match, the process proceeds to S505.

S505で、メインマイコン118は、チューニング処理を再度実行し、最適な遅延段数の設定を行う。   In step S <b> 505, the main microcomputer 118 executes the tuning process again and sets an optimal number of delay stages.

S506で、メモリカードコントローラ113は、S501において受信したデータ書き込み要求をクロック信号に従って送出し、データ書き込みに係る記録処理を実行する。   In S506, the memory card controller 113 sends out the data write request received in S501 in accordance with the clock signal, and executes a recording process related to data writing.

このようにすることで本実施形態のデジタルカメラ100では、メモリカードのマウント時やデジタルカメラ100の起動時だけでなく、メモリカード115に対する記録処理の実行中に、ラッチタイミングの有効性をチェックすることができる。即ち、メモリカードコントローラ113における温度変化等の外的要因によって、好適なラッチが行えるクロック信号の遅延量が変化した場合であっても、再度遅延量の設定を行うことができる。   In this way, in the digital camera 100 of the present embodiment, the validity of the latch timing is checked not only when the memory card is mounted or when the digital camera 100 is activated, but also during the recording process on the memory card 115. be able to. That is, even when the delay amount of the clock signal that can be suitably latched changes due to an external factor such as a temperature change in the memory card controller 113, the delay amount can be set again.

例えば図6に示されるように、SDRAM116に格納された記録対象のデータが16メガバイト(MB)を越えた場合に、メモリカードコントローラ113がメモリカード115への書き込みを開始するように設定されている場合を考える。   For example, as shown in FIG. 6, the memory card controller 113 is set to start writing to the memory card 115 when the data to be recorded stored in the SDRAM 116 exceeds 16 megabytes (MB). Think about the case.

メインマイコン118は、SDRAM116に格納されている未記録のデータが16MBを越えたタイミングで、メモリカードコントローラ113に対しテストデータ送信コマンドを送信する。メモリカードコントローラ113は、メモリカード115に対しテストデータ送信コマンドを発行し、メモリカード115からパターンデータを受け、メインマイコン118に送る。メインマイコン118は受信したデータ列がテストパターンと一致するか否かを判別する。判別の結果、受信したデータ列がテストパターンと一致した場合、メインマイコン118はメモリカードコントローラに対し、書き込みコマンドを発行する。メモリカードコントローラ113は、メインマイコン118からの書き込みコマンドに応じて、SDRAM116から未記録のデータを読み出してメモリカード115への書き込みを開始する。その後、データの書き込みによりSDRAM116に蓄積されるデータのデータ量は徐々に減少して16MBを下回るが、16MBのデータの書き込み完了に伴い未記録のデータ量は上昇に転ずる。その後、再度データ量が16MBを越えたタイミングでデータ書き込み開始要求がなされるため、メモリカードコントローラ113は再びデータの書き込みを開始する。即ち、SDRAM116に格納される未記録データのデータ量に応じてデータ書き込み開始要求が間欠的になされるため、本実施形態のデジタルカメラ100では間欠的に遅延量の有効性をチェックすることができる。   The main microcomputer 118 transmits a test data transmission command to the memory card controller 113 at a timing when unrecorded data stored in the SDRAM 116 exceeds 16 MB. The memory card controller 113 issues a test data transmission command to the memory card 115, receives pattern data from the memory card 115, and sends it to the main microcomputer 118. The main microcomputer 118 determines whether or not the received data string matches the test pattern. As a result of determination, when the received data string matches the test pattern, the main microcomputer 118 issues a write command to the memory card controller. In response to a write command from the main microcomputer 118, the memory card controller 113 reads unrecorded data from the SDRAM 116 and starts writing to the memory card 115. Thereafter, the data amount of data accumulated in the SDRAM 116 due to data writing gradually decreases to below 16 MB, but the unrecorded data amount starts to increase with the completion of the 16 MB data writing. Thereafter, since the data write start request is made again at the timing when the data amount exceeds 16 MB, the memory card controller 113 starts writing data again. That is, since the data write start request is intermittently made according to the data amount of unrecorded data stored in the SDRAM 116, the digital camera 100 of this embodiment can intermittently check the effectiveness of the delay amount. .

なお、本実施形態ではメモリカード115へのデータ書き込み開始要求がなされた場合に遅延チェック処理を行うものとして説明したが、データ読み出し要求がなされた場合に遅延量の有効性チェックを行うものであってもよい。即ち、メモリカード115へのアクセス要求がなされた場合に遅延チェック処理が実行されてもよい。なお、チェック実行の条件は、データ書き込みについて上述したのと同様に、データ読み出しにおいても、前回の要求からの経過時間、要求回数、あるいは読み出しデータ量について条件が設定されてもよい。また、メインマイコン118がアクセス要求によるアクセスデータ量を積算するカウンタを有し、前回のテストパターン受信によるチェックから所定データ量のアクセスがあった後、最初にアクセス要求時がなされた際にチェックを実行する構成であってもよい。またデジタルカメラ100に設定されている撮影モード、再生モード等のモードが切り換えられた後、最初にアクセス要求時がなされた際にチェックを実行する構成であってもよい。つまり、このような条件変更により、例えば小さいデータサイズのデータ書き込みを繰り返すアクセスが続く場合に、過度にテストパターン受信によるチェックが実行されることを回避することも可能である。   In the present embodiment, the delay check process is performed when a data write start request to the memory card 115 is made. However, the validity of the delay amount is checked when a data read request is made. May be. That is, the delay check process may be executed when an access request to the memory card 115 is made. Note that the check execution condition may be set for the elapsed time from the previous request, the number of requests, or the read data amount in the data read, as described above for the data write. In addition, the main microcomputer 118 has a counter for accumulating the amount of access data by the access request, and checks when the access request is made for the first time after a predetermined amount of data has been accessed since the previous check by receiving the test pattern. It may be configured to execute. In addition, after the mode such as the shooting mode and the playback mode set in the digital camera 100 is switched, a check may be performed when an access request is first made. That is, by changing the conditions, it is possible to avoid excessively performing a check by receiving a test pattern when, for example, an access to repeatedly write data with a small data size continues.

以上説明したように、本実施形態の記録再生装置は、記録媒体から読み出すデータの信頼性を確保しつつ、不要なチューニング処理によるパフォーマンス低下を防止することができる。具体的には記録再生装置は、記録媒体に対してクロック信号を出力と共に、クロック信号を遅延させることにより得られたタイミング信号に応じて、記録媒体から送信されたデータを取得する。また記録再生装置は、記録媒体に対するアクセス要求に応じて、所定のデータ列を有する所定のデータの出力命令を記録媒体に出力するように制御する。このとき記録再生装置は、所定のデータの出力命令に応じて記録媒体から送信されて取得されたデータが所定のデータ列を有していることを確認する。   As described above, the recording / reproducing apparatus of the present embodiment can prevent performance degradation due to unnecessary tuning processing while ensuring the reliability of data read from the recording medium. Specifically, the recording / reproducing apparatus outputs the clock signal to the recording medium and acquires the data transmitted from the recording medium according to the timing signal obtained by delaying the clock signal. The recording / reproducing apparatus controls to output an output command of predetermined data having a predetermined data string to the recording medium in response to an access request to the recording medium. At this time, the recording / reproducing apparatus confirms that the data transmitted and acquired from the recording medium according to the output command of the predetermined data has a predetermined data string.

[実施形態2]
上述した実施形態1ではメモリカード115へのアクセス要求がなされた際にテストデータ受信による遅延量の有効性チェックを行い、チェックの結果、テストデータの受信エラーがある場合に再チューニングの実行を決定するものとして説明した。本実施形態ではさらにチェック結果の信頼度を判断した上で、チューニング処理の実行有無を決定する手法について説明する。
[Embodiment 2]
In the first embodiment, when the access request to the memory card 115 is made, the validity of the delay amount due to the reception of the test data is checked, and if there is a test data reception error as a result of the check, execution of retuning is decided. Explained as what to do. In the present embodiment, a method for determining whether or not to execute the tuning process after determining the reliability of the check result will be described.

なお、本実施形態のデジタルカメラ100は、上述した実施形態1のデジタルカメラ100と同様の構成を有するものとし、その機能構成の詳細説明は省略する。また、以下の説明において上述した実施形態1のチューニング処理あるいは遅延チェック処理と同様の処理を行うステップについては同一の参照番号を付して説明を省略するものとする。   Note that the digital camera 100 of the present embodiment has the same configuration as the digital camera 100 of the first embodiment described above, and a detailed description of the functional configuration thereof is omitted. In the following description, steps that perform the same processing as the tuning processing or delay check processing of the first embodiment described above are denoted by the same reference numerals and description thereof is omitted.

《遅延チェック処理》
以下、本実施形態のデジタルカメラ100において実行される遅延チェック処理について、図7のフローチャートを用いて詳細を説明する。なお、本遅延チェック処理は、上述した実施形態1と同様に上位層プログラムにおいてメモリカード115へのデータ書き込み開始要求がなされた際に開始されるものとして説明する。
《Delay check processing》
Hereinafter, the delay check process executed in the digital camera 100 of the present embodiment will be described in detail using the flowchart of FIG. The delay check process will be described as being started when a data write start request to the memory card 115 is made in the upper layer program as in the first embodiment.

S501においてデータ書き込み開始要求がチェックを実行する条件に該当すると判断した場合、メインマイコン118はS701で、テストデータの送信回数を示す変数Nに0を代入し、処理をS502に移す。   If it is determined in S501 that the data write start request corresponds to the condition for executing the check, the main microcomputer 118 substitutes 0 for a variable N indicating the number of times test data is transmitted in S701, and the process proceeds to S502.

そしてS503においてホストコントローラ202が受信データをラッチすると、メインマイコン118はS702で、受信されたデータ列が予め定められたパターンと一致するかを判断する。メインマイコン118は、遅延素子203に現在設定されている遅延段数に関連付けて、該判断結果(受信成功/失敗)の情報をSDRAM116に格納されている受信結果判定テーブルに格納する。   When the host controller 202 latches the received data in S503, the main microcomputer 118 determines in S702 whether the received data string matches a predetermined pattern. The main microcomputer 118 stores information on the determination result (reception success / failure) in the reception result determination table stored in the SDRAM 116 in association with the number of delay stages currently set in the delay element 203.

S703で、メインマイコン118は、変数Nを1だけインクリメントする。そしてS704で変数Nが1であるか否かを判断する。メインマイコン118は、変数Nが1であると判断した場合、S705で本遅延チェック処理の開始時に遅延素子203に設定されていた遅延段数から1段階低い遅延段数を遅延素子203に設定し、処理をS502に戻す。またメインマイコン118は、変数Nが1ではないと判断した場合は処理をS706に移す。   In S703, the main microcomputer 118 increments the variable N by 1. In step S704, it is determined whether the variable N is 1. When determining that the variable N is 1, the main microcomputer 118 sets a delay stage number one step lower than the delay stage number set in the delay element 203 at the start of the delay check process in S705 to the delay element 203. To S502. If the main microcomputer 118 determines that the variable N is not 1, the process proceeds to S706.

S706で、メインマイコン118は、変数Nが2であるか否かを判断する。メインマイコン118は、変数Nが2であると判断した場合、S707で本遅延チェック処理の開始時に遅延素子203に設定されていた遅延段数から1段階高い遅延段数を遅延素子203に設定し、処理をS502に戻す。またメインマイコン118は、変数Nが2ではないと判断した場合は処理をS708に移す。   In step S <b> 706, the main microcomputer 118 determines whether the variable N is 2. When determining that the variable N is 2, the main microcomputer 118 sets a delay stage number one step higher than the delay stage number set in the delay element 203 at the start of the delay check process in S707 to the delay element 203. To S502. If the main microcomputer 118 determines that the variable N is not 2, the process proceeds to S708.

このように、本実施形態の遅延チェック処理では、遅延チェック処理の開始時に遅延素子203に設定されている遅延段数だけでなく、その前後の段数についてもテストデータの受信による遅延量の有効性チェックを行う。なお、本実施形態では前後1段階の遅延段数をチェック対象として設定するが、本発明の実施はこれに限られるものではない。即ち、チェック対象として設定する遅延段数の範囲は前後1段階より広くてもよい。つまり、S701乃至S707の処理はチューニング処理の再実行有無の判断処理であるため、チューニング処理において設定される遅延段数の範囲(全範囲)よりも狭い範囲に含まれる複数の遅延段数について実行されることで効率化が実現される。また、遅延チェック処理の開始時に設定されている遅延段数と連続する遅延段数がチェック対象として設定されなくてもよい。例えば、最後に実行されたチューニング処理において生成された受信結果テーブルにおいて受信成功の情報が関連付けられている境界値の段数(図4の例では遅延段数5と1)がチェック対象として選択されてもよい。   As described above, in the delay check process of this embodiment, not only the number of delay stages set in the delay element 203 at the start of the delay check process but also the validity check of the delay amount by the reception of the test data for the number of stages before and after that. I do. In this embodiment, the number of delay stages of one stage before and after is set as a check target, but the implementation of the present invention is not limited to this. That is, the range of the number of delay stages set as a check target may be wider than one stage before and after. That is, the processing of S701 to S707 is processing for determining whether or not the tuning process is re-executed, and is therefore executed for a plurality of delay stages included in a narrower range than the range of delay stages (all ranges) set in the tuning process. Efficiency is achieved. In addition, the delay stage number that is continuous with the delay stage number set at the start of the delay check process may not be set as the check target. For example, even if the number of boundary value stages (in the example of FIG. 4, the number of delay stages 5 and 1) associated with the information on successful reception in the reception result table generated in the last executed tuning process is selected as the check target. Good.

S708で、メインマイコン118は、SDRAM116に格納された受信結果判定テーブルを参照し、3種類の遅延段数についての受信結果が図8に記載のパターン1乃至8のいずれに該当するかを判断する。   In step S708, the main microcomputer 118 refers to the reception result determination table stored in the SDRAM 116, and determines which of the patterns 1 to 8 shown in FIG. 8 corresponds to the reception results for the three types of delay stages.

パターン1は、チェックを行った3種類の遅延段数の全てにおいてテストデータが正しく受信できた状態であるため、遅延チェック処理の開始時に遅延素子203に設定されていた遅延段数で問題なくデータ読み出しが可能であると判断できる。このためメインマイコン118は、遅延段数を遅延チェック処理の開始時に設定されていた遅延段数が遅延素子203に設定された状態で、S506に処理を移し、データ書き込みに係る記録処理を実行する。   Pattern 1 is a state in which the test data can be correctly received in all of the three types of delay stages that have been checked. Therefore, data can be read out without any problem with the number of delay stages set in the delay element 203 at the start of the delay check process. It can be judged that it is possible. Therefore, the main microcomputer 118 shifts the process to S506 in a state where the delay stage number set at the start of the delay check process is set in the delay element 203, and executes a recording process related to data writing.

一方、パターン2及び3、またはパターン4及び5は、遅延チェック処理の開始時に設定されていた遅延段数の前後の段数のいずれかにおいて、テストデータの受信エラーが生じた状態である。即ち、開始時に設定されていた遅延段数についてテストデータが正しく受信できたとしても、例えばデータ書き出し中に温度変化等の外的要因によって遅延量が有効でなくなりうる、信頼性の低いチェック結果を示している。このため、メインマイコン118は3種類の遅延段数についての受信結果が上記の4パターンに該当する場合、前後の段数のうちの受信成功の結果を示した遅延段数を新たな遅延段数に設定する。具体的にはメインマイコン118は、3種類の遅延段数についての受信結果がパターン2及び3のいずれかである場合、S709で遅延チェック処理の開始時に設定されていた遅延段数より1段階高い段数を遅延素子203に設定して処理をS506に移す。またメインマイコン118は、受信結果がパターン4及び5のいずれかである場合、S710で遅延チェック処理の開始時に設定されていた遅延段数より1段階低い段数を遅延素子203に設定して処理をS506に移す。   On the other hand, patterns 2 and 3 or patterns 4 and 5 are states in which a test data reception error has occurred in any of the number of stages before and after the number of delay stages set at the start of the delay check process. In other words, even if the test data can be received correctly for the number of delay stages set at the start, the delay amount may become ineffective due to an external factor such as a temperature change during data writing. ing. For this reason, when the reception results for the three types of delay stages correspond to the above four patterns, the main microcomputer 118 sets the number of delay stages indicating the result of successful reception among the preceding and following stages to a new delay stage number. Specifically, when the reception result for the three types of delay stages is one of patterns 2 and 3, the main microcomputer 118 sets a stage number that is one step higher than the delay stage number set at the start of the delay check process in S709. The delay element 203 is set, and the process proceeds to S506. When the reception result is any one of patterns 4 and 5, the main microcomputer 118 sets the number of stages one step lower than the number of delay stages set at the start of the delay check process in S710 to the delay element 203, and performs the process in S506. Move to.

またさらに、パターン6乃至8は、3種類の遅延段数についてのテストデータの受信結果が信頼性が低い状態を示している。具体的にはパターン6では、遅延チェック処理の開始時に設定されていた遅延段数について受信エラーが生じているにも関わらず、前後1段階の段数については受信エラーが生じていない。またパターン7では、開始時に設定されていた遅延段数についてテストデータが正しく受信できているにも関わらず、前後1段階の段数について受信エラーが生じている。そしてパターン8では、3種類の遅延段数全てについて受信エラーが生じている。このような信頼性の低い結果が得られた場合、好適な遅延段数を簡易的に推定することができないため、メインマイコン118はS505でチューニング処理を再度実行し、最適な遅延段数の設定を行った後、処理をS506に移す。   Furthermore, patterns 6 to 8 indicate a state in which the reception results of the test data for the three types of delay stages are low in reliability. Specifically, in pattern 6, although a reception error has occurred with respect to the number of delay stages set at the start of the delay check process, no reception error has occurred with respect to the number of stages in the preceding and following stages. In pattern 7, although the test data can be correctly received for the number of delay stages set at the start, a reception error has occurred for the number of stages of one stage before and after. In pattern 8, reception errors occur for all three types of delay stages. If such a low-reliability result is obtained, the suitable number of delay stages cannot be easily estimated. Therefore, the main microcomputer 118 executes the tuning process again in S505 and sets the optimum number of delay stages. After that, the process proceeds to S506.

このようにすることで、テストデータを用いた遅延量の有効性チェックの処理に要する処理時間は増加するものの、全段階についての詳細な有効性チェックを行うチューニング処理の実行頻度を低減することができる。また所定の遅延量について有効性のサンプリングを行うため、その傾向から簡易的に好適な遅延量の推定を行うことができる。   In this way, although the processing time required for the delay amount validity check process using the test data increases, the frequency of executing the tuning process for performing the detailed validity check for all stages can be reduced. it can. In addition, since the effectiveness sampling is performed for a predetermined delay amount, a suitable delay amount can be simply estimated from the tendency.

[その他の実施形態]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Embodiments]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.

Claims (8)

記録媒体に対してクロック信号を出力する出力手段と、
前記記録媒体に命令を送信すると共に、前記クロック信号を遅延させることにより得られたタイミング信号に応じて、前記記録媒体から送信されたデータを取得する通信手段と、
前記記録媒体に対するアクセス要求に応じて、所定のデータ列を有する所定のデータの出力命令を前記記録媒体に出力するように前記通信手段を制御し、前記所定のデータの出力命令に応じて前記記録媒体から送信されて前記通信手段により取得されたデータが前記所定のデータ列を有していることを確認する処理を行う制御手段とを有し、
前記制御手段は、前記取得されたデータが前記所定のデータ列を有している場合、前記タイミング信号の位相の調整処理を実行することなく、前記アクセス要求に応じた命令を前記記録媒体に送信するように前記通信手段を制御し、前記取得されたデータが前記所定のデータ列を有していない場合、前記タイミング信号の位相の調整処理を実行し、前記タイミング信号の位相の調整処理を実行した後に、前記アクセス要求に応じた命令を前記記録媒体に送信するように前記通信手段を制御することを特徴とする記録再生装置。
An output means for outputting a clock signal to the recording medium;
A communication means for transmitting data to the recording medium and acquiring data transmitted from the recording medium according to a timing signal obtained by delaying the clock signal;
In response to an access request to the recording medium, the communication means is controlled to output a predetermined data output command having a predetermined data string to the recording medium, and the recording is performed in accordance with the predetermined data output command. have a control means for performing a process of confirming that the acquired data has a predetermined data sequence by said communication means is transmitted from the medium,
When the acquired data has the predetermined data string, the control means transmits a command corresponding to the access request to the recording medium without executing a phase adjustment process of the timing signal. The communication means is controlled so that when the acquired data does not have the predetermined data string, the timing signal phase adjustment processing is executed, and the timing signal phase adjustment processing is executed. After that, the recording / reproducing apparatus controls the communication means to transmit a command corresponding to the access request to the recording medium .
前記制御手段は、前記記録媒体に対するアクセス要求を受けたときに所定の条件に該当する場合に、前記所定のデータの出力命令を前記記録媒体に出力するように前記通信手段を制御し、前記確認する処理を行うことを特徴とする請求項1に記載の記録再生装置。   The control means controls the communication means to output an output command of the predetermined data to the recording medium when a predetermined condition is met when an access request to the recording medium is received, and the confirmation The recording / reproducing apparatus according to claim 1, wherein the processing is performed. 前記制御手段は、前記アクセス要求に応じて、前記通信手段が前記アクセス要求に応じた命令を前記記録媒体に送信する前に、前記所定のデータの出力命令を前記記録媒体に送信するように前記通信手段を制御し、前記確認する処理を行うことを特徴とする請求項1に記載の記録再生装置。   In response to the access request, the control unit transmits the predetermined data output command to the recording medium before the communication unit transmits the command corresponding to the access request to the recording medium. The recording / reproducing apparatus according to claim 1, wherein a communication unit is controlled to perform the confirmation process. 前記制御手段は、前記調整処理において、前記所定のデータの出力命令を複数回出力し、前記複数回の出力命令それぞれに対して前記記録媒体から送信されるデータを、異なる遅延量により前記クロック信号を遅延させることで得られた前記タイミング信号に応じて取得するように前記通信手段を制御し、前記異なる遅延量により遅延されたタイミング信号に応じて取得されたデータに基づいて前記タイミング信号の遅延量を設定することを特徴とする請求項に記載の記録再生装置。 In the adjustment process, the control means outputs the output command of the predetermined data a plurality of times, and transmits the data transmitted from the recording medium to each of the output commands of the plurality of times with the different delay amounts. And delaying the timing signal based on data acquired in accordance with the timing signal delayed by the different delay amount, controlling the communication means to acquire in accordance with the timing signal obtained by delaying The recording / reproducing apparatus according to claim 1 , wherein an amount is set. 前記制御手段は、前記記録媒体に対するアクセス要求に応じて、前記所定のデータの出力命令を複数回出力し、前記複数回の出力命令それぞれに対して前記記録媒体から送信されるデータを、現在の遅延量のタイミング信号、及び、現在の遅延量に対し前後にそれぞれ遅延量を異ならせたタイミング信号に応じて取得するように前記通信手段を制御し、前記取得されたデータがそれぞれ前記所定のデータ列を有していることを確認することを特徴とする請求項1に記載の記録再生装置。   The control means outputs the predetermined data output command a plurality of times in response to an access request to the recording medium, and the data transmitted from the recording medium for each of the plurality of output commands The communication means is controlled to acquire in accordance with a timing signal of delay amount and a timing signal in which the delay amount is changed before and after the current delay amount, and the acquired data is respectively the predetermined data 2. The recording / reproducing apparatus according to claim 1, wherein the recording / reproducing apparatus is confirmed to have a column. 前記制御手段は、前記現在の遅延量のタイミング信号、及び、前記遅延量を異ならせたタイミング信号に応じて取得されたデータの前記確認する処理の結果に応じて、前記タイミング信号の遅延量を設定することを特徴とする請求項に記載の記録再生装置。 The control means determines the delay amount of the timing signal according to the timing signal of the current delay amount and the result of the confirmation process of the data acquired according to the timing signal with the delay amount varied. 6. The recording / reproducing apparatus according to claim 5 , wherein the recording / reproducing apparatus is set. 前記アクセス要求は、前記記録媒体に対するデータの書き込み要求または、前記記録媒体からのデータの読み出し要求を含むことを特徴とする請求項1からの何れか1項に記載の記録再生装置。 The access request, the data write request to the recording medium or the recording and reproducing apparatus according to any one of claims 1 to 6, characterized in that it comprises a data read request from the recording medium. 記録媒体に対してクロック信号を出力する出力工程と、
前記記録媒体に命令を送信すると共に、前記クロック信号を遅延させることにより得られたタイミング信号に応じて、前記記録媒体から送信されたデータを取得する通信工程と、
前記記録媒体に対するアクセス要求に応じて、所定のデータ列を有する所定のデータの出力命令を前記記録媒体に出力するように前記通信工程の動作を制御し、前記所定のデータの出力命令に応じて前記記録媒体から送信されて前記通信工程において取得されたデータが前記所定のデータ列を有していることを確認する処理を行う制御工程とを有し、
前記制御工程において、前記取得されたデータが前記所定のデータ列を有している場合、前記タイミング信号の位相の調整処理を実行することなく、前記アクセス要求に応じた命令を前記記録媒体に送信するように前記通信工程の動作が制御され、前記取得されたデータが前記所定のデータ列を有していない場合、前記タイミング信号の位相の調整処理を実行し、前記タイミング信号の位相の調整処理を実行した後に、前記アクセス要求に応じた命令を前記記録媒体に送信するように前記通信工程の動作が制御されることを特徴とする記録再生装置の制御方法。
An output step of outputting a clock signal to the recording medium;
A communication step of transmitting data to the recording medium and acquiring data transmitted from the recording medium in accordance with a timing signal obtained by delaying the clock signal;
In response to an access request to the recording medium, the operation of the communication process is controlled to output a predetermined data output command having a predetermined data string to the recording medium, and according to the predetermined data output command have a control step of performing processing to verify that the data acquired in the communication process is transmitted from the recording medium has a predetermined data sequence,
In the control step, when the acquired data has the predetermined data string, an instruction corresponding to the access request is transmitted to the recording medium without executing a phase adjustment process of the timing signal. If the operation of the communication process is controlled and the acquired data does not have the predetermined data string, the timing signal phase adjustment process is executed, and the timing signal phase adjustment process is performed. the method of the after run, the operation of the communication process is controlled command corresponding to the access request to be sent to said recording medium recording and reproducing apparatus according to claim Rukoto.
JP2013122025A 2013-06-10 2013-06-10 Recording / reproducing apparatus and control method Active JP6151976B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013122025A JP6151976B2 (en) 2013-06-10 2013-06-10 Recording / reproducing apparatus and control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013122025A JP6151976B2 (en) 2013-06-10 2013-06-10 Recording / reproducing apparatus and control method

Publications (3)

Publication Number Publication Date
JP2014238776A JP2014238776A (en) 2014-12-18
JP2014238776A5 JP2014238776A5 (en) 2016-07-28
JP6151976B2 true JP6151976B2 (en) 2017-06-21

Family

ID=52135869

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013122025A Active JP6151976B2 (en) 2013-06-10 2013-06-10 Recording / reproducing apparatus and control method

Country Status (1)

Country Link
JP (1) JP6151976B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6894736B2 (en) * 2017-03-24 2021-06-30 キヤノン株式会社 Recording device, control method, and program
JP2024033024A (en) * 2021-01-19 2024-03-13 パナソニックIpマネジメント株式会社 Host device, slave device and data transfer system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007164697A (en) * 2005-12-16 2007-06-28 Shinko Electric Ind Co Ltd Semiconductor integrated circuit and memory system, and clock signal setting method
JP5119828B2 (en) * 2007-09-25 2013-01-16 株式会社デンソー Timing adjustment device
JP2011233042A (en) * 2010-04-28 2011-11-17 Toshiba Corp Calibration control apparatus and calibration control method
JP2011258134A (en) * 2010-06-11 2011-12-22 Renesas Electronics Corp Interface circuit
US8972818B2 (en) * 2012-10-05 2015-03-03 Qualcomm Incorporated Algorithm for optimal usage of external memory tuning sequence

Also Published As

Publication number Publication date
JP2014238776A (en) 2014-12-18

Similar Documents

Publication Publication Date Title
US10152368B2 (en) Recording apparatus and control method for recording apparatus
CN108632552B (en) Recording apparatus, control method, and storage medium
US10545680B2 (en) Recording/reproduction apparatus, control method of recording/reproduction apparatus, and non-transitory computer-readable storage medium
JP6151976B2 (en) Recording / reproducing apparatus and control method
JP2007207229A (en) Memory card, data driving method of memory card, and memory card system
JP6356972B2 (en) RECORDING DEVICE, IMAGING DEVICE, AND RECORDING DEVICE CONTROL METHOD
JP6417094B2 (en) RECORDING / REPRODUCING DEVICE, RECORDING / REPRODUCING DEVICE CONTROL METHOD, AND COMPUTER PROGRAM
US10439619B2 (en) Recording apparatus, control method, and storage medium
JP2015126417A (en) Recording apparatus and control method of the same
JP6857066B2 (en) Recording / playback device, control method of recording / playback device, and program
JP2016046781A (en) Recording and reproducing device, control method for recording and reproducing device, and program
JP2015118568A (en) Recording reproducing device, method for controlling recording reproducing device, and computer program
US8423743B2 (en) Method to divide a file or merge files using file allocation table (FAT)
US20220337808A1 (en) Information processing apparatus for calibration processing of communication with detachable device and method of controlling the same
JP2020091696A (en) Recording and reproducing apparatus
JP2018147260A (en) Recording and reproducing device, control method of recording and reproducing device, and program
JP2015210540A (en) Recording device, imaging apparatus, control method of recording device, and program
JP2015219775A (en) Recording device, imaging apparatus, control method of recording device, and program
JP2013030847A (en) Data recording device and its control method
JP2021044746A (en) Recording apparatus, control method, and program
JP2004165972A (en) Video and audio signal recorder
JP2006157073A (en) Video/audio signal recorder
JP2006157074A (en) Video/audio signal recorder

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20160610

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160610

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170223

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170303

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170406

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170526

R151 Written notification of patent or utility model registration

Ref document number: 6151976

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151