volatile unsigned char *CHCFG14= (volatile unsigned char *) (DMAMUX_BA0x000E);
volatile unsigned char *CHCFG15= (volatile unsigned char *) (DMAMUX_BA0x000F);
In File main.c:
#include "registers.h"
:
:
*CHCFG1 = 0x00;
*CHCFG1 = 0x85;
To disable a source:
A particular DMA source may be disabled by not writing the corresponding source value
into any of the CHCFG registers. Additionally, some module-specific configuration may
be necessary. See the appropriate section for more details.
To switch the source of a DMA channel:
1. Disable the DMA channel in the DMA and reconfigure the channel for the new
source.
2. Clear the CHCFG[ENBL] and CHCFG[TRIG] bits of the DMA channel.
3. Select the source to be routed to the DMA channel. Write to the corresponding
CHCFG register, ensuring that the CHCFG[ENBL] and CHCFG[TRIG] fields are
set.
To switch DMA channel 8 from source #5 transmit to source #7 transmit:
1. In the DMA configuration registers, disable DMA channel 8 and reconfigure it to
handle the transfers to peripheral slot 7. This example assumes channel 8 doesn't
have triggering capability.
2. Write 0x00 to CHCFG8 (base a 0x08).
3. Write 0x87 to CHCFG8 (base a 0x08). (In this example, setting
CHCFG[TRIG] would have no effect due to the assumption that channel 8 does not
support the periodic triggering functionality.)
The following code example illustrates steps 2 and 3 above:
In File registers.h:
#define DMAMUX_BASE_ADDR 0x40021000/* Example only ! */
/* Following example assumes char is 8-bits */
volatile unsigned char *CHCFG0 = (volatile unsigned char *) (DMAMUX_BA0x0000);
volatile unsigned char *CHCFG1 = (volatile unsigned char *) (DMAMUX_BA0x0001);
volatile unsigned char *CHCFG2 = (volatile unsigned char *) (DMAMUX_BA0x0002);
volatile unsigned char *CHCFG3 = (volatile unsigned char *) (DMAMUX_BA0x0003);
volatile unsigned char *CHCFG4 = (volatile unsigned char *) (DMAMUX_BA0x0004);
volatile unsigned char *CHCFG5 = (volatile unsigned char *) (DMAMUX_BA0x0005);
volatile unsigned char *CHCFG6 = (volatile unsigned char *) (DMAMUX_BA0x0006);
volatile unsigned char *CHCFG7 = (volatile unsigned char *) (DMAMUX_BA0x0007);
volatile unsigned char *CHCFG8 = (volatile unsigned char *) (DMAMUX_BA0x0008);
volatile unsigned char *CHCFG9 = (volatile unsigned char *) (DMAMUX_BA0x0009);
volatile unsigned char *CHCFG10= (volatile unsigned char *) (DMAMUX_BA0x000A);
volatile unsigned char *CHCFG11= (volatile unsigned char *) (DMAMUX_BA0x000B);
volatile unsigned char *CHCFG12= (volatile unsigned char *) (DMAMUX_BA0x000C);
volatile unsigned char *CHCFG13= (volatile unsigned char *) (DMAMUX_BA0x000D);
volatile unsigned char *CHCFG14= (volatile unsigned char *) (DMAMUX_BA0x000E);
volatile unsigned char *CHCFG15= (volatile unsigned char *) (DMAMUX_BA0x000F);
Chapter 22 Direct memory access multiplexer (DMAMUX)
KV4x Reference Manual, Rev. 2, 02/2015
Freescale Semiconductor, Inc.
Preliminary
365
Содержание freescale KV4 Series
Страница 2: ...KV4x Reference Manual Rev 2 02 2015 2 Preliminary Freescale Semiconductor Inc...
Страница 60: ...KV4x Reference Manual Rev 2 02 2015 60 Preliminary Freescale Semiconductor Inc...
Страница 82: ...JTAG Controller Configuration KV4x Reference Manual Rev 2 02 2015 82 Preliminary Freescale Semiconductor Inc...
Страница 88: ...System Register file KV4x Reference Manual Rev 2 02 2015 88 Preliminary Freescale Semiconductor Inc...
Страница 128: ...Debug Security KV4x Reference Manual Rev 2 02 2015 128 Preliminary Freescale Semiconductor Inc...
Страница 138: ...Boot KV4x Reference Manual Rev 2 02 2015 138 Preliminary Freescale Semiconductor Inc...
Страница 150: ...Pinout diagrams KV4x Reference Manual Rev 2 02 2015 150 Preliminary Freescale Semiconductor Inc...
Страница 170: ...Functional description KV4x Reference Manual Rev 2 02 2015 170 Preliminary Freescale Semiconductor Inc...
Страница 212: ...Functional description KV4x Reference Manual Rev 2 02 2015 212 Preliminary Freescale Semiconductor Inc...
Страница 284: ...Functional description KV4x Reference Manual Rev 2 02 2015 284 Preliminary Freescale Semiconductor Inc...
Страница 294: ...Functional description KV4x Reference Manual Rev 2 02 2015 294 Preliminary Freescale Semiconductor Inc...
Страница 330: ...Functional description KV4x Reference Manual Rev 2 02 2015 330 Preliminary Freescale Semiconductor Inc...
Страница 450: ...Initialization application information KV4x Reference Manual Rev 2 02 2015 450 Preliminary Freescale Semiconductor Inc...
Страница 512: ...Interrupts and DMA Requests KV4x Reference Manual Rev 2 02 2015 512 Preliminary Freescale Semiconductor Inc...
Страница 520: ...Memory Map and Register Descriptions KV4x Reference Manual Rev 2 02 2015 520 Preliminary Freescale Semiconductor Inc...
Страница 580: ...Initialization Application information KV4x Reference Manual Rev 2 02 2015 580 Preliminary Freescale Semiconductor Inc...
Страница 660: ...Functional description KV4x Reference Manual Rev 2 02 2015 660 Preliminary Freescale Semiconductor Inc...
Страница 1038: ...Example configuration for chained timers KV4x Reference Manual Rev 2 02 2015 1038 Preliminary Freescale Semiconductor Inc...
Страница 1074: ...Functional description KV4x Reference Manual Rev 2 02 2015 1074 Preliminary Freescale Semiconductor Inc...
Страница 1168: ...Initialization application information KV4x Reference Manual Rev 2 02 2015 1168 Preliminary Freescale Semiconductor Inc...
Страница 1264: ...Initialization application information KV4x Reference Manual Rev 2 02 2015 1264 Preliminary Freescale Semiconductor Inc...
Страница 1336: ...Functional description KV4x Reference Manual Rev 2 02 2015 1336 Preliminary Freescale Semiconductor Inc...
Страница 1358: ...KV4x Reference Manual Rev 2 02 2015 1358 Preliminary Freescale Semiconductor Inc...