APPLICATION NOTE SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC Introduction This application note provides an example of transferring data to on-chip peripheral modules with the direct memory access controller (DMAC) of the SH7263/SH7203. Target Device SH7263/SH7203 Contents 1. Introduction ....................................................................................................................................... 2 2. Description of Sample Application ...........
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 1. 1.1 Introduction Specification • DMAC channel 1 is used to transfer data from external memory to the transmit FIFO data register (SCFTDR) in the serial communication interface with FIFO (SCIF channel 0) in order to transmit character string data. • SCIF transmit FIFO data empty transfer requests (on-chip peripheral module request) are used to request DMA transfer. 1.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 2. Description of Sample Application In this sample application, the DMAC and on-chip peripheral module requests are used to transfer data from external memory to the SCIF. 2.1 Operational Overview of Modules Used When a DMA transfer request is made, the DMAC starts to transfer data in accordance with the priority order of channels, and continues the transfer operation until the transfer end condition is met.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC DMAC module RDMATCR_n On-chip memory Iteration control RSAR_n Register control Internal bus Peripheral bus On-chip peripheral module DMATCR_n SAR_n RDAR_n Start-up control DAR_n DMA transfer request signal CHCR_n DMA transfer acknowledge signal HEIn Interrupt controller DEIn Request priority control DMAOR DMARS0 to DMARS3 External ROM Bus interface External RAM External device (memory mapped) External device (with ac
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 2.2 Procedure for Setting Used Modules This section describes the procedure for making initial settings when the DMAC is to be used to transfer data from memory to on-chip peripheral modules. On-chip peripheral module requests are used for transfer requests. A flowchart of DMAC initialization is shown in figure 2. For details on registers, refer to the SH7263/SH7203 Group Hardware Manual.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 2.3 Operation of Sample Program In this sample program, SCIF transmit FIFO data empty transfer requests are made to activate DMAC channel 1, and to transfer data from external memory to the transmit FIFO data register (SCFTDR) on SCIF channel 0. The data written to SCFTDR on SCIF channel 0 are transmitted in UART mode. An operation timing of the sample program is shown in figure 3.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 2.4 Processing Procedure of Sample Program In this sample program, character string data stored in external memory are transferred by DMA to the transmit FIFO data register (SCFTDR) on SCIF channel 0, and then are transmitted in UART mode. The register settings for the sample program are listed in table 2. The macro definitions used in this sample program are also listed in table 3.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC Table 3 Macro Definitions Used in Sample Program Macro Definition DMA_SIZE_BYTE DMA_SIZE_WORD DMA_SIZE_LONG DMA_SIZE_LONGx4 DMA_INT_DISABLE DMA_INT_ENABLE Setting Value H'0000 H'0001 H'0002 H'0003 H'0000 H'0010 Description Byte transfer Word transfer Longword transfer 16-byte transfer DMA transfer end interrupt disabled DMA transfer end interrupt enabled START Initialize DMAC/enable transfer io_init_dma1() Initialize SCIF/enabl
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 3. Sample Program 1. Sample Program Listing "main.c" (1) 1 /*""FILE COMMENT""************************************************************** 2 * 3 * System Name : SH7203 Sample Program 4 * File Name : main.c 5 * Contents : Data transfer to on-chip peripheral modules with DMAC 6 * Version : 1.00.00 7 * Model : M3A-HS30 8 * CPU : SH7203 9 * Compiler : SHC9.1.1.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 2. Sample Program Listing "main.c" (2) 54 /* ---- Values for baud rate specification ---- */ 55 enum{ 56 CBR_1200, 57 CBR_2400, 58 CBR_4800, 59 CBR_9600, 60 CBR_19200, 61 CBR_31250, 62 CBR_38400, 63 CBR_57600, 64 CBR_115200 65 }; 66 67 /* ==== Table of register setting values ==== */ 68 static SH7203_BAUD_SET scif_baud[] = { 69 {214, 1}, /* 1200bps (-0.07%) */ 70 {106, 1}, /* 2400bps ( 0.39%) */ 71 {214, 0}, /* 4800bps (-0.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 3. Sample Program Listing "main.c" (3) 107 /* ==== Enabling SCIF0 initialization/transfer ==== */ 108 io_init_scif0(CBR_115200); 109 /* Communication mode :UART mode */ 110 /* Bit rate :115.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 4. Sample Program Listing "main.c" (4) 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 /* ----Setting DMA source address register---- */ DMAC.SAR1.LONG = (unsigned long)src; /* ----Setting DMA reload source address register---- */ DMAC.RSAR1.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 5. Sample Program Listing "main.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 6. Sample Program Listing "main.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC 4. Documents for Reference • Software Manual SH-2A, SH2A-FPU Software Manual The most up-to-date version of this document is available on the Renesas Technology Website. • Hardware Manual SH7203 Group Hardware Manual SH7263 Group Hardware Manual The most up-to-date version of this document is available on the Renesas Technology Website. REJ06B0734-0100/Rev.1.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC Website and Support Renesas Technology Website http://www.renesas.com/ Inquiries http://www.renesas.com/inquiry csc@renesas.com Revision Record Rev. 1.00 Date Apr.17.08 Description Page Summary — First edition issued All trademarks and registered trademarks are the property of their respective owners. REJ06B0734-0100/Rev.1.
SH7263/SH7203 Group Data Transfer to On-chip Peripheral Modules with DMAC Notes regarding these materials 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. This document is provided for reference purposes only so that Renesas customers may select the appropriate Renesas products for their use.