|
TMP19A71CYFG Datasheet, PDF (170/402 Pages) Toshiba Semiconductor – 32-Bit RISC Microprocessor | |||
|
◁ |
TMP19A71
10.4.2 Programming Example
The following illustrates the programming required to transfer data from an SIO receive
buffer (SC1BUF) to the on-chip RAM.
(1) DMAC settings:
⢠DMA channel used: Channel 0
⢠Source address: SC1BUF
⢠Destination address: 0xFFFF_9800 (physical address)
⢠Number of bytes transferred: 256
(2) SIO settings:
⢠Data format: 8 bits, UART
⢠SIO channel used: Channel 1
⢠Transfer rate: 9600 bps
DMA channel 0 is used for the transfer. The SIO1 receive interrupt is used as a trigger
to start the DMA channel 0.
(3) DMA channel 0 settings:
DCR
â 0x8000_0000
IMR56
â 15
7
0
xxxx, xxxx, x100, x100
ICLR
â 0xe0
DTCR0 â 0x0000_0000
····
SAR0
â 0xFFFF_F208
DAR0
â 0xFFFF_9800
BCR0
â 0x0000_00FF
CCR0 â 0x80C0_5B0F
/* Reset DMAC * /
/* Interrupt level = 4 (arbitrary) * /
/* IVR [8:0] * /
/* DACM = 000 * /
/* SACM = 000 * /
/* Physical address of SC1BUF */
/* Physical address of destination */
/* 256 (Number of bytes to be transferred) /
(Contents) 31
27
23
19
1000000011000000
15
11
7
3
01011x11x0001111
(4) SIO channel 1 settings:
IMR51
â 31
15
xxxx, xxxx, x101, x000
ICLR
â 0xCC
SC1MOD0 â 0x29
SC1CR â 0x00
BR1CR â 0xB5
BR1ADD â 0x05
/* Use INTRX1 as a DMA trigger and select DMA ch.0 * /
/* IVR [8:0]; clear INTRX1 * /
/* UART mode, 8-bit data format * /
/* @IMCLK = 28 MHz (approx. 9615 bps) */
/* Baud rate generator divisor */
TMP19A71 10-29
|
▷ |