aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/SPC560Dxx
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-06-14 12:34:59 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-06-14 12:34:59 +0000
commit126943984c591c952bd0b9f6b2d36d97be823de3 (patch)
treeba80c46171dcc1e34bbd0110edb0cca645bd50ed /os/hal/platforms/SPC560Dxx
parentf0e62eb4b588d8b2fbf858efb7b41226a2424d81 (diff)
downloadChibiOS-126943984c591c952bd0b9f6b2d36d97be823de3.tar.gz
ChibiOS-126943984c591c952bd0b9f6b2d36d97be823de3.tar.bz2
ChibiOS-126943984c591c952bd0b9f6b2d36d97be823de3.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5848 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/SPC560Dxx')
-rw-r--r--os/hal/platforms/SPC560Dxx/hal_lld.c3
-rw-r--r--os/hal/platforms/SPC560Dxx/platform.mk2
-rw-r--r--os/hal/platforms/SPC560Dxx/spc560d_registry.h7
3 files changed, 12 insertions, 0 deletions
diff --git a/os/hal/platforms/SPC560Dxx/hal_lld.c b/os/hal/platforms/SPC560Dxx/hal_lld.c
index b027e1ac4..229051979 100644
--- a/os/hal/platforms/SPC560Dxx/hal_lld.c
+++ b/os/hal/platforms/SPC560Dxx/hal_lld.c
@@ -96,6 +96,9 @@ void hal_lld_init(void) {
PIT.CH[0].CVAL.R = reg;
PIT.CH[0].TFLG.R = 1; /* Interrupt flag cleared. */
PIT.CH[0].TCTRL.R = 3; /* Timer active, interrupt enabled. */
+
+ /* EDMA initialization.*/
+ edmaInit();
}
/**
diff --git a/os/hal/platforms/SPC560Dxx/platform.mk b/os/hal/platforms/SPC560Dxx/platform.mk
index 6505aa352..8e6c8d73a 100644
--- a/os/hal/platforms/SPC560Dxx/platform.mk
+++ b/os/hal/platforms/SPC560Dxx/platform.mk
@@ -1,11 +1,13 @@
# List of all the SPC560Dxx platform files.
PLATFORMSRC = ${CHIBIOS}/os/hal/platforms/SPC560Dxx/hal_lld.c \
+ ${CHIBIOS}/os/hal/platforms/SPC5xx/DSPI_v1/spi_lld.c \
${CHIBIOS}/os/hal/platforms/SPC5xx/EDMA_v1/spc5_edma.c \
${CHIBIOS}/os/hal/platforms/SPC5xx/SIUL_v1/pal_lld.c \
${CHIBIOS}/os/hal/platforms/SPC5xx/LINFlex_v1/serial_lld.c
# Required include directories
PLATFORMINC = ${CHIBIOS}/os/hal/platforms/SPC560Dxx \
+ ${CHIBIOS}/os/hal/platforms/SPC5xx/DSPI_v1 \
${CHIBIOS}/os/hal/platforms/SPC5xx/EDMA_v1 \
${CHIBIOS}/os/hal/platforms/SPC5xx/SIUL_v1 \
${CHIBIOS}/os/hal/platforms/SPC5xx/LINFlex_v1
diff --git a/os/hal/platforms/SPC560Dxx/spc560d_registry.h b/os/hal/platforms/SPC560Dxx/spc560d_registry.h
index ea5206860..72fd5b36c 100644
--- a/os/hal/platforms/SPC560Dxx/spc560d_registry.h
+++ b/os/hal/platforms/SPC560Dxx/spc560d_registry.h
@@ -42,6 +42,12 @@
#define SPC5_DSPI_FIFO_DEPTH 4
#define SPC5_DSPI0_PCTL 4
#define SPC5_DSPI1_PCTL 5
+#define SPC5_DSPI0_TX1_DMA_CH_ID 4
+#define SPC5_DSPI0_TX2_DMA_CH_ID 5
+#define SPC5_DSPI0_RX_DMA_CH_ID 6
+#define SPC5_DSPI1_TX1_DMA_CH_ID 7
+#define SPC5_DSPI1_TX2_DMA_CH_ID 8
+#define SPC5_DSPI1_RX_DMA_CH_ID 9
#define SPC5_DSPI0_TX1_DMA_DEV_ID 1
#define SPC5_DSPI0_TX2_DMA_DEV_ID 0
#define SPC5_DSPI0_RX_DMA_DEV_ID 2
@@ -65,6 +71,7 @@
#define SPC5_HAS_EDMA TRUE
#define SPC5_EDMA_NCHANNELS 16
#define SPC5_EDMA_HAS_MUX TRUE
+#define SPC5_EDMA_MUX_PCTL 23
/* LINFlex attributes.*/
#define SPC5_HAS_LINFLEX0 TRUE