12.07.2015 Views

SuperH (SH) 64-Bit RISC Series SH-5 System Architecture, Volume ...

SuperH (SH) 64-Bit RISC Series SH-5 System Architecture, Volume ...

SuperH (SH) 64-Bit RISC Series SH-5 System Architecture, Volume ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PRELIMINARY DATA66 Operation4.3.2 Configuring a DMA channelA DMA channel is configured as follows:1 Disable the channel (i) by ensuring that DMAC.CTRL[i].TRANSFER_ENABLE=0 andensure that any error flags relating to the channel in DMAC.COMMON are clear.2 Program the channel parameters by writing DMAC.SAR[i], DMAC.DAR[i],DMAC.COUNT[i] and DMAC.CTRL[i] registers.3 Enable the channel by writing DMAC.CTRL[i].TRANSFER_ENABLE=1.Provided the DMAC module is enabled (DMAC.COMMON.MASTER_ENABLE=1) thechannel will be ready to start transferring data subject toDMAC.CTRL[i].RESOURCE_SELECT.The only permitted write to the SAR, DAR, COUNT, or CTRL registers of an enabledchannel is to disable that channel. Attempting to reconfigure the parameters of anenabled channel is undefined.4.3.3 Errors and suspended channelsOnce a channel has been configured and enabled it may• complete normally as described above in Section 4.3.1,• complete abnormally which means that an error has arisen which causes datatransfer to stop before normal completion,• be suspended partway through the configured number of transfers.DMAC errorsAn error on a channel may occur any time after the channel has been enabled andbefore it completes normally. This results in abnormal completion.The DMAC can detect two types of errors:D R A FT• misalignment of the SAR or DAR addresses with respect to the transfer sizechosen,• a transfer load or store request has produced an error response for example,when access is attempted to an undefined or reserved address or does notsupport the chosen transfer size.In the case of a misalignment DMAC sets:DMAC.STATUS[N].ADDRESS_ALIGN_ERROR = 1 of the corresponding channelDMAC.COMMON.ADDRESS_ALIGNMENT_ERROR field bit for this channel.<strong>SuperH</strong>, Inc.<strong>SH</strong>-5 <strong>System</strong> <strong>Architecture</strong>, <strong>Volume</strong> 1: <strong>System</strong> 05-SA-10001 v1.0

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!