CVS: msp430-libc/include msp430x241x.h, 1.1, 1.2 msp430x261x.h, 1.1, 1.2

Chris Liechti <[email protected]> Thu, 22 May 2008 08:17:46 -0700
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/msp430-libc/include
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv29844

Modified Files:
	msp430x241x.h msp430x261x.h 
Log Message:
fixes of calibration data


Index: msp430x241x.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430x241x.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- msp430x241x.h	15 May 2008 01:10:06 -0000	1.1
+++ msp430x241x.h	22 May 2008 15:17:43 -0000	1.2
@@ -20,9 +20,13 @@
  * - added usci.h include
  * - added __MSP430_HAS_USCI1__ define_
  * - commented out usart.h (didn't take a close look if we still need it)
+ *
+ * 2008-05-22 cliechti
+ * - fix bugs with calibration data
+ * - took out __DisableCalData
  */
 
-#define __DisableCalData
+//~ #define __DisableCalData
 
 #include <iomacros.h>
 
@@ -101,41 +105,41 @@
 ************************************************************/
 
 /* TLV Calibration Data Structure */
-#define TAG_DCO_30             (0x01)    /* Tag for DCO30  Calibration Data */
-#define TAG_ADC12_1            (0x10)    /* Tag for ADC12_1 Calibration Data */
-#define TAG_EMPTY              (0xFE)    /* Tag for Empty Data Field in Calibration Data */
+#define TAG_DCO_30             0x01      /* Tag for DCO30  Calibration Data */
+#define TAG_ADC12_1            0x10      /* Tag for ADC12_1 Calibration Data */
+#define TAG_EMPTY              0xFE      /* Tag for Empty Data Field in Calibration Data */
 
 
 #ifndef __DisableCalData
-#define TLV_CHECKSUM_          (0x10C0)  /* TLV CHECK SUM */
+#define TLV_CHECKSUM_          0x10C0    /* TLV CHECK SUM */
 sfrw(TLV_CHECKSUM, TLV_CHECKSUM_);
-#define TLV_DCO_30_TAG_        (0x10F6)  /* TLV TAG_DCO30 TAG */
+#define TLV_DCO_30_TAG_        0x10F6    /* TLV TAG_DCO30 TAG */
 sfrb(TLV_DCO_30_TAG, TLV_DCO_30_TAG_);
-#define TLV_DCO_30_LEN_        (0x10F7)  /* TLV TAG_DCO30 LEN */
+#define TLV_DCO_30_LEN_        0x10F7    /* TLV TAG_DCO30 LEN */
 sfrb(TLV_DCO_30_LEN, TLV_DCO_30_LEN_);
-#define TLV_ADC12_1_TAG_       (0x10DA)  /* TLV ADC12_1 TAG */
+#define TLV_ADC12_1_TAG_       0x10DA    /* TLV ADC12_1 TAG */
 sfrb(TLV_ADC12_1_TAG, TLV_ADC12_1_TAG_);
-#define TLV_ADC12_1_LEN_       (0x10DB)  /* TLV ADC12_1 LEN */
+#define TLV_ADC12_1_LEN_       0x10DB    /* TLV ADC12_1 LEN */
 sfrb(TLV_ADC12_1_LEN, TLV_ADC12_1_LEN_);
 #endif
 
-#define CAL_ADC_25T85          (0x0007)  /* Index for 2.5V/85Deg Cal. Value */
-#define CAL_ADC_25T30          (0x0006)  /* Index for 2.5V/30Deg Cal. Value */
-#define CAL_ADC_25VREF_FACTOR  (0x0005)  /* Index for 2.5V Ref. Factor */
-#define CAL_ADC_15T85          (0x0004)  /* Index for 1.5V/85Deg Cal. Value */
-#define CAL_ADC_15T30          (0x0003)  /* Index for 1.5V/30Deg Cal. Value */
-#define CAL_ADC_15VREF_FACTOR  (0x0002)  /* Index for ADC 1.5V Ref. Factor */
-#define CAL_ADC_OFFSET         (0x0001)  /* Index for ADC Offset */
-#define CAL_ADC_GAIN_FACTOR    (0x0000)  /* Index for ADC Gain Factor */
+#define CAL_ADC_25T85          0x0007    /* Index for 2.5V/85Deg Cal. Value */
+#define CAL_ADC_25T30          0x0006    /* Index for 2.5V/30Deg Cal. Value */
+#define CAL_ADC_25VREF_FACTOR  0x0005    /* Index for 2.5V Ref. Factor */
+#define CAL_ADC_15T85          0x0004    /* Index for 1.5V/85Deg Cal. Value */
+#define CAL_ADC_15T30          0x0003    /* Index for 1.5V/30Deg Cal. Value */
+#define CAL_ADC_15VREF_FACTOR  0x0002    /* Index for ADC 1.5V Ref. Factor */
+#define CAL_ADC_OFFSET         0x0001    /* Index for ADC Offset */
+#define CAL_ADC_GAIN_FACTOR    0x0000    /* Index for ADC Gain Factor */
 
-#define CAL_DCO_16MHZ          (0x0000)  /* Index for DCOCTL  Calibration Data for 16MHz */
-#define CAL_BC1_16MHZ          (0x0001)  /* Index for BCSCTL1 Calibration Data for 16MHz */
-#define CAL_DCO_12MHZ          (0x0002)  /* Index for DCOCTL  Calibration Data for 12MHz */
-#define CAL_BC1_12MHZ          (0x0003)  /* Index for BCSCTL1 Calibration Data for 12MHz */
-#define CAL_DCO_8MHZ           (0x0004)  /* Index for DCOCTL  Calibration Data for 8MHz */
-#define CAL_BC1_8MHZ           (0x0005)  /* Index for BCSCTL1 Calibration Data for 8MHz */
-#define CAL_DCO_1MHZ           (0x0006)  /* Index for DCOCTL  Calibration Data for 1MHz */
-#define CAL_BC1_1MHZ           (0x0007)  /* Index for BCSCTL1 Calibration Data for 1MHz */
+#define CAL_DCO_16MHZ          0x0000    /* Index for DCOCTL  Calibration Data for 16MHz */
+#define CAL_BC1_16MHZ          0x0001    /* Index for BCSCTL1 Calibration Data for 16MHz */
+#define CAL_DCO_12MHZ          0x0002    /* Index for DCOCTL  Calibration Data for 12MHz */
+#define CAL_BC1_12MHZ          0x0003    /* Index for BCSCTL1 Calibration Data for 12MHz */
+#define CAL_DCO_8MHZ           0x0004    /* Index for DCOCTL  Calibration Data for 8MHz */
+#define CAL_BC1_8MHZ           0x0005    /* Index for BCSCTL1 Calibration Data for 8MHz */
+#define CAL_DCO_1MHZ           0x0006    /* Index for DCOCTL  Calibration Data for 1MHz */
+#define CAL_BC1_1MHZ           0x0007    /* Index for BCSCTL1 Calibration Data for 1MHz */
 
 
 /************************************************************

Index: msp430x261x.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430x261x.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- msp430x261x.h	15 May 2008 01:10:07 -0000	1.1
+++ msp430x261x.h	22 May 2008 15:17:43 -0000	1.2
@@ -15,11 +15,15 @@
  * - added usci.h include
  * - added __MSP430_HAS_USCI1__ define_
  * - commented out usart.h (didn't take a close look if we still need it)
+ *
+ * 2008-05-22 cliechti
+ * - fix bugs with calibration data
+ * - took out __DisableCalData
  */
 
 #include <iomacros.h>
 
-#define __DisableCalData
+//~ #define __DisableCalData
 
 #define __MSP430_HAS_WDT__
 #define __MSP430_HAS_MPY__
@@ -95,40 +99,40 @@
 ************************************************************/
 
 /* TLV Calibration Data Structure */
-#define TAG_DCO_30             (0x01)    /* Tag for DCO30  Calibration Data */
-#define TAG_ADC12_1            (0x10)    /* Tag for ADC12_1 Calibration Data */
-#define TAG_EMPTY              (0xFE)    /* Tag for Empty Data Field in Calibration Data */
+#define TAG_DCO_30             0x01      /* Tag for DCO30  Calibration Data */
+#define TAG_ADC12_1            0x10      /* Tag for ADC12_1 Calibration Data */
+#define TAG_EMPTY              0xFE      /* Tag for Empty Data Field in Calibration Data */
 
 #ifndef __DisableCalData
-#define TLV_CHECKSUM_          (0x10C0)  /* TLV CHECK SUM */
+#define TLV_CHECKSUM_          0x10C0    /* TLV CHECK SUM */
 sfrw(TLV_CHECKSUM, TLV_CHECKSUM_);
-#define TLV_DCO_30_TAG_        (0x10F6)  /* TLV TAG_DCO30 TAG */
+#define TLV_DCO_30_TAG_        0x10F6    /* TLV TAG_DCO30 TAG */
 sfrb(TLV_DCO_30_TAG, TLV_DCO_30_TAG_);
-#define TLV_DCO_30_LEN_        (0x10F7)  /* TLV TAG_DCO30 LEN */
+#define TLV_DCO_30_LEN_        0x10F7    /* TLV TAG_DCO30 LEN */
 sfrb(TLV_DCO_30_LEN, TLV_DCO_30_LEN_);
-#define TLV_ADC12_1_TAG_       (0x10DA)  /* TLV ADC12_1 TAG */
+#define TLV_ADC12_1_TAG_       0x10DA    /* TLV ADC12_1 TAG */
 sfrb(TLV_ADC12_1_TAG, TLV_ADC12_1_TAG_);
-#define TLV_ADC12_1_LEN_       (0x10DB)  /* TLV ADC12_1 LEN */
+#define TLV_ADC12_1_LEN_       0x10DB    /* TLV ADC12_1 LEN */
 sfrb(TLV_ADC12_1_LEN, TLV_ADC12_1_LEN_);
 #endif
 
-#define CAL_ADC_25T85          (0x0007)  /* Index for 2.5V/85Deg Cal. Value */
-#define CAL_ADC_25T30          (0x0006)  /* Index for 2.5V/30Deg Cal. Value */
-#define CAL_ADC_25VREF_FACTOR  (0x0005)  /* Index for 2.5V Ref. Factor */
-#define CAL_ADC_15T85          (0x0004)  /* Index for 1.5V/85Deg Cal. Value */
-#define CAL_ADC_15T30          (0x0003)  /* Index for 1.5V/30Deg Cal. Value */
-#define CAL_ADC_15VREF_FACTOR  (0x0002)  /* Index for ADC 1.5V Ref. Factor */
-#define CAL_ADC_OFFSET         (0x0001)  /* Index for ADC Offset */
-#define CAL_ADC_GAIN_FACTOR    (0x0000)  /* Index for ADC Gain Factor */
+#define CAL_ADC_25T85          0x0007    /* Index for 2.5V/85Deg Cal. Value */
+#define CAL_ADC_25T30          0x0006    /* Index for 2.5V/30Deg Cal. Value */
+#define CAL_ADC_25VREF_FACTOR  0x0005    /* Index for 2.5V Ref. Factor */
+#define CAL_ADC_15T85          0x0004    /* Index for 1.5V/85Deg Cal. Value */
+#define CAL_ADC_15T30          0x0003    /* Index for 1.5V/30Deg Cal. Value */
+#define CAL_ADC_15VREF_FACTOR  0x0002    /* Index for ADC 1.5V Ref. Factor */
+#define CAL_ADC_OFFSET         0x0001    /* Index for ADC Offset */
+#define CAL_ADC_GAIN_FACTOR    0x0000    /* Index for ADC Gain Factor */
 
-#define CAL_DCO_16MHZ          (0x0000)  /* Index for DCOCTL  Calibration Data for 16MHz */
-#define CAL_BC1_16MHZ          (0x0001)  /* Index for BCSCTL1 Calibration Data for 16MHz */
-#define CAL_DCO_12MHZ          (0x0002)  /* Index for DCOCTL  Calibration Data for 12MHz */
-#define CAL_BC1_12MHZ          (0x0003)  /* Index for BCSCTL1 Calibration Data for 12MHz */
-#define CAL_DCO_8MHZ           (0x0004)  /* Index for DCOCTL  Calibration Data for 8MHz */
-#define CAL_BC1_8MHZ           (0x0005)  /* Index for BCSCTL1 Calibration Data for 8MHz */
-#define CAL_DCO_1MHZ           (0x0006)  /* Index for DCOCTL  Calibration Data for 1MHz */
-#define CAL_BC1_1MHZ           (0x0007)  /* Index for BCSCTL1 Calibration Data for 1MHz */
+#define CAL_DCO_16MHZ          0x0000    /* Index for DCOCTL  Calibration Data for 16MHz */
+#define CAL_BC1_16MHZ          0x0001    /* Index for BCSCTL1 Calibration Data for 16MHz */
+#define CAL_DCO_12MHZ          0x0002    /* Index for DCOCTL  Calibration Data for 12MHz */
+#define CAL_BC1_12MHZ          0x0003    /* Index for BCSCTL1 Calibration Data for 12MHz */
+#define CAL_DCO_8MHZ           0x0004    /* Index for DCOCTL  Calibration Data for 8MHz */
+#define CAL_BC1_8MHZ           0x0005    /* Index for BCSCTL1 Calibration Data for 8MHz */
+#define CAL_DCO_1MHZ           0x0006    /* Index for DCOCTL  Calibration Data for 1MHz */
+#define CAL_BC1_1MHZ           0x0007    /* Index for BCSCTL1 Calibration Data for 1MHz */
 
 
 /************************************************************


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/