PebbleOS v4.44.0-46-gef116268a
Loading...
Searching...
No Matches
SF32LB52 HXT48 trim

Crystal load capacitance trim from the factory configuration in the flash OTP area. More...

Data Structures

struct  pbl_sf32lb52_hxt
 Crystal trim device. More...
 

Macros

#define PBL_SF32LB52_HXT_DEFINE(sym, _name, _flash, ...)
 Define the crystal trim device.
 

Detailed Description

Crystal load capacitance trim from the factory configuration in the flash OTP area.

The SoC factory configuration is a list of records (one byte id, one byte length, data) in OTP cells the board names. The first crystal record found is applied to the 48 MHz crystal oscillator once the flash is up, before the radio core starts:

PBL_SF32LB52_HXT_DEFINE(s_hxt, "hxt", &s_flash.flash, "soc-config-user", "soc-config-cust");
#define PBL_SF32LB52_HXT_DEFINE(sym, _name, _flash,...)
Define the crystal trim device.
Definition hxt.h:50

Data Structure Documentation

◆ pbl_sf32lb52_hxt

struct pbl_sf32lb52_hxt

Crystal trim device.

Data Fields
const char *const * cells Names of the OTP cells holding it, in search order.
struct pbl_device dev Device, a child of the flash.
const struct pbl_flash * flash Flash holding the factory configuration.
uint8_t num_cells Number of cells.

Macro Definition Documentation

◆ PBL_SF32LB52_HXT_DEFINE

#define PBL_SF32LB52_HXT_DEFINE (   sym,
  _name,
  _flash,
  ... 
)
Value:
static const char *const sym##_cells[] = {__VA_ARGS__}; \
const struct pbl_sf32lb52_hxt sym = { \
.dev = PBL_DEVICE_INIT(sym, _name, pbl_sf32lb52_hxt_init, &(_flash)->dev, nullptr), \
.flash = (_flash), \
.cells = sym##_cells, \
.num_cells = sizeof(sym##_cells) / sizeof(sym##_cells[0]), \
}; \
PBL_DEVICE_REGISTER(sym, &sym.dev)
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:109
#define PBL_DEVICE_INIT(sym, _name, _init, _parent, _deps)
Initializer for the struct pbl_device of device instance sym.
Definition device.h:142
struct pbl_device dev
Device, a child of the flash.
Definition hxt.h:29
const char *const * cells
Names of the OTP cells holding it, in search order.
Definition hxt.h:33
uint8_t num_cells
Number of cells.
Definition hxt.h:35
Crystal trim device.
Definition hxt.h:27

Define the crystal trim device.

Parameters
symSymbol of the device.
_nameName.
_flashFlash, a struct pbl_flash.
...Names of the OTP cells holding the factory configuration, in search order.