Example Of Autotransmit Mode With Dma Support - Texas Instruments OMAP5912 Reference Manual

Multimedia processor device overview and architecture
Hide thumbs Also See for OMAP5912:
Table of Contents

Advertisement

3.6

Example of Autotransmit Mode With DMA Support

SPRU760B
The setup 5 register (SR5) controls the autotransmit mode and DMA mode.
The following example configures µWire for a 16-bit write access on CS1 with
serial clock out not inverted, CS autotoggle enabled, DMA request enabled,
and interrupt disabled:
1) Set up and enable the DMA channel.
2) Program the configuration registers SR1, SR3, and SR4.
3) Check CSRB status to ensure that the peripheral is ready to receive (low).
4) Program the control and status register (CSR) as follows:
NB_BITS_RD = 0
-
NB_BITS_WR = 16
-
INDEX = 00
-
CS_CMD: = 1
-
START = 0
-
5) Write to the setup register (SR5) to configure and initiate the transfer:
DMA_TX_EN = 1
-
IT_EN = 0
-
AUTO_TX_EN = 1
-
CS_TOGGLE_TX_EN = 1 (Note that in AUTO TX mode, setting the
-
DMA_TX_EN bit to 1 starts the transfer)
6) When the DMA transfer is complete, check the status of CSRB to
determine whether µWire has finished the serial data transfer.
7) Write to the setup register (SR5) to disable DMA and AUTO TX mode:
DMA_TX_EN = 0
-
IT_EN = 0
-
AUTO_TX_EN = 0
-
CS_TOGGLE_TX_EN = 0
-
Using Autostart and Autotoggle CS Mode
You must wait for a minimum of 3 x F_INT clock cycles after the end
of transfer (transition 1 to 0 detected on CSRB) before setting the
SR3 register to turn off the internal clock.
MicroWire Interface
Serial Interfaces
113

Advertisement

Table of Contents
loading

Table of Contents