
ML62Q1000 Series User's Manual
Chapter 14
DMA
Controller
FEUL62Q1000
14-17
14.3.4 UART Continuous Reception Using DMA Transfer
The following flow chart describes an example of UART continuous reception using DMA transfer.
See Chapter 11 "Serial Communication Unit" for details of UART.
[Operation specifications]
・
UART reception of 15 consecutive bytes using DMA channel 0
・
Use the serial communication unit 00 DMA request trigger for a transfer trigger
・
Transfer data from SD0BUFL of serial communication unit 0 to RAM address 0xEFED through 0xEFFB.
・
Transfer format: full-duplex communication mode, 115200 bps, 8-bit length, no parity, 1 stop bit
Figure 14-7 UART Continuous Reception Flow Using DMA Transfer
DC0MOD = 0x0204; // Trigger the serial communication unit 01 trigger
// Transfer source: Fixed address mode
// Transfer destination: Increment address mode
DC0TN = 0x000F; // 15 times
Receive DMA/UART
DC0EN = 1;
End
Data is received with repetition of DMA
transfer for each serial communication
unit 00 DMA request trigger until the
transfer count reaches the remaining 0.
Transfer mode setting
Transfer count setting
DMA interrupt generated after transfer is completed
DMA transfer enable
Interrupt status clear
DICLR1 = 1;
EDMA = 0; // DMA interrupt disable
Confirm the end of DMA channel 0
transfer with
the DC0ISTA bit of the DSTAT register
ESIU00 = 0;
// Disable the serial communication unit 00 interrupt
QDMA = 0;
// Clear the DMA interrupt request bit
EDMA = 1:
// DMA interrupt enable
General-purpose port
setting
DC0SA = 0xF600; // Transfer source SD0BUFL address
DC0DA = 0xEFED; // Transfer destination RAM beginning address
Software trigger is
generated
DC1STRG = 1; // Generate software trigger, transfer data (first time)
Check transfer status
Set interrupt
UART reception
setting
UART reception stop
enable
DMA end
processing
U00EN = 1;
Start UART
communication
UART reception stop enable flag set
General-purpose port shared function setting
Output port setting
SU0MOD = 0x02;
// UART full-duplex communication mode
// Interrupt is generated at the end of reception
UA00MOD = 0x00; // 8-bit length, no parity, 1 stop bit
UA00BRT = 0x0089;
UA00BRC = 0x06;
// 115200 bps@16 MHz
Hardware processing
UART receive
stop
enable flag = 1?
N
Y
End
DMA interrupt routine
U00EN = 0;
UART communication
stopped
Содержание ML62Q1000 Series
Страница 17: ...Chapter 1 Overview...
Страница 112: ...Chapter 2 CPU and Memory Space...
Страница 154: ...Chapter 3 Reset Function...
Страница 166: ...Chapter 4 Power Management...
Страница 196: ...Chapter 5 Interrupts...
Страница 248: ...Chapter 6 Clock generation Circuit...
Страница 274: ...Chapter 7 Low Speed Time Base Counter...
Страница 291: ...Chapter 8 16 Bit Timer...
Страница 320: ...Chapter 9 Functional Timer FTM...
Страница 382: ...Chapter 10 Watchdog Timer...
Страница 402: ...Chapter 11 Serial Communication Unit...
Страница 456: ...Chapter 12 I2 C Bus Unit...
Страница 491: ...Chapter 13 I2 C Master...
Страница 512: ...Chapter 14 DMA Controller...
Страница 531: ...Chapter 15 Buzzer...
Страница 550: ...Chapter 16 Simplified RTC...
Страница 559: ...Chapter 17 GPIO...
Страница 594: ...Chapter 18 External Interrupt Function...
Страница 612: ...Chapter 19 CRC Generator...
Страница 632: ...Chapter 20 Analog Comparator...
Страница 644: ...Chapter 21 D A Converter...
Страница 655: ...Chapter 22 Voltage Level Supervisor...
Страница 676: ...Chapter 23 Successive Approximation Type A D Converter...
Страница 709: ...Chapter 24 Regulator...
Страница 714: ...Chapter 25 Flash Memory...
Страница 743: ...Chapter 26 Code Option...
Страница 750: ...Chapter 27 LCD Driver...
Страница 788: ...Chapter 28 On Chip Debug Function...
Страница 795: ...Chapter 29 Safety Function...
Страница 813: ...Appendix A...
Страница 881: ...Revision History...