Rev. 1.0, 09/02, page 116 of 568
8.6
Procedures for Using DTC
8.6.1
Activation by Interrupt
The procedure for using the DTC with interrupt activation is as follows:
1. Set the MRA, MRB, SAR, DAR, CRA, and CRB register information in on-chip RAM.
2. Set the start address of the register information in the DTC vector address.
3. Set the corresponding bit in DTCER to 1.
4. Set the enable bits for the interrupt sources to be used as the activation sources to 1. The DTC
is activated when an interrupt used as an activation source is generated.
5. After one data transfer has been completed, or after the specified number of data transfers have
been completed, the DTCE bit is cleared to 0 and a CPU interrupt is requested. If the DTC is to
continue transferring data, set the DTCE bit to 1.
8.6.2
Activation by Software
The procedure for using the DTC with software activation is as follows:
1. Set the MRA, MRB, SAR, DAR, CRA, and CRB register information in on-chip RAM.
2. Set the start address of the register information in the DTC vector address.
3. Check that the SWDTE bit is 0.
4. Write 1 to SWDTE bit and the vector number to DTVECR.
5. Check the vector number written to DTVECR.
6. After one data transfer has been completed, if the DISEL bit is 0 and a CPU interrupt is not
requested, the SWDTE bit is cleared to 0. If the DTC is to continue transferring data, set the
SWDTE bit to 1. When the DISEL bit is 1, or after the specified number of data transfers have
been completed, the SWDTE bit is held at 1 and a CPU interrupt is requested.
8.7
Examples of Use of the DTC
8.7.1 Normal
Mode
An example is shown in which the DTC is used to receive 128 bytes of data via the SCI.
1. Set MRA to a fixed source address (SM1 = SM0 = 0), incrementing destination address (DM1
= 1, DM0 = 0), normal mode (MD1 = MD0 = 0), and byte size (Sz = 0). The DTS bit can have
any value. Set MRB for one data transfer by one interrupt (CHNE = 0, DISEL = 0). Set the
SCI RDR address in SAR, the start address of the RAM area where data will be received in
DAR, and 128 (H
′
0080) in CRA. CRB can be set to any value.
2. Set the start address of the register information at the DTC vector address.
Содержание H8S/2627
Страница 22: ...Rev 1 0 09 02 page xx of xxxvi Index 565 ...
Страница 30: ...Rev 1 0 09 02 page xxviii of xxxiv ...
Страница 36: ...Rev 1 0 09 02 page xxxiv of xxxiv Table 23 9 Flash Memory Characteristics 561 ...
Страница 82: ...Rev 1 0 09 02 page 46 of 568 ...
Страница 88: ...Rev 1 0 09 02 page 52 of 568 ...
Страница 98: ...Rev 1 0 09 02 page 62 of 568 ...
Страница 156: ...Rev 1 0 09 02 page 120 of 568 ...
Страница 390: ...Rev 1 0 09 02 page 354 of 568 ...
Страница 480: ...Rev 1 0 09 02 page 444 of 568 ...
Страница 512: ...Rev 1 0 09 02 page 476 of 568 ...
Страница 527: ...Rev 1 0 09 02 page 491 of 568 21 8 5 Writing to MSTPCR MSTPCR should only be written to by the CPU ...
Страница 528: ...Rev 1 0 09 02 page 492 of 568 ...
Страница 580: ...Rev 1 0 09 02 page 544 of 568 ...