27 #define DEFINE_MFG_TOKEN(name, type, address, ...) \
28 TOKEN_NEXT_ADDRESS(name,(address)) \
29 TOKEN_MFG(name, CREATOR_##name, 0, 0, type, 1, __VA_ARGS__)
48 #define CREATOR_MFG_CHIP_DATA 0xC344 // msb+'C'+'D'
49 #define CREATOR_MFG_PART_DATA 0xF064 // msb+'p'+'d'
50 #define CREATOR_MFG_TESTER_DATA 0xF464 // msb+'t'+'d'
51 #define CREATOR_MFG_ST_EUI_64 0xE545 // msb+'e'+'E'
52 #define CREATOR_MFG_ANALOG_TRIM_NORMAL 0xF46E // msb+'t'+'n'
53 #define CREATOR_MFG_ANALOG_TRIM_BOOST 0xF442 // msb+'t'+'B'
54 #define CREATOR_MFG_ANALOG_TRIM_BOTH 0xF462 // msb+'t'+'b'
55 #define CREATOR_MFG_REG_TRIM 0xF274 // msb+'r'+'t'
56 #define CREATOR_MFG_1V8_REG_VOLTAGE 0xF276 // msb+'r'+'v'
57 #define CREATOR_MFG_VREF_VOLTAGE 0xF676 // msb+'v'+'v'
58 #define CREATOR_MFG_TEMP_CAL 0xF463 // msb+'t'+'c'
59 #define CREATOR_MFG_FIB_VERSION 0xFF09
60 #define CREATOR_MFG_FIB_CHECKSUM 0xE663 // msb+'f'+'c'
61 #define CREATOR_MFG_FIB_OBS 0xE66F // msb+'f'+'o'
63 #define CREATOR_MFG_CIB_OBS 0xE36F // msb+'c'+'o'
64 #define CREATOR_MFG_CUSTOM_VERSION 0xC356
65 #define CREATOR_MFG_CUSTOM_EUI_64 0xE345
66 #define CREATOR_MFG_STRING 0xED73
67 #define CREATOR_MFG_BOARD_NAME 0xC24E // msb+'B'+'N' (Board Name)
68 #define CREATOR_MFG_EUI_64 0xB634
69 #define CREATOR_MFG_MANUF_ID 0xC944 // msb+'I'+'D' (Id)
70 #define CREATOR_MFG_PHY_CONFIG 0xD043 // msb+'P'+'C' (Phy Config)
71 #define CREATOR_MFG_BOOTLOAD_AES_KEY 0xC24B // msb+'B'+'K' (Bootloader Key)
72 #define CREATOR_MFG_EZSP_STORAGE 0xCD53
73 #define CREATOR_MFG_ASH_CONFIG 0xC143 // msb+'A'+'C' (ASH Config)
74 #define CREATOR_MFG_CBKE_DATA 0xC342 // msb+'C'+'B' (CBke)
75 #define CREATOR_MFG_INSTALLATION_CODE 0xC943 // msb+'I'+'C' (Installation Code)
76 #define CREATOR_MFG_OSC24M_BIAS_TRIM 0xB254 // msb+'2'+'T' (2[4mHz] Trim)
79 #define CURRENT_MFG_TOKEN_VERSION 0x01FE //MSB is version, LSB is complement
80 #define CURRENT_MFG_CUSTOM_VERSION 0x01FE //MSB is version, LSB is complement
83 #ifndef __MFG_TYPES_DEFINED__
84 #define __MFG_TYPES_DEFINED__
86 typedef int8u tokTypeMfgChipData[24];
87 typedef int8u tokTypeMfgPartData[6];
88 typedef int8u tokTypeMfgTesterData[6];
89 typedef int8u tokTypeMfgStEui64[8];
101 } tokTypeMfgAnalogueTrim;
108 } tokTypeMfgAnalogueTrimBoth;
113 typedef int16u tokTypeMfgRegVoltage1V8;
114 typedef int16u tokTypeMfgAdcVrefVoltage;
115 typedef int16u tokTypeMfgTempCal;
116 typedef int16u tokTypeMfgFibVersion;
117 typedef int16u tokTypeMfgFibChecksum;
135 typedef int16u tokTypeMfgCustomVersion;
136 typedef int8u tokTypeMfgCustomEui64[8];
137 typedef int8u tokTypeMfgString[16];
138 typedef int8u tokTypeMfgBoardName[16];
139 typedef int16u tokTypeMfgManufId;
140 typedef int16u tokTypeMfgPhyConfig;
141 typedef int8u tokTypeMfgBootloadAesKey[16];
142 typedef int8u tokTypeMfgEui64[8];
143 typedef int8u tokTypeMfgEzspStorage[8];
144 typedef int16u tokTypeMfgAshConfig;
146 int8u certificate[48];
147 int8u caPublicKey[22];
148 int8u privateKey[21];
152 } tokTypeMfgCbkeData;
164 } tokTypeMfgInstallationCode;
165 typedef int16u tokTypeMfgOsc24mBiasTrim;
166 #endif //__MFG_TYPES_DEFINED__
175 #define MFG_CHIP_DATA_LOCATION 0x077E // 24 bytes
176 #define MFG_PART_DATA_LOCATION 0x0796 // 6 bytes
177 #define MFG_TESTER_DATA_LOCATION 0x079C // 6 bytes
178 #define MFG_ST_EUI_64_LOCATION 0x07A2 // 8 bytes
179 #define MFG_ANALOG_TRIM_NORMAL_LOCATION 0x07AA // 20 bytes
180 #define MFG_ANALOG_TRIM_BOOST_LOCATION 0x07BE // 20 bytes
181 #define MFG_ANALOG_TRIM_BOTH_LOCATION 0x07D2 // 10 bytes
182 #define MFG_REG_TRIM_LOCATION 0x07DC // 2 bytes
183 #define MFG_1V8_REG_VOLTAGE_LOCATION 0x07DE // 2 bytes
184 #define MFG_VREF_VOLTAGE_LOCATION 0x07E0 // 2 bytes
185 #define MFG_TEMP_CAL_LOCATION 0x07E2 // 2 bytes
187 #define MFG_FIB_VERSION_LOCATION 0x07F4 // 2 bytes
188 #define MFG_FIB_CHECKSUM_LOCATION 0x07F6 // 2 bytes
189 #define MFG_FIB_OBS_LOCATION 0x07F8 // 8 bytes
191 #define MFG_CIB_OBS_LOCATION 0x0800 // 16 bytes
192 #define MFG_CUSTOM_VERSION_LOCATION 0x0810 // 2 bytes
193 #define MFG_CUSTOM_EUI_64_LOCATION 0x0812 // 8 bytes
194 #define MFG_STRING_LOCATION 0x081A // 16 bytes
195 #define MFG_BOARD_NAME_LOCATION 0x082A // 16 bytes
196 #define MFG_MANUF_ID_LOCATION 0x083A // 2 bytes
197 #define MFG_PHY_CONFIG_LOCATION 0x083C // 2 bytes
198 #define MFG_BOOTLOAD_AES_KEY_LOCATION 0x083E // 16 bytes
199 #define MFG_EZSP_STORAGE_LOCATION 0x084E // 8 bytes
200 #define MFG_ASH_CONFIG_LOCATION 0x0856 // 40 bytes
201 #define MFG_CBKE_DATA_LOCATION 0x087E // 92 bytes
202 #define MFG_INSTALLATION_CODE_LOCATION 0x08DA // 20 bytes
203 #define MFG_OSC24M_BIAS_TRIM_LOCATION 0x08EE // 2 bytes
206 #define MFG_EUI_64_LOCATION 0x8000 // Special Trigger - see token.c
209 #define MFG_ASH_CONFIG_ARRAY_SIZE 20
211 #ifndef TOKEN_NEXT_ADDRESS
212 #define TOKEN_NEXT_ADDRESS(region, address)
221 TOKEN_MFG(MFG_CHIP_DATA, CREATOR_MFG_CHIP_DATA,
222 0, 0, tokTypeMfgChipData, 1,
223 {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
224 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,
225 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF})
228 TOKEN_MFG(MFG_PART_DATA, CREATOR_MFG_PART_DATA,
229 0, 0, tokTypeMfgPartData, 1,
230 {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF})
233 TOKEN_MFG(MFG_TESTER_DATA, CREATOR_MFG_TESTER_DATA,
234 0, 0, tokTypeMfgTesterData, 1,
235 {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF})
238 TOKEN_MFG(MFG_ST_EUI_64, CREATOR_MFG_ST_EUI_64,
239 0, 0, tokTypeMfgStEui64, 1,
243 TOKEN_MFG(MFG_ANALOG_TRIM_NORMAL, CREATOR_MFG_ANALOG_TRIM_NORMAL,
244 0, 0, tokTypeMfgAnalogueTrim, 1,
245 {0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
246 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF})
249 TOKEN_MFG(MFG_ANALOG_TRIM_BOOST, CREATOR_MFG_ANALOG_TRIM_BOOST,
250 0, 0, tokTypeMfgAnalogueTrim, 1,
251 {0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,
252 0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF})
255 TOKEN_MFG(MFG_ANALOG_TRIM_BOTH, CREATOR_MFG_ANALOG_TRIM_BOTH,
256 0, 0, tokTypeMfgAnalogueTrimBoth, 1,
257 {0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF})
260 TOKEN_MFG(MFG_REG_TRIM, CREATOR_MFG_REG_TRIM,
261 0, 0, tokTypeMfgRegTrim, 1,
265 TOKEN_MFG(MFG_1V8_REG_VOLTAGE, CREATOR_MFG_1V8_REG_VOLTAGE,
266 0, 0, tokTypeMfgRegVoltage1V8, 1,
270 TOKEN_MFG(MFG_VREF_VOLTAGE, CREATOR_MFG_VREF_VOLTAGE,
271 0, 0, tokTypeMfgAdcVrefVoltage, 1,
275 TOKEN_MFG(MFG_TEMP_CAL, CREATOR_MFG_TEMP_CAL,
276 0, 0, tokTypeMfgTempCal, 1,
280 TOKEN_MFG(MFG_FIB_VERSION, CREATOR_MFG_FIB_VERSION,
281 0, 0, tokTypeMfgFibVersion, 1,
282 CURRENT_MFG_TOKEN_VERSION)
285 TOKEN_MFG(MFG_FIB_CHECKSUM, CREATOR_MFG_FIB_CHECKSUM,
286 0, 0, tokTypeMfgFibChecksum, 1,
290 TOKEN_MFG(MFG_FIB_OBS, CREATOR_MFG_FIB_OBS,
291 0, 0, tokTypeMfgFibObs, 1,
292 {0xFFFF,0x03FC,0xAA55,0xFFFF})
297 TOKEN_MFG(MFG_CIB_OBS, CREATOR_MFG_CIB_OBS,
298 0, 0, tokTypeMfgCibObs, 1,
299 {0x5AA5,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF,0xFFFF})
302 TOKEN_MFG(MFG_CUSTOM_VERSION, CREATOR_MFG_CUSTOM_VERSION,
303 0, 0, tokTypeMfgCustomVersion, 1,
304 CURRENT_MFG_CUSTOM_VERSION)
307 TOKEN_MFG(MFG_CUSTOM_EUI_64, CREATOR_MFG_CUSTOM_EUI_64,
308 0, 0, tokTypeMfgCustomEui64, 1,
312 TOKEN_MFG(MFG_STRING, CREATOR_MFG_STRING,
313 0, 0, tokTypeMfgString, 1,
317 TOKEN_MFG(MFG_BOARD_NAME, CREATOR_MFG_BOARD_NAME,
318 0, 0, tokTypeMfgBoardName, 1,
322 TOKEN_MFG(MFG_MANUF_ID, CREATOR_MFG_MANUF_ID,
323 0, 0, tokTypeMfgManufId, 1,
327 TOKEN_MFG(MFG_PHY_CONFIG, CREATOR_MFG_PHY_CONFIG,
328 0, 0, tokTypeMfgPhyConfig, 1,
332 TOKEN_MFG(MFG_BOOTLOAD_AES_KEY, CREATOR_MFG_BOOTLOAD_AES_KEY,
333 0, 0, tokTypeMfgBootloadAesKey, 1,
337 TOKEN_MFG(MFG_EZSP_STORAGE, CREATOR_MFG_EZSP_STORAGE,
338 0, 0, tokTypeMfgEzspStorage, 1,
339 { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF })
342 TOKEN_MFG(MFG_ASH_CONFIG, CREATOR_MFG_ASH_CONFIG,
343 0, 1, tokTypeMfgAshConfig, MFG_ASH_CONFIG_ARRAY_SIZE,
347 TOKEN_MFG(MFG_CBKE_DATA, CREATOR_MFG_CBKE_DATA,
348 0, 0, tokTypeMfgCbkeData, 1,
352 TOKEN_MFG(MFG_INSTALLATION_CODE, CREATOR_MFG_INSTALLATION_CODE,
353 0, 0, tokTypeMfgInstallationCode, 1,
357 TOKEN_MFG(MFG_OSC24M_BIAS_TRIM, CREATOR_MFG_OSC24M_BIAS_TRIM,
358 0, 0, tokTypeMfgOsc24mBiasTrim, 1,
362 TOKEN_MFG(MFG_EUI_64, CREATOR_MFG_EUI_64,
363 0, 0, tokTypeMfgEui64, 1,