JP2001282467A - Method for reading/writing data from/in sd card certification area and data communication device - Google Patents

Method for reading/writing data from/in sd card certification area and data communication device

Info

Publication number
JP2001282467A
JP2001282467A JP2000093183A JP2000093183A JP2001282467A JP 2001282467 A JP2001282467 A JP 2001282467A JP 2000093183 A JP2000093183 A JP 2000093183A JP 2000093183 A JP2000093183 A JP 2000093183A JP 2001282467 A JP2001282467 A JP 2001282467A
Authority
JP
Japan
Prior art keywords
data
communication
command
length
reading
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000093183A
Other languages
Japanese (ja)
Inventor
Ryuzo Sugihara
竜三 杉原
Hiroshi Sakurai
博 櫻井
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2000093183A priority Critical patent/JP2001282467A/en
Publication of JP2001282467A publication Critical patent/JP2001282467A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To solve a problem that processing is complicated because communication data between a PC and a communication LSI is processed in a variable length state in the case of reading/writing data from/in an SD card certification area. SOLUTION: All the lengths of communication command data, reading data and other data among a PC driver, the communication LSI and a microcomputer are fixed length. At the time, padding data independent of the command data are added to set up the length of the command data to the same fixed length as the transfer length of read data and other data. A regulated communication method that sending and receiving commands are surely communicated as a pair of commands is adopted. In order to inform of a state whether normal reading operation or the like is executed or not from the PC side to the SD card side or from the SD card side to the PC side, prescribed check data are padded in the free area of the padding data and returned to the opposite side.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はSDカードの認証領
域へリード及びライト動作を行う際に、PCからの規則
的なコマンドを通信用LSIとマイコンで制御を行うこ
とにより、処理も解りやすくより正確なデータのリード
及びライトなどの処理を行う手法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention controls a regular command from a PC by a communication LSI and a microcomputer when performing read and write operations to an authentication area of an SD card. The present invention relates to a technique for performing processing such as accurate reading and writing of data.

【0002】[0002]

【従来の技術】PCのドライバと固体メモリのリード及
びライトの通信手順では、リードやライトのデータの他
にコマンドやデータ長などの数バイトのデータが必要と
なる。従来は通信用LSIの転送バイト数をその都度変
更し、データのやり取りを行っていた。また、柔軟性を
持たせる意味でその数バイトの設定を通信毎に設定を行
っていたが、データ長やデータの入っている場所などが
毎回異なり、処理も複雑となり注意する必要があった。
2. Description of the Related Art In a communication procedure for reading and writing between a driver of a PC and a solid-state memory, several bytes of data such as a command and a data length are required in addition to read and write data. Conventionally, the number of transfer bytes of the communication LSI is changed each time to exchange data. In order to provide flexibility, the setting of several bytes is set for each communication. However, the data length and the location where the data is stored are different each time, and the processing is complicated, so it is necessary to pay attention.

【0003】[0003]

【発明が解決しようとする課題】従来、PCから固体メ
モリへのデータリードやライトにおいてはデータ転送デ
ータを常に意識する必要があった。しかしながら、その
動作処理には、種々のデータ長やコマンドがあり毎回異
なるため、マイコンソフトウェア処理も複雑になる。こ
のためにシステムの不具合動作の原因になることがあ
る。
Conventionally, in data reading and writing from a PC to a solid-state memory, it has always been necessary to be aware of data transfer data. However, the operation processing has various data lengths and commands and differs each time, so that the microcomputer software processing becomes complicated. This may cause malfunctioning of the system.

【0004】[0004]

【課題を解決するための手段】PCドライバと通信用L
SI及びマイコン間の通信コマンドやリードやライトの
データの長さなど全て固定長とする。その時、コマンド
データには無関係のPADDINGデータを付加し、必
ずリードやライトのデータ転送長と同じ固定長にする。
かつ、SendコマンドとReceiveコマンドを必
ずペアで通信を行うなどの規則的に決まった通信方式を
とることにより、正確にかつデータ長を意識せずに同じ
ソフトウェア処理で可能にした。
[Means for Solving the Problems] PC driver and communication L
The communication command between the SI and the microcomputer, and the length of read / write data are all fixed lengths. At this time, unrelated PADDING data is added to the command data so that the command data always has the same fixed length as the read or write data transfer length.
In addition, by adopting a regularly determined communication method such as always transmitting a Send command and a Receive command in pairs, it is possible to perform the same software processing accurately and without regard to the data length.

