3. Configure a timer for the desired trigger interval
4. Write 0xC5 to CHCFG2 (base a 0x02)
The following code example illustrates steps #1 and #4 above:
In File registers.h:
#define DMAMUX_BASE_ADDR 0xFC084000/* Example only ! */
/* Following example assumes char is 8-bits */
volatile unsigned char *CHCONFIG0 = (volatile unsigned char *) (DMAMUX_BA0x0000);
volatile unsigned char *CHCONFIG1 = (volatile unsigned char *) (DMAMUX_BA0x0001);
volatile unsigned char *CHCONFIG2 = (volatile unsigned char *) (DMAMUX_BA0x0002);
volatile unsigned char *CHCONFIG3 = (volatile unsigned char *) (DMAMUX_BA0x0003);
volatile unsigned char *CHCONFIG4 = (volatile unsigned char *) (DMAMUX_BA0x0004);
volatile unsigned char *CHCONFIG5 = (volatile unsigned char *) (DMAMUX_BA0x0005);
volatile unsigned char *CHCONFIG6 = (volatile unsigned char *) (DMAMUX_BA0x0006);
volatile unsigned char *CHCONFIG7 = (volatile unsigned char *) (DMAMUX_BA0x0007);
volatile unsigned char *CHCONFIG8 = (volatile unsigned char *) (DMAMUX_BA0x0008);
volatile unsigned char *CHCONFIG9 = (volatile unsigned char *) (DMAMUX_BA0x0009);
volatile unsigned char *CHCONFIG10= (volatile unsigned char *) (DMAMUX_BA0x000A);
volatile unsigned char *CHCONFIG11= (volatile unsigned char *) (DMAMUX_BA0x000B);
volatile unsigned char *CHCONFIG12= (volatile unsigned char *) (DMAMUX_BA0x000C);
volatile unsigned char *CHCONFIG13= (volatile unsigned char *) (DMAMUX_BA0x000D);
volatile unsigned char *CHCONFIG14= (volatile unsigned char *) (DMAMUX_BA0x000E);
volatile unsigned char *CHCONFIG15= (volatile unsigned char *) (DMAMUX_BA0x000F);
In File main.c:
#include "registers.h"
:
:
*CHCONFIG2 = 0x00;
*CHCONFIG2 = 0xC5;
Enabling a source without periodic triggering
1. Determine with which DMA channel the source will be associated. Note that only the
first 4 DMA channels have periodic triggering capability
2. Clear the CHCFG[ENBL] and CHCFG[TRIG] bits of the DMA channel
3. Ensure that the DMA channel is properly configured in the DMA. The DMA channel
may be enabled at this point
4. Select the source to be routed to the DMA channel. Write to the corresponding
CHCFG register, ensuring that the CHCFG[ENBL] is set while the CHCFG[TRIG]
bit is cleared
Configure source #5 Transmit for use with DMA channel 2, with no periodic triggering
capability.
1. Write 0x00 to CHCFG2 (base a 0x02)
2. Configure channel 2 in the DMA, including enabling the channel
3. Write 0x85 to CHCFG2 (base a 0x02)
The following code example illustrates steps #1 and #3 above:
In File registers.h:
#define DMAMUX_BASE_ADDR 0xFC084000/* Example only ! */
/* Following example assumes char is 8-bits */
volatile unsigned char *CHCONFIG0 = (volatile unsigned char *) (DMAMUX_BA0x0000);
volatile unsigned char *CHCONFIG1 = (volatile unsigned char *) (DMAMUX_BA0x0001);
volatile unsigned char *CHCONFIG2 = (volatile unsigned char *) (DMAMUX_BA0x0002);
Initialization/application information
K53 Sub-Family Reference Manual, Rev. 6, Nov 2011
434
Freescale Semiconductor, Inc.
Содержание K53 Series
Страница 2: ...K53 Sub Family Reference Manual Rev 6 Nov 2011 2 Freescale Semiconductor Inc...
Страница 58: ...K53 Sub Family Reference Manual Rev 6 Nov 2011 58 Freescale Semiconductor Inc...
Страница 70: ...Orderable part numbers K53 Sub Family Reference Manual Rev 6 Nov 2011 70 Freescale Semiconductor Inc...
Страница 168: ...Human machine interfaces HMI K53 Sub Family Reference Manual Rev 6 Nov 2011 168 Freescale Semiconductor Inc...
Страница 206: ...Boot K53 Sub Family Reference Manual Rev 6 Nov 2011 206 Freescale Semiconductor Inc...
Страница 218: ...Security Interactions with other Modules K53 Sub Family Reference Manual Rev 6 Nov 2011 218 Freescale Semiconductor Inc...
Страница 342: ...PMC Memory Map Register Definition K53 Sub Family Reference Manual Rev 6 Nov 2011 342 Freescale Semiconductor Inc...
Страница 362: ...Functional description K53 Sub Family Reference Manual Rev 6 Nov 2011 362 Freescale Semiconductor Inc...
Страница 384: ...Initialization application information K53 Sub Family Reference Manual Rev 6 Nov 2011 384 Freescale Semiconductor Inc...
Страница 406: ...Application Information K53 Sub Family Reference Manual Rev 6 Nov 2011 406 Freescale Semiconductor Inc...
Страница 424: ...Functional Description K53 Sub Family Reference Manual Rev 6 Nov 2011 424 Freescale Semiconductor Inc...
Страница 514: ...Initialization application information K53 Sub Family Reference Manual Rev 6 Nov 2011 514 Freescale Semiconductor Inc...
Страница 524: ...Functional Description K53 Sub Family Reference Manual Rev 6 Nov 2011 524 Freescale Semiconductor Inc...
Страница 546: ...Restrictions on Watchdog Operation K53 Sub Family Reference Manual Rev 6 Nov 2011 546 Freescale Semiconductor Inc...
Страница 594: ...Interrupts K53 Sub Family Reference Manual Rev 6 Nov 2011 594 Freescale Semiconductor Inc...
Страница 628: ...Functional description K53 Sub Family Reference Manual Rev 6 Nov 2011 628 Freescale Semiconductor Inc...
Страница 702: ...Flash Operation in Low Power Modes K53 Sub Family Reference Manual Rev 6 Nov 2011 702 Freescale Semiconductor Inc...
Страница 772: ...Functional description K53 Sub Family Reference Manual Rev 6 Nov 2011 772 Freescale Semiconductor Inc...
Страница 808: ...Initialization Application Information K53 Sub Family Reference Manual Rev 6 Nov 2011 808 Freescale Semiconductor Inc...
Страница 864: ...Application information K53 Sub Family Reference Manual Rev 6 Nov 2011 864 Freescale Semiconductor Inc...
Страница 894: ...DAC Interrupts K53 Sub Family Reference Manual Rev 6 Nov 2011 894 Freescale Semiconductor Inc...
Страница 908: ...Functional Description K53 Sub Family Reference Manual Rev 6 Nov 2011 908 Freescale Semiconductor Inc...
Страница 920: ...Functional Description K53 Sub Family Reference Manual Rev 6 Nov 2011 920 Freescale Semiconductor Inc...
Страница 926: ...Functional Description K53 Sub Family Reference Manual Rev 6 Nov 2011 926 Freescale Semiconductor Inc...
Страница 1092: ...FTM Interrupts K53 Sub Family Reference Manual Rev 6 Nov 2011 1092 Freescale Semiconductor Inc...
Страница 1114: ...Functional description K53 Sub Family Reference Manual Rev 6 Nov 2011 1114 Freescale Semiconductor Inc...
Страница 1156: ...Functional description K53 Sub Family Reference Manual Rev 6 Nov 2011 1156 Freescale Semiconductor Inc...
Страница 1304: ...On The Go Operation K53 Sub Family Reference Manual Rev 6 Nov 2011 1304 Freescale Semiconductor Inc...
Страница 1334: ...USB Voltage Regulator Module Signal Descriptions K53 Sub Family Reference Manual Rev 6 Nov 2011 1334 Freescale Semiconductor Inc...
Страница 1388: ...Initialization Application Information K53 Sub Family Reference Manual Rev 6 Nov 2011 1388 Freescale Semiconductor Inc...
Страница 1514: ...Application information K53 Sub Family Reference Manual Rev 6 Nov 2011 1514 Freescale Semiconductor Inc...
Страница 1622: ...Software restrictions K53 Sub Family Reference Manual Rev 6 Nov 2011 1622 Freescale Semiconductor Inc...
Страница 1694: ...Initialization application information K53 Sub Family Reference Manual Rev 6 Nov 2011 1694 Freescale Semiconductor Inc...
Страница 1704: ...Functional description K53 Sub Family Reference Manual Rev 6 Nov 2011 1704 Freescale Semiconductor Inc...
Страница 1734: ...Application information K53 Sub Family Reference Manual Rev 6 Nov 2011 1734 Freescale Semiconductor Inc...
Страница 1800: ...Application information K53 Sub Family Reference Manual Rev 6 Nov 2011 1800 Freescale Semiconductor Inc...
Страница 1822: ...K53 Sub Family Reference Manual Rev 6 Nov 2011 1822 Freescale Semiconductor Inc...