110
M3i.48xx / M3i.48xx-exp Manual
Reading out the timestamps
Timestamps
Reading out the timestamps
General
The timestamps are stored in an extra FIFO that is located in hardware on the card. This extra FIFO can read out timestamps using DMA
transfer similar to the DMA transfer of the main sample data DMA transfer. The card has two completely independent busmaster DMA engines
in hardware allowing the simultaneous transfer of both timestamp and sample data.
As seen in the picture the extra FIFO is holding ABA and timestamp data as the same time. Nevertheless it is not necessary to care for the
shared FIFO as the extra FIFO data is splitted inside the driver in the both data parts.
The only part that is similar for both kinds of data transfer is the handling of the DMA engine. This is similar to the main sample data transfer
engine. Therefore additional information can be found in the chapter explaining the main data transfer.
Commands and Status information for extra transfer buffers.
As explained above the data transfer is performed with the same command and status registers like the card control and sample data transfer.
It is possible to send commands for card control, data transfer and extra FIFO data transfer at the same time
The extra FIFO data transfer can generate one of the following status information:.
Data Transfer using DMA
Data transfer consists of two parts: the buffer definition and the commands/status information that controls the transfer itself. Extra data transfer
shares the command and status register with the card control, data transfer commands and status information.
The DMA based data transfer mode is activated as soon as the M2CMD_EXTRA_STARTDMA is given. Please see next chapter to see how
the polling mode works.
Register
Value
Direction
Description
SPC_M2CMD
100
write only
Executes a command for the card or data transfer
M2CMD_EXTRA_STARTDMA
100000h
Starts the DMA transfer for an already defined buffer.
M2CMD_EXTRA_WAITDMA
200000h
Waits until the data transfer has ended or until at least the amount of bytes defined by notify size are available. This
wait function also takes the timeout parameter into account.
M2CMD_EXTRA_STOPDMA
400000h
Stops a running DMA transfer. Data is invalid afterwards.
M2CMD_EXTRA_POLL
800000h
Polls data without using DMA. As DMA has some overhead and has been implemented for fast data transfer of large
amounts of data it is in some cases more simple to poll for available data. Please see the detailed examples for this
mode. It is not possible to mix DMA and polling mode.
Register
Value
Direction
Description
SPC_M2STATUS
110
read only
Reads out the current status information
M2STAT_EXTRA_BLOCKREADY
1000h
The next data block as defined in the notify size is available. It is at least the amount of data available but it also can
be more data.
M2STAT_EXTRA_END
2000h
The data transfer has completed. This status information will only occur if the notify size is set to zero.
M2STAT_EXTRA_OVERRUN
4000h
The data transfer had on overrun (acquisition) or underrun (replay) while doing FIFO transfer.
M2STAT_EXTRA_ERROR
8000h
An internal error occurred while doing data transfer.