Download Print this page
Renesas REJ06B0734-0100 Application Note
Renesas REJ06B0734-0100 Application Note

Renesas REJ06B0734-0100 Application Note

Data transfer to on-chip peripheral modules with dmac

Advertisement

Quick Links

To our customers,
st
On April 1
, 2010, NEC Electronics Corporation merged with Renesas Technology
Corporation, and Renesas Electronics Corporation took over all the business of both
companies. Therefore, although the old company name remains in this document, it is a valid
Renesas Electronics document. We appreciate your understanding.
Issued by: Renesas Electronics Corporation (http://www.renesas.com)
Send any inquiries to http://www.renesas.com/inquiry.
Old Company Name in Catalogs and Other Documents
Renesas Electronics website:
http://www.renesas.com
st
April 1
, 2010
Renesas Electronics Corporation

Advertisement

loading

Summary of Contents for Renesas REJ06B0734-0100

  • Page 1 On April 1 , 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the old company name remains in this document, it is a valid Renesas Electronics document. We appreciate your understanding.
  • Page 2 Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as “Specific”...
  • Page 3: 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 Introduction ... 2 Description of Sample Application ...
  • Page 4: Introduction

    Internal clock Bus clock Peripheral clock • C Compiler: SuperH RISC engine family C/C++ compiler package Ver.9.01, from Renesas Technology • Compile Option: -cpu = sh2afpu -fpu = single -include = "$(WORKSPDIR)\inc" -object = "$(CONFIGDIR)\$(FILELEAF).obj" -debug -gbr = auto -chgincpath...
  • Page 5: Description Of Sample Application

    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. 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.
  • Page 6 On-chip memory On-chip peripheral module DMA transfer request signal DMA transfer acknowledge signal Interrupt controller External ROM External RAM External device (memory mapped) External device (with acknowledge) DREQ0 to DREQ3 DACK0 to DACK3, TEND0, TEND1 [Legend] RDMATCR: DMA reload transfer count register DMATCR: DMA transfer count register RSAR:...
  • Page 7 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.
  • Page 8 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.
  • Page 9 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.
  • Page 10 Table 3 Macro Definitions Used in Sample Program Macro Definition Setting Value DMA_SIZE_BYTE H'0000 DMA_SIZE_WORD H'0001 DMA_SIZE_LONG H'0002 DMA_SIZE_LONGx4 H'0003 DMA_INT_DISABLE H'0000 DMA_INT_ENABLE H'0010 REJ06B0734-0101/Rev.1.01 Data Transfer to On-chip Peripheral Modules with DMAC Description Byte transfer Word transfer Longword transfer 16-byte transfer DMA transfer end interrupt disabled DMA transfer end interrupt enabled...
  • Page 11: Sample Program

    17 * 18 * The information described here may contain technical inaccuracies or 19 * typographical errors. Renesas Technology Corporation and Renesas Solutions 20 * assume no responsibility for any damage, liability, or other loss rising 21 * from these inaccuracies or errors.
  • Page 12 2. Sample Program Listing "main.c" (2) 54 /* ---- Values for baud rate specification ---- */ enum{ CBR_1200, CBR_2400, CBR_4800, CBR_9600, CBR_19200, CBR_31250, CBR_38400, CBR_57600, CBR_115200 67 /* ==== Table of register setting values ==== */ static SH7203_BAUD_SET scif_baud[] = { {214, 1}, {106, 1}, {214, 0},...
  • Page 13 3. Sample Program Listing "main.c" (3) /* ==== Enabling SCIF0 initialization/transfer ==== */ io_init_scif0(CBR_115200); /* Communication mode :UART mode */ /* Bit rate :115.2Kbps */ /* TXI interrupt is generated when data in transmit FIFO is one byte */ /* ==== Disabling DMA transfer ==== */ io_dma1_stop();...
  • Page 14 4. Sample Program Listing "main.c" (4) /* ----Setting DMA source address register---- */ DMAC.SAR1.LONG = (unsigned long)src; /* ----Setting DMA reload source address register---- */ DMAC.RSAR1.LONG = (unsigned long)src; /* ----Setting DMA destination address register---- */ DMAC.DAR1.LONG = (unsigned long)dst; /* ----Setting DMA reload destination address register---- */ DMAC.RDAR1.LONG = (unsigned long)dst;...
  • Page 15 5. Sample Program Listing "main.c" (5) bit6 : DS : DREQ select :0 Low level bit5 : TB : cycle :0--------------- bit4-3 : TS : transfer size:B'00--- bit2 : IE : interrupt enable:0--- bit1 : TE : transfer end---------- bit0 : DE : DMA enable bit:0----- /* ----Setting DMA extension resource selector 0---- */ DMAC.DMARS0.BIT.CH1MID = 0x20;...
  • Page 16 6. Sample Program Listing "main.c" (7) * Function : Initializes SCIF0 273 * : Asynchronous (UART)/ 8 bits/ No parity/ 1 stop bit/ RTS/CTS disabled 274 * : Baud rate is specified by argument bps 275 * 276 *----------------------------------------------------------------------- 277 * Argument : int bps : Value for baud rate specification 278 *----------------------------------------------------------------------- 279 * Return Value: void 280 *-----------------------------------------------------------------------...
  • Page 17: Documents For Reference

    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.
  • Page 18 Website and Support Renesas Technology Website http://www.renesas.com/ Inquiries http://www.renesas.com/inquiry csc@renesas.com Revision Record Description Rev. Date Page 1.00 Apr.17.08 — 1.01 Dec.17.08 — All trademarks and registered trademarks are the property of their respective owners. REJ06B0734-0101/Rev.1.01 Data Transfer to On-chip Peripheral Modules with DMAC...
  • Page 19 Please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures.

This manual is also suitable for:

Sh7263Sh7203