00001 #ifndef __MSP430WARE_TLV_H__ 00002 #define __MSP430WARE_TLV_H__ 00003 00004 //***************************************************************************** 00005 // 00006 //The following are the defines to include the required modules for this 00007 //peripheral in msp430xgeneric.h file 00008 // 00009 //***************************************************************************** 00010 #define __MSP430_HAS_TLV__ 00011 /******************************************************************************* 00012 * Data Types 00013 ******************************************************************************/ 00014 struct s_TLV_Die_Record { 00015 unsigned long wafer_id; 00016 unsigned int die_x_position; 00017 unsigned int die_y_position; 00018 unsigned int test_results; 00019 }; 00020 00021 struct s_TLV_ADC_Cal_Data { 00022 unsigned int adc_gain_factor; 00023 unsigned int adc_offset; 00024 unsigned int adc_ref15_30_temp; 00025 unsigned int adc_ref15_85_temp; 00026 unsigned int adc_ref20_30_temp; 00027 unsigned int adc_ref20_85_temp; 00028 unsigned int adc_ref25_30_temp; 00029 unsigned int adc_ref25_85_temp; 00030 }; 00031 00032 struct s_TLV_Timer_D_Cal_Data { 00033 unsigned int TDH0CTL1_64; 00034 unsigned int TDH0CTL1_128; 00035 unsigned int TDH0CTL1_200; 00036 unsigned int TDH0CTL1_256; 00037 }; 00038 00039 struct s_TLV_REF_Cal_Data { 00040 unsigned int ref_ref15; 00041 unsigned int ref_ref20; 00042 unsigned int ref_ref25; 00043 }; 00044 00045 struct s_Peripheral_Memory_Data { 00046 unsigned int memory_1; 00047 unsigned int memory_2; 00048 unsigned int memory_3; 00049 unsigned int memory_4; 00050 }; 00051 00052 00053 //****************************************************************************** 00054 //The following are values that can be passed to the TLV_getInfo() 00055 //API as the tag parameter. 00056 //****************************************************************************** 00057 #define TLV_TAG_LDTAG TLV_LDTAG 00058 #define TLV_TAG_PDTAG TLV_PDTAG 00059 #define TLV_TAG_Reserved3 TLV_Reserved3 00060 #define TLV_TAG_Reserved4 TLV_Reserved4 00061 #define TLV_TAG_BLANK TLV_BLANK 00062 #define TLV_TAG_Reserved6 TLV_Reserved6 00063 #define TLV_TAG_Reserved7 TLV_Reserved7 00064 #define TLV_TAG_DIERECORD TLV_DIERECORD 00065 #define TLV_TAG_ADCCAL TLV_ADCCAL 00066 #define TLV_TAG_ADC12CAL TLV_ADC12CAL 00067 #define TLV_TAG_ADC10CAL TLV_ADC10CAL 00068 #define TLV_TAG_REFCAL TLV_REFCAL 00069 #define TLV_TAG_TIMER_D_CAL TLV_TIMERDCAL 00070 //Deprecated 00071 #define TLV_TIMER_D_CAL TLV_TIMERDCAL /* Timer_Dx calibration */ 00072 00073 #define TLV_TAG_TAGEXT TLV_TAGEXT 00074 #define TLV_TAG_TAGEND TLV_TAGEND 00075 00076 //****************************************************************************** 00077 //The following are values that can be passed to the TLV_getPeripheral() 00078 //API as the tag parameter. 00079 //****************************************************************************** 00080 #define TLV_PID_NO_MODULE (0x00) /* No Module */ 00081 #define TLV_PID_PORTMAPPING (0x10) /* Port Mapping */ 00082 #define TLV_PID_MSP430CPUXV2 (0x23) /* MSP430CPUXV2 */ 00083 #define TLV_PID_JTAG (0x09) /* JTAG */ 00084 #define TLV_PID_SBW (0x0F) /* SBW */ 00085 #define TLV_PID_EEM_XS (0x02) /* EEM X-Small */ 00086 #define TLV_PID_EEM_S (0x03) /* EEM Small */ 00087 #define TLV_PID_EEM_M (0x04) /* EEM Medium */ 00088 #define TLV_PID_EEM_L (0x05) /* EEM Large */ 00089 #define TLV_PID_PMM (0x30) /* PMM */ 00090 #define TLV_PID_PMM_FR (0x32) /* PMM FRAM */ 00091 #define TLV_PID_FCTL (0x39) /* Flash */ 00092 #define TLV_PID_CRC16 (0x3C) /* CRC16 */ 00093 #define TLV_PID_CRC16_RB (0x3D) /* CRC16 Reverse */ 00094 #define TLV_PID_WDT_A (0x40) /* WDT_A */ 00095 #define TLV_PID_SFR (0x41) /* SFR */ 00096 #define TLV_PID_SYS (0x42) /* SYS */ 00097 #define TLV_PID_RAMCTL (0x44) /* RAMCTL */ 00098 #define TLV_PID_DMA_1 (0x46) /* DMA 1 */ 00099 #define TLV_PID_DMA_3 (0x47) /* DMA 3 */ 00100 #define TLV_PID_UCS (0x48) /* UCS */ 00101 #define TLV_PID_DMA_6 (0x4A) /* DMA 6 */ 00102 #define TLV_PID_DMA_2 (0x4B) /* DMA 2 */ 00103 #define TLV_PID_PORT1_2 (0x51) /* Port 1 + 2 / A */ 00104 #define TLV_PID_PORT3_4 (0x52) /* Port 3 + 4 / B */ 00105 #define TLV_PID_PORT5_6 (0x53) /* Port 5 + 6 / C */ 00106 #define TLV_PID_PORT7_8 (0x54) /* Port 7 + 8 / D */ 00107 #define TLV_PID_PORT9_10 (0x55) /* Port 9 + 10 / E */ 00108 #define TLV_PID_PORT11_12 (0x56) /* Port 11 + 12 / F */ 00109 #define TLV_PID_PORTU (0x5E) /* Port U */ 00110 #define TLV_PID_PORTJ (0x5F) /* Port J */ 00111 #define TLV_PID_TA2 (0x60) /* Timer A2 */ 00112 #define TLV_PID_TA3 (0x61) /* Timer A1 */ 00113 #define TLV_PID_TA5 (0x62) /* Timer A5 */ 00114 #define TLV_PID_TA7 (0x63) /* Timer A7 */ 00115 #define TLV_PID_TB3 (0x65) /* Timer B3 */ 00116 #define TLV_PID_TB5 (0x66) /* Timer B5 */ 00117 #define TLV_PID_TB7 (0x67) /* Timer B7 */ 00118 #define TLV_PID_RTC (0x68) /* RTC */ 00119 #define TLV_PID_BT_RTC (0x69) /* BT + RTC */ 00120 #define TLV_PID_BBS (0x6A) /* Battery Backup Switch */ 00121 #define TLV_PID_RTC_B (0x6B) /* RTC_B */ 00122 #define TLV_PID_TD2 (0x6C) /* Timer D2 */ 00123 #define TLV_PID_TD3 (0x6D) /* Timer D1 */ 00124 #define TLV_PID_TD5 (0x6E) /* Timer D5 */ 00125 #define TLV_PID_TD7 (0x6F) /* Timer D7 */ 00126 #define TLV_PID_TEC (0x70) /* Imer Event Control */ 00127 #define TLV_PID_RTC_C (0x71) /* RTC_C */ 00128 #define TLV_PID_AES (0x80) /* AES */ 00129 #define TLV_PID_MPY16 (0x84) /* MPY16 */ 00130 #define TLV_PID_MPY32 (0x85) /* MPY32 */ 00131 #define TLV_PID_MPU (0x86) /* MPU */ 00132 #define TLV_PID_USCI_AB (0x90) /* USCI_AB */ 00133 #define TLV_PID_USCI_A (0x91) /* USCI_A */ 00134 #define TLV_PID_USCI_B (0x92) /* USCI_B */ 00135 #define TLV_PID_EUSCI_A (0x94) /* eUSCI_A */ 00136 #define TLV_PID_EUSCI_B (0x95) /* eUSCI_B */ 00137 #define TLV_PID_REF (0xA0) /* Shared Reference */ 00138 #define TLV_PID_COMP_B (0xA8) /* COMP_B */ 00139 #define TLV_PID_COMP_D (0xA9) /* COMP_D */ 00140 #define TLV_PID_USB (0x98) /* USB */ 00141 #define TLV_PID_LCD_B (0xB1) /* LCD_B */ 00142 #define TLV_PID_LCD_C (0xB2) /* LCD_C */ 00143 #define TLV_PID_DAC12_A (0xC0) /* DAC12_A */ 00144 #define TLV_PID_SD16_B_1 (0xC8) /* SD16_B 1 Channel */ 00145 #define TLV_PID_SD16_B_2 (0xC9) /* SD16_B 2 Channel */ 00146 #define TLV_PID_SD16_B_3 (0xCA) /* SD16_B 3 Channel */ 00147 #define TLV_PID_SD16_B_4 (0xCB) /* SD16_B 4 Channel */ 00148 #define TLV_PID_SD16_B_5 (0xCC) /* SD16_B 5 Channel */ 00149 #define TLV_PID_SD16_B_6 (0xCD) /* SD16_B 6 Channel */ 00150 #define TLV_PID_SD16_B_7 (0xCE) /* SD16_B 7 Channel */ 00151 #define TLV_PID_SD16_B_8 (0xCF) /* SD16_B 8 Channel */ 00152 #define TLV_PID_ADC12_A (0xD1) /* ADC12_A */ 00153 #define TLV_PID_ADC10_A (0xD3) /* ADC10_A */ 00154 #define TLV_PID_ADC10_B (0xD4) /* ADC10_B */ 00155 #define TLV_PID_SD16_A (0xD8) /* SD16_A */ 00156 #define TLV_PID_TI_BSL (0xFC) /* BSL */ 00157 //****************************************************************************** 00158 // Device Descriptors - Fixed Memory Locations 00159 //****************************************************************************** 00160 #define DEVICE_ID_0 (0x1A04) 00161 #define DEVICE_ID_1 (0x1A05) 00162 00163 //***************************************************************************** 00164 // 00165 //Prototypes for the APIs. 00166 // 00167 //***************************************************************************** 00168 extern void TLV_getInfo(unsigned char tag, 00169 unsigned char instance, 00170 unsigned char *length, 00171 unsigned int **data_address 00172 ); 00173 extern unsigned int TLV_getDeviceType(); 00174 extern unsigned int TLV_getMemory(unsigned char instance); 00175 extern unsigned int TLV_getPeripheral(unsigned char tag, 00176 unsigned char instance 00177 ); 00178 extern unsigned char TLV_getInterrupt(unsigned char tag); 00179 00180 #endif