CC23x0R5DriverLibrary
hw_fcfg.h
Go to the documentation of this file.
1 /******************************************************************************
2 * Copyright (c) 2021-2023 Texas Instruments Incorporated. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * 1) Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 *
10 * 2) Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * 3) Neither the name of the copyright holder nor the names of its contributors
15 * may be used to endorse or promote products derived from this software
16 * without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 ******************************************************************************
30 * \file hw_fcfg.h
31 *
32 * \brief Factory Configuration (FCFG) header file.
33 ******************************************************************************/
34 #ifndef __HW_FCFG_H__
35 #define __HW_FCFG_H__
36 
37 #include <stdint.h>
38 #include "hw_device.h"
39 #include "hw_ccfg.h"
40 
41 // *** Define datatypes used in FCFG ***
42 
43 // \note Struct written to avoid automatic padding. Packing directives not needed
44 // \note Bitfields: lsb->msb, packing of similar base types, no word boundary crossing
45 typedef const struct {
46  // Critical Trim (done early in boot sequence or requires special handling)
47  struct { // [0]: length 64 B
48  // SRAM repair information (* hardcoded into ASM to be at offset 0, do not move! *)
49  struct { // length 28B
50  // Value SRAMREP_MAGICWORD tells SRAM repair in ASM that criticalTrim is valid
51  uint32_t magicWord;
52  // Number of bits to shift through SRAM repair chain (first 4b are read back)
53  uint8_t numBits;
54  // Data to shift through SRAM repair chain (MSB first, max 184b)
55  uint8_t data[23];
56  } sramRepair;
57  // HFOSC trim (CKMD.TRIM0)
58  struct { // length: 4B
59  union {
60  uint16_t val16;
61  struct {
62  uint16_t coarse : 5;
63  uint16_t cap : 4;
64  uint16_t bias : 5;
65  uint16_t res0 : 2;
66  };
67  } initial;
68  union {
69  uint16_t val16;
70  struct {
71  uint16_t coarse : 5;
72  uint16_t cap : 4;
73  uint16_t bias : 5;
74  uint16_t res0 : 2;
75  };
76  } final;
77  } hfoscTrim;
78  // Flash trims
79  struct { // length 16 B
80  // Flash 1T wait states (default: 2 WS trimmed)
81  struct { // length: 2B
82  uint8_t initial;
83  uint8_t final;
84  } flws1t;
85  // Flash 2T wait states (default: 5 WS untrimmed, 2 WS trimmed)
86  struct { // length: 2B
87  uint8_t initial;
88  uint8_t final;
89  } flws2t;
90  uint32_t ptrmc0;
91  uint32_t b0trmc1;
92  uint32_t b0trmc0;
93  } flashTrim;
94  // PMU trim: GLDO/BIAS/BGAP/DigLDO
95  struct { // length 8B
96  union {
97  uint32_t val32;
98  struct {
99  uint32_t vref : 4;
100  uint32_t vbg : 6;
101  uint32_t vddsbod : 5;
102  uint32_t bgtrimen : 1; // Latch vddsbod (0 initially, set to 1 in later trim steps)
103  uint32_t iref : 5;
104  uint32_t tsense : 2;
105  uint32_t spare : 1;
106  uint32_t vddrokhyst : 1;
107  uint32_t dissahyst : 1;
108  uint32_t gldocompdis: 1;
109  uint32_t gldodisana : 1;
110  uint32_t res0 : 4;
111  };
112  } timmute0;
113  union {
114  uint32_t val32;
115  struct {
116  uint32_t vddr : 5;
117  uint32_t vddrsl : 5;
118  uint32_t iptat : 2;
119  uint32_t bod : 4;
120  uint32_t udig : 4;
121  uint32_t dig : 4;
122  uint32_t coarse : 4;
123  uint32_t delta : 3;
124  uint32_t res0 : 1;
125  };
126  } timmute1;
127  } pmuTrim;
128  // Systick reload value that determines minimum time for each trim step in clock cycles
130  // Flag to control whether BOD reset is disabled during VDDR/BGAP trim stepping
131  uint8_t disableBodDuringTrim : 1;
132  // Settling delay after VDDR/BGAP = enableBodDelaySteps*sysTickRvrTrimStep+1 clock cycles
133  uint8_t enableBodDelaySteps : 5;
134  uint8_t res0 : 2;
135  // Flash verify waitstates
136  uint8_t flashVerifyWaitStates : 4;
137  uint8_t res2 : 4;
138  // Padding to get record size to multiple of 16 B
139  uint8_t res1[1];
140  // CRC32 integrity check critical trim
141  uint32_t crc32;
142  } criticalTrim;
143 
144  // Paperspin options [64]: length 8 B
145  // Defines peripheral/feature availability and accessible memory
146  uint32_t hwOpts[2];
147 
148 
149  // Device permissions [72]: length 4 B
150  // This is maximally-restrictive combined with similar field in CCFG
151  struct {
152  #define FCFG_PERMISSION_ALLOW 0xA
153  #define FCFG_PERMISSION_FORBID 0x0
154  // (all other value other than ALLOW are interpreted as FORBID)
155  uint32_t allowReturnToFactory : 4;
156  uint32_t allowFakeStby : 4;
157  uint32_t allowToolsClientMode : 4;
158  uint32_t allowChipErase : 4;
159  uint32_t allowFlashProgram : 4;
160  uint32_t allowFlashVerify : 4;
161  uint32_t allowEnergyTrace : 4;
162  uint32_t allowDebugPort : 4;
163  } permissions;
164 
165 
166  // Miscellaneous fields
167  // [76]: length 4B
168  struct {
169  // SACI timeout is infinite when 0, else (2^saciTimeoutExp)*64 ms
170  // Ccfg timeout applied instead if CCfg.saciTimeoutOverride==1
171  uint32_t saciTimeoutExp : 3;
172  #define XCFG_MISC_SACITOEXP_8SEC 7
173  #define XCFG_MISC_SACITOEXP_1SEC 4
174  #define XCFG_MISC_SACITOEXP_INFINITE 0
175  uint32_t res0 : 29;
176  } misc;
177 
178 
179  // Device information
180  struct { // [80]: length 48B
181  // 64b device-unique UUID (non-sequential across parts)
182  uint8_t uuid[8];
183  // 48b device-unique BLE address
184  uint8_t bleAddr[6];
185  // Padding
186  uint8_t res0[2];
187  // 64b device-unique IEEE MAC address
188  uint8_t macAddr[8];
189  // 128b die identifier (lot #, wafer #, die X/Y, date, etc)
190  uint8_t dieId[16];
191  // Padding (previously devId but this HW-defined value is now readable through an MMR)
192  uint32_t res1;
193  // 32b PARTID (Part/Variant/majRev/minorRev)
194  union {
195  uint32_t val32;
196  struct {
197  // Random bit pattern to uniquely identify part (with devId)
198  uint32_t part : 16;
199  // Random bit pattern to uniquely identify package/memory variant
200  uint32_t variant : 8;
201  // Minor revision for orderable part (starts at 0)
202  uint32_t minorRev : 4;
203  // Major revision for orderable part: PCB/SW change (starts at 1)
204  uint32_t majorRev : 3;
205  // 0: partId not yet valid; 1: partId valid
206  uint32_t partIdValid : 1;
207  };
208  } partId;
209  } deviceInfo;
210 
211 
212  // Flash protection [128]: length 16 B
213  // This is maximally-restrictive combined with similar field in CCFG
214  struct {
215  struct {
216  // Sticky-0 bits written to VIMS.WEPRA (sectors 0-31, 1/bit)
217  uint32_t mainSectors0_31;
218  union {
219  // Sticky-0 bits written to VIMS.WEPRB(0) (sectors 32-255, 8/bit)
221  // Dummy symbol to allow code to remain the same across devices
223  };
224  // Sticky-0 bit written to VIMS.WEPRAUX
225  union {
226  uint32_t auxSectors;
227  struct {
228  uint32_t ccfgSector : 1;
229  uint32_t fcfgSector : 1;
230  uint32_t engrSector : 1;
231  uint32_t res1 : 29;
232  };
233  };
234  } writeEraseProt;
235  uint32_t res;
236  } flashProt;
237 
238  // *******************************************************
239  // *** General Trims (copy list format) ***
240  // *******************************************************
241  // [144]: (152 words in 128b flash, 40 words in 64b flash)
242  uint32_t generalTrims[FCFG_GENERALTRIMS_SIZE];
243  // Simple macros to assist in initializing copy lists
244  // NOTE: Addresses to CPYLIST_CPY must fulfill (a & 0x0FF00003) == 3.
245  // The memory map ensures this for SRAM and peripherals.
246  // There is no check as ELF only supports {symbol + const offset}
247  #define CPYLST_EOL 0
248  #define CPYLST_NOP 0x10000000
249  #define CPYLST_WAIT(x) ( 0x10000000 + (((x)<<2)&0x000FFFFC) )
250  #define CPYLST_CPY(a, n) ( ((uint32_t)(a)) + (((n)<<20)&0x0FF00000) )
251  #define CPYLST_CPYFULLADDR(a) (((uint32_t)(a)) + 1)
252  #define CPYLST_JUMP(a) (((uint32_t)(a)) + 2)
253  #define CPYLST_CALL(a) (((uint32_t)(a)) + 3)
254 
255 
256  // *******************************************************
257  // *** Extended Application Trims ***
258  // *******************************************************
259  // Extended application trims. (not referenced in any way by ROM)
260  // [End-272]: length 64B
262  struct appTrimsExtCc23x0r5_s { // length: 64B
263  // Unused space
264  uint8_t res[40];
265  struct { // length: 4B
266  // Measured value on 1.8V for ODP core NMOS IDSAT
267  uint16_t odpNmos;
268  // Measured value on 1.8V for ODP core PMOS IDSAT
269  uint16_t odpPmos;
270  } odpVal1p8v;
271  struct { // length: 4B
272  // Measured value on 1.2V for ODP core NMOS IDSAT
273  uint16_t odpNmos;
274  // Measured value on 1.2V for ODP core PMOS IDSAT
275  uint16_t odpPmos;
276  } odpVal1p2v;
277  // Value for the FWT MP production program revision
278  struct { // length: 4B
279  uint32_t revBranch : 4;
280  uint32_t revPatch : 8;
281  uint32_t revMinor : 8;
282  uint32_t revMajor : 6;
283  uint32_t variantCode : 6;
284  } tfwMp;
285  // Value for the FWT FT production program revision
286  struct { // length: 4B
287  uint32_t revBranch : 4;
288  uint32_t revPatch : 8;
289  uint32_t revMinor : 8;
290  uint32_t revMajor : 6;
291  uint32_t variantCode : 6;
292  } tfwFt;
293  // Value for the MP production test program revision
294  struct { // length 4B
295  uint32_t mp1Rev : 8;
296  uint32_t mp2Rev : 8;
297  uint32_t mp3Rev : 8;
298  uint32_t res : 8;
299  } ateMpRev;
300  // Value for the FT production test program revision
301  struct { // length 4B
302  uint32_t ft1Rev : 8;
303  uint32_t ft2Rev : 8;
304  uint32_t ft3Rev : 8;
305  uint32_t trimState : 8;
306  } ateFtRev;
307  } cc23x0r5;
308  } appTrimsExt;
309 
310 
311  // *******************************************************
312  // *** Application Trims ***
313  // *******************************************************
314  // Application trims (individual fields are not referenced
315  // by ROM). Note that the Application Trims section is
316  // copied to SRAM by the SACI command SC_MODE_REQ_TOOLS_CLIENT.
317  // [End-208]: length 128B for non BLE High devices
318  // [End-256]: length 128B for BLE High devices
320  // Revision of appTrims (defines layout)
321  uint8_t revision;
322  // Offset range to copy to SRAM in tools client mode to appTrims-n*16B.
324  // Pad to 32b alignment
325  uint8_t res[2];
326 
327  // Different device-specific application trim records
328  // TODO: Finalize appTrim for BLE High (LPRFROM-743)
329  // TODO: Finalize appTrim for BLE Low (LPRFROM-846)
330  struct appTrimsCc23x0_s { // length: 124B
331  // Trim value for LRFDRFE:PA0.TRIM
332  struct { // length: 2B
333  uint16_t trim : 5;
334  uint16_t zero : 11;
335  } pa0;
336  // Trim value for LRFDRFE:ATSTREFH.IREFTRIM
337  struct { // length: 2B
338  uint16_t zero0 : 10;
339  uint16_t irefTrim : 5;
340  uint16_t zero1 : 1;
341  } atstRefH;
342  // Trim value for LRFDRFE:LNA.TRIM
343  struct { // length: 2B
344  uint16_t zero0 : 4;
345  uint16_t trim : 4;
346  uint16_t zero1 : 8;
347  } lna;
348  // Trim value for LRFDRFE:IFAMPRFLDO.TRIM
349  struct { // length: 2B
350  uint16_t zero : 9;
351  uint16_t trim : 7;
352  } ifampRfLdo;
353  // Trim value for LRFDRFE:DIVLDO.VOUTTRIM
354  struct { // length: 2B
355  uint16_t zero0 : 8;
356  uint16_t voutTrim : 7;
357  uint16_t zero1 : 1;
358  } divLdo;
359  // Trim value for LRFDRFE:TDCLDO.VOUTTRIM
360  struct { // length: 2B
361  uint16_t zero0 : 8;
362  uint16_t voutTrim : 7;
363  uint16_t zero1 : 1;
364  } tdcLdo;
365  // Trim values for LRFDRFE:DCOLDO0
366  struct { // length: 2B
367  uint16_t zero0 : 4;
368  uint16_t firstTrim : 4;
369  uint16_t secondTrim : 6;
370  uint16_t zero1 : 2;
371  } dcoLdo0;
372  // Trim value for LRFDRFE:IFADCALDO.TRIMOUT
373  struct { // length: 2B
374  uint16_t zero0 : 8;
375  uint16_t trimout : 6;
376  uint16_t zero1 : 2;
377  } ifadcAldo;
378  // Trim value for LRFDRFE:IFADCDLDO.TRIMOUT
379  struct { // length: 2B
380  uint16_t zero0 : 8;
381  uint16_t trimout : 6;
382  uint16_t zero1 : 2;
383  } ifadcDldo;
384  // Trim value for LRFDRFE:DCO.TAILRESTRIM
385  struct { // length: 2B
386  uint16_t zero0 : 3;
387  uint16_t tailresTrim : 4;
388  uint16_t zero1 : 9;
389  } dco;
390  // Trim value for LRFDRFE:IFADCQUANT.QUANTTHR
391  struct { // length: 2B
392  uint16_t quantThr : 3;
393  uint16_t zero : 13;
394  } ifadcQuant;
395  // Trim values for LRFDRFE:IFADC0
396  struct { // length: 2B
397  uint16_t zero0 : 2;
398  uint16_t aafcap : 2;
399  uint16_t int2Adj : 4;
400  uint16_t zero1 : 2;
401  uint16_t ditheren : 2;
402  uint16_t dithertrim : 3;
403  uint16_t zero2 : 1;
404  } ifadc0;
405  // Trim value for LRFDRFE:IFADC1.TRIM
406  struct { // length: 2B
407  uint16_t zero0 : 9;
408  uint16_t trim : 6;
409  uint16_t zero1 : 1;
410  } ifadc1;
411  // Trim values for LRFDRFE:IFADCLF
412  struct { // length: 2B
413  uint16_t int3 : 4;
414  uint16_t ff1 : 4;
415  uint16_t ff2 : 4;
416  uint16_t ff3 : 4;
417  } ifadclf;
418  // Trim value for LRFDRFE:IFADCQUANT.QUANTTHR high-bandwidth
419  struct { // length: 2B
420  uint16_t quantThr : 3;
421  uint16_t zero : 13;
422  } ifadcQuantWbw;
423  // Trim values for LRFDRFE:IFADC0 high-bandwidth
424  struct { // length: 2B
425  uint16_t zero0 : 2;
426  uint16_t aafcap : 2;
427  uint16_t int2Adj : 4;
428  uint16_t zero1 : 2;
429  uint16_t ditheren : 2;
430  uint16_t dithertrim : 3;
431  uint16_t zero2 : 1;
432  } ifadc0Wbw;
433  // Trim value for LRFDRFE:IFADC1.TRIM high-bandwidth
434  struct { // length: 2B
435  uint16_t zero0 : 9;
436  uint16_t trim : 6;
437  uint16_t zero1 : 1;
438  } ifadc1Wbw;
439  // Trim values for LRFDRFE:IFADCLF high-bandwidth
440  struct { // length: 2B
441  uint16_t int3 : 4;
442  uint16_t ff1 : 4;
443  uint16_t ff2 : 4;
444  uint16_t ff3 : 4;
445  } ifadclfWbw;
446  // Trim values for RTRIM, synth LDO and HFXT Peak Detector
447  struct {
448  // RTRIM Min Offset.
449  // Value represents the positive offset in RTRIM at -40 vs 25C. The calculated trim
450  // adjustment will be added to nominal trim when temperature crosses -40 +TTHRL x 2^k.
451  uint32_t rtrimMinOffset : 2;
452  // RTRIM Max Offset.
453  // Value represents the positive offset in RTRIM at 125C vs 25C. The calculated trim adjustment
454  // will be added to nominal trim when temperature crosses 125 - TTHRH x 2^k.
455  uint32_t rtrimMaxOffset : 2;
456  // DIVLDO Min Offset.
457  // Value represents 0, 10 (50mV), 20 (100mV), or 30 (150mV) positive trim LSB offset at -40 as
458  // compared to 25C. The calculated trim adjustment will be added to nominal trim when temperature
459  // crosses -40 + TTHRL x 2^k.
460  uint32_t divLdoMinOffset : 2;
461  // DIVLDO Max Offset.
462  // Value represents 0, 10 (50mV), 20 (100mV), or 30 (150mV) positive trim LSB offset at 125C as
463  // compared to 25C. The calculated trim adjustment will be added to nominal trim when temperature
464  // crosses 125 - TTHRH x 2^k.
465  uint32_t divLdoMaxOffset : 2;
466  // TDCLDO Min Offset.
467  // Value represents 0, 10 (50mV), 20 (100mV), or 30 (150mV) positive trim LSB offset at -40 as
468  // compared to 25C. The calculated trim adjustment will be added to nominal trim when temperature
469  // crosses -40 + TTHRL x 2^k.
470  uint32_t tdcLdoMinOffset : 2;
471  // TDCLDO Max Offset.
472  // Value represents 0, 10 (50mV), 20 (100mV), or 30 (150mV) positive trim LSB offset at 125C as
473  // compared to 25C. The calculated trim adjustment will be added to nominal trim when temperature
474  // crosses 125 - TTHRH x 2^k.
475  uint32_t tdcLdoMaxOffset : 2;
476  // Temperature Threshold Low.
477  // Value sets the temperature threshold for correction as -40C + x * 2^k, where k is TBD.
478  // At temperatures below the threshold, a nominal trim value will be adjusted.
479  uint32_t tThrl : 2;
480  // Temperature Threshold High.
481  // Value sets the temperature threshold for correction as -40C + x * 2^k, where k is TBD.
482  // At temperatures above the threshold, a nominal trim value will be adjusted.
483  uint32_t tThrh : 2;
484  // Peak detector variation measured in production
485  uint32_t hfxtPdError : 8;
486  // Reserved
487  uint32_t res : 8;
488  } lrfdrfeExtTrim1;
489  // Trim values for adjusting AGC and RSSI
490  struct {
491  // RSSI offset temperature compensation.
492  // The COMP is added to RSSIOFFSET before programming RSSI offset to HW register.
493  // Use for all PHYs.
494  // Max compensation at 125C is -6 to +5.5 dB. Max compensation at -40C is -3.5 to 4 dB.
495  // Add to LRFDRFE:RSSIOFFSET.
496  // Formula: COMP = (temp-25)*signed(RSSITCOMP)/128
497  uint32_t rssiTcomp : 4;
498  // AGC magn target temperature compensation.
499  // The COMP is added to MAGN target before programming HW register (SPARE<x>).
500  // Use for PHYs using the generic AGC.
501  // Max compensation at 125C is -6 to +5.5 dB. Max compensation at -40C is -3.5 to 4 dB.
502  // Add to LRFDRFE:SPARE<x>.
503  // Formula: COMP = (temp-25)*signed(magnTcomp)/128
504  uint32_t magnTcomp : 4;
505  // Fab dependent offset to add to AGC magnitude target (SPARE<x>).
506  // Use for PHYs using the generic AGC. Add to LRFDRFE:SPARE<x>.
507  // Formula: COMP = signed(magnOffset)
508  uint32_t magnOffset : 4;
509  // Reserved
510  uint32_t rfu : 4;
511  // AGC threshold temperature compensation.
512  // The COMP is added to AGC threshold before programming HW register (SPARE<x>).
513  // Use for PHYs with fast AGC (high gain / low gain type).
514  // Formula: COMP = (temp-25)*signed(agcThrTcomp)/128
515  uint32_t agcThrTcomp : 4;
516  // Fab dependent offset to add to AGC threshold target.
517  // Use for PHYs with fast AGC (high gain / low gain type).
518  // Add to LRFDRFE:SPARE<x>.
519  // Formula: COMP = signed(agcThrOffset)
520  uint32_t agcThrOffset : 4;
521  // Adjust the low gain setting with this signed number.
522  // Use for PHYs with fast AGC (high gain / low gain type).
523  // Add to LRFDRFE:SPARE0[3:0], check for overflow/underflow.
524  // Formula: COMP = signed(lowGainOffset)
525  uint32_t lowGainOffset : 4;
526  // Adjust the high gain setting with this signed number.
527  // Use for PHYs with fast AGC (high gain / low gain type).
528  // Add to LRFDRFE:SPARE0[7:4], check for overflow/underflow.
529  // Formula: COMP = signed(lowGainOffset)
530  uint32_t highGainOffset : 4;
531  } lrfdrfeExtTrim0;
532  // Trim values for front end 0
533  struct { // length: 2B
534  // RSSI measured for front end 0 in production test.
535  // Value is read by RF Core FW during RF Core initialization
536  uint16_t offset : 8;
537  uint16_t trimCompleteN : 1;
538  uint16_t zero : 7;
539  } fend0Rssi;
540  // Trim values for synth divider 0
541  struct { // length: 2B
542  // Trim value for IQ mismatch compensation.
543  // Value is read by RF Core FW during RF Core initialization
544  uint16_t iqmc : 16;
545  } syntDiv0;
546  // Unused space
547  uint8_t res1[2];
548  // Trim values for LRFDRFE:IFAMP.AAFCAP
549  struct { // length: 1B
550  uint8_t zero : 4;
551  uint8_t aafcap : 4;
552  } ifamprfldo;
553  // Trim values for LRFDRFE:IFAMP.AAFCAP high-bandwidth
554  struct { // length: 1B
555  uint8_t zero : 4;
556  uint8_t aafcap : 4;
557  } ifamprfldoWbw;
558  // Trim value for AUX Diode voltage at 30C
559  struct { // length: 4B
560  uint16_t auxDiodeGnd;
561  uint16_t auxDiodeVoltage;
562  } auxDiodeCal30C;
563  // Trim value for AUX Diode voltage at 125C
564  struct { // length: 4B
565  uint16_t auxDiodeGnd;
566  uint16_t auxDiodeVoltage;
567  } auxDiodeCal125C;
568  // Unused space
569  uint8_t res2[20];
570  // ADC offset for four modes
571  struct { // length: 4B
572  uint32_t adcOffsetVdds : 8;
573  uint32_t adcOffsetExtref : 8;
574  uint32_t adcOffsetIntref2P5V : 8;
575  uint32_t adcOffsetIntref1P4V : 8;
576  } adcOffset;
577  // ADC gain for VDDS and Extref modes
578  struct { // length: 4B
579  uint32_t adcGainVdds : 16;
580  uint32_t adcGainExtref : 16;
581  } adcGainWord0;
582  // ADC gain for Intref 2.5V and Intref 1.4V modes
583  struct { // length: 4B
584  uint32_t adcGainIntref2P5V : 16;
585  uint32_t adcGainIntref1P4V : 16;
586  } adcGainWord1;
587  // Unused space
588  uint8_t res3[28];
589  // Measured I2V resistor error values
590  struct { // length: 4B
591  uint32_t i2v20k : 8;
592  uint32_t i2v50k : 8;
593  uint32_t i2v100k : 8;
594  uint32_t i2v1m : 8;
595  } i2vCompact;
596  } cc23x0r5;
597  } appTrims;
598 
599  // Bootloader configuration
600  struct { // [End-80]: length 8B
601  // Pointer to default bootloader VTOR table
602  void *pBldrVtor;
603  #define XCFG_BC_PBLDR_FORBID ((void*)0xFFFFFFFC)
604  #define XCFG_BC_PBLDR_UNDEF ((void*)0xFFFFFFFF)
605  #define FCFG_BC_PBLDR_VALID(x) ((x) < XCFG_BC_PBLDR_FORBID)
606  // Parameter passed to bootloader
607  union {
608  uint32_t val32;
609  // Serial ROM bootloader parameters (defined in CCFG.h)
611  } bldrParam;
612  } bootCfg;
613 
614 
615  // Reserved/padding to get 16 B alignment
616  // [End-72] length: 4B
617  uint32_t res1;
618 
619 
620  // CRC across hwOpts through res1 (after criticalTrim to here)
621  // [End-68]: length 4B
622  uint32_t crc32;
623 
624  // Lifecycle management
625  struct { // [End-64]: length 16B
626  // 128b field updated incrementally (32b at a time) as lifecycle increments
627  uint32_t states[4];
628  // SET => 32b word has a value within a Hamming distance <=1 of (FCFG_SET32)
629  // UNSET => all others (2T erased state is random)
630  #define FCFG_SET32 0x41008002
631  #define FCFG_UNSET32 0x41FFFFFF
632  // Lifecycle BDAY1ST: FA unlock key integrity check fails
633  // Other lifecycles: FA unlock key integrity check OK + states words as below
634  #define FCFG_LC_TESTPT {FCFG_UNSET32, FCFG_UNSET32, FCFG_UNSET32, FCFG_UNSET32}
635  #define FCFG_LC_TESTFT {FCFG_SET32, FCFG_UNSET32, FCFG_UNSET32, FCFG_UNSET32}
636  #define FCFG_LC_ENGRDEV {FCFG_SET32, FCFG_SET32, FCFG_UNSET32, FCFG_UNSET32}
637  #define FCFG_LC_PRODDEV {FCFG_SET32, FCFG_SET32, FCFG_SET32, FCFG_UNSET32}
638  #define FCFG_LC_RETEST {FCFG_SET32, FCFG_SET32, FCFG_SET32, FCFG_SET32}
639  } lifecycle;
640 } fcfg_t;
641 
642 /* \brief Define to access FCFG struct pointer from application code.
643  * This definition can be used to access member elements with the `->`
644  * operator.
645  */
646 #define fcfg ((fcfg_t *)FCFG_BASE)
647 
648 #endif // __HW_FCFG_H__
uint16_t auxDiodeVoltage
Definition: hw_fcfg.h:561
uint8_t initial
Definition: hw_fcfg.h:82
#define FCFG_GENERALTRIMS_SIZE
Size of generalTrims section in FCFG, in number of 32-bit words.
Definition: hw_device.h:58
uint32_t res
Definition: hw_fcfg.h:235
struct serialRomBldrParam_struct serialRomBldrParam_t
Definition: hw_ccfg.h:225
uint8_t numBits
Definition: hw_fcfg.h:53
uint8_t nToolsClientOffset
Definition: hw_fcfg.h:323
uint32_t crc32
Definition: hw_fcfg.h:141
Definition: hw_fcfg.h:261
uint32_t magicWord
Definition: hw_fcfg.h:51
uint32_t mainSectors0_31
Definition: hw_fcfg.h:217
uint32_t auxSectors
Definition: hw_fcfg.h:226
uint32_t val32
Definition: hw_fcfg.h:97
uint8_t revision
Definition: hw_fcfg.h:321
Definition: hw_fcfg.h:319
uint16_t auxDiodeGnd
Definition: hw_fcfg.h:560
uint32_t b0trmc0
Definition: hw_fcfg.h:92
uint32_t mainSectors256_511
Definition: hw_fcfg.h:222
uint8_t sysTickRvrTrimStep
Definition: hw_fcfg.h:129
uint16_t val16
Definition: hw_fcfg.h:60
uint32_t mainSectors32_255
Definition: hw_fcfg.h:220
Definition: hw_fcfg.h:45
uint32_t res1
Definition: hw_fcfg.h:192
uint16_t odpNmos
Definition: hw_fcfg.h:267
uint32_t ptrmc0
Definition: hw_fcfg.h:90
uint16_t odpPmos
Definition: hw_fcfg.h:269
uint32_t b0trmc1
Definition: hw_fcfg.h:91
void * pBldrVtor
Definition: hw_fcfg.h:602
serialRomBldrParam_t params
Definition: hw_fcfg.h:610