register name | R/W | explanation | access function |
---|---|---|---|
DATATRNS | R/W | data transfer register | CDC_GetDataPtr |
HIRQREQ | R/W | Interrupt factor register | CDC_GetHirqReq |
HIRQMSK | R/W | interrupt mask register | CDC_GetHirqMsk |
MPEG GGB | R | MPEG register (RGB data) | CDC_GetMpegPtr |
register name | R/W | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
DATATRNS | R/W | ||||||||
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
register name | R/W | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
HIRQREQ | R/W | − | − | MPST | MPCM | MPED | SCDQ | EFLS | ECPY |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
EHST | ESEL | DCHG | PEND | BFUL | CSCT | DRDY | CMOK |
bit | Name | explanation | initial value |
---|---|---|---|
bit0 | CMOK | 1: Command can be issued (response set completed) | 1 |
bit1 | DRDY | 1: Data transfer ready | 0 |
bit2 | CSCT | 1: 1 sector read completed | 0 |
bit3 | BFUL | 1: CD buffer full (CD buffer is full) | 0 |
bit4 | PEND | 1: End of CD playback (current FAD is out of playback range) | 0 |
bit5 | DCHG | 1: Disk replacement occurred (tray opened) | 0※ |
bit6 | ESEL | 1: Soft reset, end of selector setting process | 1 |
bit7 | EHST | 1: End of host input/output processing | 1 |
bit8 | ECPY | 1: End of copy/move processing between buffer sections | 1 |
bit9 | EFLS | 1: End of CD block file system processing | 1 |
bit10 | SCDQ | 1: Subcode Q update completed (CD drive communication timing) | 0 |
bit11 | MPED | 1: End of MPEG related processing | 1 |
bit12 | MPCM | 1: End of MPEG operation undefined section | 0 |
bit13 | MPST | 1: MPEG interrupt status notification (MPEG-related interrupt occurrence) | 0 |
bit14 | − | reserved bit | 0 |
bit15 | − | reserved bit | 0 |
The IRQ output to the host is the OR output of all factors.
When processing interrupts, clear the corresponding factor bit.
The ESEL, EHST, ECPY, EFLS, and MPED bits are collectively called the command end flag.
Notifies the end of execution of commands belonging to each flag.
The initial values of the bits are 1 for CMOK and command end flag, and 0 for others.
(Initial value bit pattern: 0BC1H)
In reality, bits other than 1 are undefined, so the CDC function clears them to 0.
register name | R/W | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
HIRQMSK | R/W | − | − | MPST | MPCM | MPED | SCDQ | EFLS | ECPY |
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
EHST | ESEL | DCHG | PEND | BFUL | CSCT | DRDY | CMOK |
When interrupts are masked, the following occurs when an interrupt signal is input.
・ Not reflected in IRQ output.
・ It is reflected in the interrupt factor register. (Polling processing possible)
The initial value of all bits is 0. (It will not be initialized by soft reset)
register name | R/W | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 |
MPEG GGB | R | ||||||||
7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | ||
The maximum number of commands that can be issued in any 16.7ms is 60 times.
For subcode retrieval, the command can be issued up to 34 times in any 13.3ms.
(16 subcodes R to W + 1 subcode Q acquired: total 17 x 2 = 34 times)
Commands belonging to the same command end flag are issued after waiting for processing to complete.
flag | command |
---|---|
ESEL | - Setting the CD device connection destination (CDC_CdSetCon) |
EHST | - Retrieving sector data (CDC_GetSctData) |
ECPY | ・Copy sector data (CDC_CopySctData) |
EFLS | ・Move directory (CDC_ChgDir) |
The EFLS flag will also be 1 if you run the following command:
・ Open tray (CDC_CdOpen)
・ Abort file access (CDC_AbortFile)
If it is 1, clear the command end flag to 0 and issue the command.
flag | command | |
---|---|---|
Only clear 0 (do not check) | ||
ESEL | ・Soft reset (specified by CDC_CdInit parameter) | |
EFLS | ・Abort file access (CDC_AbortFile) | |
Only check (do not clear to 0) | ||
ESEL | ・Getting the actual data size (CDC_GetActSiz) |
The value of the command termination flag held by CDC will be inconsistent if separately linked CDC program code is executed. Therefore, if the command end flag is not initialized, it may not be possible to issue commands. Please note the following points when using the CDC library: |
・REJECT | : The command itself is invalid, such as because the command format is incorrect. |
・WAIT (execution pending) | :The command cannot be accepted because it cannot be executed in the current state. |
・Data transfer request | : Indicates that data transfer is necessary. |
・Regular response | : Indicates whether it is a regular response or a response to a command. |
・CD drive status | : Indicates the logical state of the CD drive as seen from the host. |
Drive status and CD reports during WAIT are enabled, but other reports are disabled.
・Standard speed playback: 13.3ms Periodic response update cycle - During double speed playback: 6.7ms ・Other than during playback: 16.7ms
Execute Waiting for data transfer preparation (CDC_DataReady). (Wait for DRDY to become 1)
Data is input/output through the data transfer register.
To obtain the register pointer, execute the CDC_GetDataPtr function.
After transferring the necessary data, execute the end of data transfer (CDC_DataEnd).
Data transfer error | explanation |
---|---|
Data transfer timeout | The CD block does not become ready for data transfer within the specified time. |
Unable to secure sector for writing | A free sector could not be secured when writing sector data. |
When executing a command that involves data transfer, do not terminate the data transfer before the DRDY flag becomes 1. Even if no data is actually transferred, be sure to wait for the DRDY flag to become 1 before terminating. (Execute wait for data transfer preparation and then terminate) |