【0005】更に、PC側からSDカード側、またその
逆側へ正常なリードやライトなどの動作処理を行ったか
の状態を通信の相手側に知らせるため、同じデータ長と
した時のPADDINGの空き領域をあらかじめ決めら
れたチェックデータで埋めて通信チェックデータ相手側
に戻すことで正確な送受信を可能にした。
Further, in order to inform the other party of the communication whether the PC or SD card and the opposite side have performed normal read and write operations, the free area of the PADDING when the data length is the same. Is filled with predetermined check data and returned to the communication check data partner, enabling accurate transmission and reception.

【0006】[0006]

【発明の実施の形態】図2に、PCドライバと通信用L
SI及びマイコン間のコマンドやデータの長さなどを全
て固定長にして通信を行うフォーマット例を示す。CM
Dはコマンド、STATはコマンドに対するステータス
である。また、コマンド長をnバイト、固定長をmバイ
トとすると、付加するPADDING長はm−nバイト
となる。ここでm>nとする。
FIG. 2 shows a PC driver and a communication L.
An example of a format in which the length of commands and data between the SI and the microcomputer is all fixed and communication is performed. CM
D is a command, and STAT is a status for the command. If the command length is n bytes and the fixed length is m bytes, the added PADDING length is mn bytes. Here, it is assumed that m> n.

【0007】また、コマンド長が可変の場合はコマンド
長をlバイト、固定長をmバイトとした場合、埋め込む
PADDINGのバイト数はm−lと表わす事ができ、
必ずmバイトの固定長の送受信が実現できる。
When the command length is variable, the command length is 1 byte, and when the fixed length is m bytes, the number of bytes of PADDING to be embedded can be expressed as ml.
Transmission and reception with a fixed length of m bytes can always be realized.

【0008】PCドライバからのSendコマンドとR
eceiveコマンドに続くデータフォーマットの通信
パターンについて詳細に説明を行う。
[0008] Send command from PC driver and R
The communication pattern of the data format following the receive command will be described in detail.

【0009】図2(a)に転送データが無い場合のフォ
ーマットを示す。これはPCとリーダライタが正常な送
受信が可能かどうかの確認用などに使用できる。
FIG. 2A shows a format when there is no transfer data. This can be used for checking whether the PC and the reader / writer can normally transmit and receive.

【0010】図2(b)に転送データが固定長(mバイ
ト)より小さいリード系コマンドの場合のフォーマット
を示す。PCからのSendコマンドにおいて、転送デ
ータが固定長より小さい場合はPADDINGデータで
隙間を埋めて固定長にする。この時PADDINGデー
タにはコマンドに無関係な値を入れておけば良い。次に
Receiveコマンドにより、SDカードへのコマン
ドに対するステータスとリードデータを戻す。この時の
PADDINGデータも特にどのような値でも良い。
FIG. 2B shows a format in the case of a read command in which the transfer data is smaller than a fixed length (m bytes). If the transfer data is smaller than the fixed length in the Send command from the PC, the gap is filled with the PADDING data to make the length fixed. At this time, a value irrelevant to the command may be entered in the PADDING data. Next, the status and read data for the command to the SD card are returned by the Receive command. The PADDING data at this time may have any value.

【0011】同様に、図2(c)に転送データが固定長
(mバイト)より小さいライト系コマンドの場合のフォ
ーマットを示す。これはコマンドとライトデータ長を合
わせても通信の固定長以下となる場合、この通信フォー
マットを用いる。
Similarly, FIG. 2C shows a format in the case where the transfer data is a write command smaller than a fixed length (m bytes). If the command and the write data length are equal to or less than the fixed length of the communication even when the command and the write data length are combined, this communication format is used.

【0012】図2(d)に転送データが固定長(mバイ
ト)を超えるリード系コマンドの場合のフォーマットを
示す。図2(b)との違いはリードデータが固定長を超
えるバイト数となっていることである。この時の送受信
処理は固定長の連続な通信処理となる。
FIG. 2D shows a format in the case of a read command in which transfer data exceeds a fixed length (m bytes). The difference from FIG. 2B is that the read data has a number of bytes exceeding the fixed length. The transmission / reception processing at this time is a fixed-length continuous communication processing.

【0013】同様に、図2(e)に転送データが固定長
(mバイト)を超えるライト系コマンドの場合のフォー
マットを示す。リードの場合と同様にライトデータが固
定長を超えるバイト数の場合の処理はこの様になる。
Similarly, FIG. 2E shows a format in the case of a write command in which transfer data exceeds a fixed length (m bytes). As in the case of the read, the processing when the write data has the number of bytes exceeding the fixed length is as described above.

