summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Knispel <gknispel@avencall.com>2012-09-28 15:06:53 +0200
committerGuillaume Knispel <gknispel@avencall.com>2012-09-28 15:06:53 +0200
commit461d1ff229c20e9563e3eb7f1f0c5663d32f54c4 (patch)
tree428e14e021b21ef92cd7e7e605828943e014fc77
parent90a2ed97fa0b27c460567c03cdbbb8a7b7df6129 (diff)
workaround for errata BCL12
-rw-r--r--main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.c b/main.c
index d2cf023..1948de8 100644
--- a/main.c
+++ b/main.c
@@ -491,8 +491,12 @@ static void InitPorts(void)
static void GlobalInit(void)
{
- DCOCTL = CALDCO_12MHZ;
+ /* freq selection procedure compliant with errata BCL12
+ * (potentially switching from RSEL < 12 to > 13)
+ */
+ DCOCTL = 0;
BCSCTL1 = CALBC1_12MHZ;
+ DCOCTL = CALDCO_12MHZ;
TACTL = TASSEL_2 + ID_3 + TACLR + TAIE + MC_1; // SMCLK + div by 8 + reset +
// enable interrupt + UP