aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/SPC560Pxx
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-10-01 13:54:54 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-10-01 13:54:54 +0000
commit4becbef6de9e4b5d6b8f027f91de846b4702a1cb (patch)
tree0f871f04226d211f43345dfce61efb11cc7e7537 /os/hal/platforms/SPC560Pxx
parent2a74bb8d6c4e707e58b198ed5a1b69199dcb9103 (diff)
downloadChibiOS-4becbef6de9e4b5d6b8f027f91de846b4702a1cb.tar.gz
ChibiOS-4becbef6de9e4b5d6b8f027f91de846b4702a1cb.tar.bz2
ChibiOS-4becbef6de9e4b5d6b8f027f91de846b4702a1cb.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4729 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/SPC560Pxx')
-rw-r--r--os/hal/platforms/SPC560Pxx/hal_lld.c2
-rw-r--r--os/hal/platforms/SPC560Pxx/hal_lld.h4
-rw-r--r--os/hal/platforms/SPC560Pxx/spc560p_registry.h2
3 files changed, 6 insertions, 2 deletions
diff --git a/os/hal/platforms/SPC560Pxx/hal_lld.c b/os/hal/platforms/SPC560Pxx/hal_lld.c
index e37b8fed0..7f340e6fc 100644
--- a/os/hal/platforms/SPC560Pxx/hal_lld.c
+++ b/os/hal/platforms/SPC560Pxx/hal_lld.c
@@ -125,7 +125,7 @@ void spc560p_clock_init(void) {
/* Initialization of the FMPLLs settings.*/
CGM.FMPLL[0].CR.R = SPC5_FMPLL0_ODF |
- (SPC5_FMPLL0_IDF_VALUE << 26) |
+ ((SPC5_FMPLL0_IDF_VALUE - 1) << 26) |
(SPC5_FMPLL0_NDIV_VALUE << 16);
CGM.FMPLL[0].MR.R = 0; /* TODO: Add a setting. */
CGM.FMPLL[1].CR.R = SPC5_FMPLL1_ODF |
diff --git a/os/hal/platforms/SPC560Pxx/hal_lld.h b/os/hal/platforms/SPC560Pxx/hal_lld.h
index 1e4cf3e2b..f02194c2e 100644
--- a/os/hal/platforms/SPC560Pxx/hal_lld.h
+++ b/os/hal/platforms/SPC560Pxx/hal_lld.h
@@ -290,7 +290,9 @@
* is no need to specify them.
*/
#if !defined(SPC5_ME_ME_BITS) || defined(__DOXYGEN__)
-#define SPC5_ME_ME_BITS 0
+#define SPC5_ME_ME_BITS (SPC5_ME_ME_RUN1 | SPC5_ME_ME_RUN2 | \
+ SPC5_ME_ME_RUN3 | SPC5_ME_ME_HALT0 | \
+ SPC5_ME_ME_STOP0)
#endif
/**
diff --git a/os/hal/platforms/SPC560Pxx/spc560p_registry.h b/os/hal/platforms/SPC560Pxx/spc560p_registry.h
index 131201ed2..46b7785fa 100644
--- a/os/hal/platforms/SPC560Pxx/spc560p_registry.h
+++ b/os/hal/platforms/SPC560Pxx/spc560p_registry.h
@@ -39,6 +39,7 @@
*/
/* LINFlex attributes.*/
#define SPC5_HAS_LINFLEX0 TRUE
+#define SPC5_LINFLEX0_PCTL 48
#define SPC5_LINFLEX0_RXI_HANDLER vector79
#define SPC5_LINFLEX0_TXI_HANDLER vector80
#define SPC5_LINFLEX0_ERR_HANDLER vector81
@@ -47,6 +48,7 @@
#define SPC5_LINFLEX0_ERR_NUMBER 81
#define SPC5_HAS_LINFLEX1 TRUE
+#define SPC5_LINFLEX1_PCTL 49
#define SPC5_LINFLEX1_RXI_HANDLER vector99
#define SPC5_LINFLEX1_TXI_HANDLER vector100
#define SPC5_LINFLEX1_ERR_HANDLER vector101