【0014】これらの様に固定長で規則的に決まった形
の通信を行うことにより、PCとSDカード間のデータ
の送受信がなされることになる。
By performing communication in a fixed length and in a regularly determined form as described above, data is transmitted and received between the PC and the SD card.

【0015】この手法だけで送受信を行うことができる
が、更に、送受信の確実性をあげる為の方法として、図
3の例に示すように、PADDINGデータの領域へ、
PCと通信LSI間の状態を確認する情報を盛り込む。
Although transmission and reception can be performed only by this method, as a method for further increasing the reliability of transmission and reception, as shown in the example of FIG.
Information for confirming the state between the PC and the communication LSI is included.

【0016】図3(a)に示すように、PCからデータ
を送信する際に決められた通信チェックデータをPAD
DING領域へ盛り込んでおく。
As shown in FIG. 3A, communication check data determined when data is transmitted from the PC is transmitted to the PAD.
It is included in the DING area.

【0017】これを受信側で確認し、通信状態が正常な
らば、そのデータや状態が正常であることを示す通信チ
ェックデータに書き換えてPC側へ戻す(図3
(b))。
This is confirmed on the receiving side, and if the communication state is normal, the data and communication check data indicating that the state is normal are rewritten and returned to the PC side (FIG. 3).
(B)).

【0018】また、通信状態が異常ならば、そのデータ
や状態が異常であることを示す通信チェックデータに書
き換えてPC側へ戻す。図3(c)の例では同じデータ
を戻している。
If the communication state is abnormal, the data and the communication check data indicating that the state is abnormal are rewritten and returned to the PC. In the example of FIG. 3C, the same data is returned.

【0019】この通信チェックデータを上述した固定長
フォーマットの通信と同時に実施することで、さらによ
り確実な通信を行うことが可能となる。
By executing the communication check data at the same time as the communication of the fixed-length format described above, it is possible to perform more reliable communication.

【0020】[0020]

【発明の効果】この方法により、PCドライバと通信用
LSI及びマイコン間のコマンドやデータの長さなどを
全て固定長にし、決まった通信方式をとることで、ソフ
トウェアの処理が解りやすくより正確な通信を行うこと
が出来、かつデータ長を意識しない同じ構成での送受信
処理の実現が可能となる。
According to this method, the lengths of commands and data between the PC driver and the communication LSI and the microcomputer are all fixed lengths, and a fixed communication method is employed, so that the software processing is easy to understand and more accurate. Communication can be performed, and transmission / reception processing can be realized with the same configuration irrespective of the data length.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の概略構成図FIG. 1 is a schematic configuration diagram of the present invention.

【図2】本発明のデータ構成例を示す図FIG. 2 is a diagram showing a data configuration example of the present invention.

【図3】本発明の送受信チェックデータ通信部の例を示
す図
FIG. 3 is a diagram showing an example of a transmission / reception check data communication unit according to the present invention.

【符号の説明】[Explanation of symbols]

1 PC(パソコン) 2 リーダライタ 3 SDカード 1 PC (personal computer) 2 Reader / writer 3 SD card

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 SDカードの認証領域へパソコンからの
通信コマンドにより、データのリード及びライトを行う
方法。
1. A method for reading and writing data to an authentication area of an SD card by a communication command from a personal computer.
【請求項2】 PC(パソコン)と通信用LSI間の通
信コマンドデータにコマンドに無関係のPADDING
データを埋め込み、リードやライトのデータ転送長と同
じ固定長にし、かつ、そのコマンドを規則的な送受信フ
ォーマットにすることにより通信を行う方法。
2. A communication command data between a PC (personal computer) and a communication LSI which has no relation to a command.
A method of performing communication by embedding data, making the length equal to the data transfer length of read or write, and making the command into a regular transmission / reception format.
【請求項3】 PC(パソコン)と通信用LSI間の通
信コマンドデータに付加した無関係のPADDINGデ
ータを利用し、リードやライトのデータ転送に伴う処理
が正常もしくは異常であるかなどの状態をPCに戻すこ
とにより、PCとの送受信を行う方法。
3. Using the irrelevant PADDING data added to the communication command data between the PC (personal computer) and the communication LSI, the PC determines whether the processing accompanying the data transfer of read or write is normal or abnormal. A method of transmitting and receiving to and from a PC by returning to
【請求項4】 PC(パソコン)と通信用LSI間の通
信コマンドデータにコマンドに無関係のPADDING
データを付加する場合において、コマンド長が可変長の
場合でも固定長からコマンド長を差し引いた長さ分のP
ADDINGデータを付加し、必ず固定長の送受信を行
う方法。
4. A communication command data between a PC (personal computer) and a communication LSI which is not related to the command.
In the case of adding data, even if the command length is variable, P for the length obtained by subtracting the command length from the fixed length
A method in which ADDING data is added and fixed-length transmission / reception is always performed.
【請求項5】 通信用LSIとマイコンの制御回路から
成るリーダライタであり、PCとSDカード間の通信を
制御するデータ通信装置。
5. A data communication device which is a reader / writer comprising a communication LSI and a control circuit of a microcomputer, and controls communication between a PC and an SD card.
JP2000093183A 2000-03-30 2000-03-30 Method for reading/writing data from/in sd card certification area and data communication device Pending JP2001282467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000093183A JP2001282467A (en) 2000-03-30 2000-03-30 Method for reading/writing data from/in sd card certification area and data communication device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000093183A JP2001282467A (en) 2000-03-30 2000-03-30 Method for reading/writing data from/in sd card certification area and data communication device

Publications (1)

Publication Number Publication Date
JP2001282467A true JP2001282467A (en) 2001-10-12

Family

ID=18608402

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000093183A Pending JP2001282467A (en) 2000-03-30 2000-03-30 Method for reading/writing data from/in sd card certification area and data communication device

Country Status (1)

Country Link
JP (1) JP2001282467A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008147871A (en) * 2006-12-07 2008-06-26 Sony Corp Communication system and repeater
JP2010534884A (en) * 2007-07-25 2010-11-11 シリコン イメージ,インコーポレイテッド Data stream control for network devices
JP2012150611A (en) * 2011-01-18 2012-08-09 Ricoh Co Ltd Data processing device and data processing method
JP2014010708A (en) * 2012-06-29 2014-01-20 Toshiba Corp Memory system
JP2014016733A (en) * 2012-07-06 2014-01-30 Toshiba Corp Memory system
JP2014016734A (en) * 2012-07-06 2014-01-30 Toshiba Corp Memory system
JP2016128135A (en) * 2016-04-15 2016-07-14 株式会社ソフイア Game machine

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008147871A (en) * 2006-12-07 2008-06-26 Sony Corp Communication system and repeater
JP2010534884A (en) * 2007-07-25 2010-11-11 シリコン イメージ,インコーポレイテッド Data stream control for network devices
JP2012150611A (en) * 2011-01-18 2012-08-09 Ricoh Co Ltd Data processing device and data processing method
JP2014010708A (en) * 2012-06-29 2014-01-20 Toshiba Corp Memory system
JP2014016733A (en) * 2012-07-06 2014-01-30 Toshiba Corp Memory system
JP2014016734A (en) * 2012-07-06 2014-01-30 Toshiba Corp Memory system
JP2016128135A (en) * 2016-04-15 2016-07-14 株式会社ソフイア Game machine

Similar Documents

Publication Publication Date Title
US7042903B2 (en) Conveying protocol units for portable electronic objects via a protocol for microcomputer peripherals
JP3028815B2 (en) Transmission method of portable electronic device and portable electronic device
CN104322033A (en) Controlling a physical link of a first protocol using an extended capability structure of a second protocol
JP2004280818A (en) System and method for simulating universal serial bus smart card device connected to usb host
EP1845475A1 (en) Communication medium, communication medium processing apparatus, and communication medium processing system
CN100437456C (en) Electronic device, control method thereof, host device, and control method thereof
CN108170369A (en) Host device and data transmission rate control method
CN108170370A (en) Data storage device and data transmission rate control method
KR101001074B1 (en) Method for transmittng data on a bus
EP1615164B1 (en) IC card with self-diagnostic function
JP2001282467A (en) Method for reading/writing data from/in sd card certification area and data communication device
US20080140972A1 (en) Memory card system with password confirmation and transmission
JP4283611B2 (en) IC card remote control system
US8135895B2 (en) Virtual SATA port multiplier, virtual SATA device, SATA system and data transfer method in a SATA system
US6058440A (en) Programmable and adaptive resource allocation device and resource use recorder
JP3655597B2 (en) Electronic device, electronic card, and card identification method
KR100562505B1 (en) Integrated circuit card capable of automatically transmitting null byte information without intervention by cpu
JP3914398B2 (en) IC card reader / writer communication method
JPH0548017B2 (en)
JPH03271885A (en) Ic card system
CN115982090B (en) Method and device for realizing remote memory access by cooperation of software and hardware
EP4242897A1 (en) Interconnect bus safety
JP2008017175A (en) Data processing device
EP1481296B1 (en) Household appliance with communication unit for external control
JP2639248B2 (en) Communication interface device