Load capacitance trim of the 48 MHz crystal, from the SoC factory configuration in the flash OTP area.
More...
Load capacitance trim of the 48 MHz crystal, from the SoC factory configuration in the flash OTP area.
The configuration is a list of records (one byte id, one byte length, data) in the OTP cells given, searched in order. The first crystal record found is applied once the flash is up.
#define PBL_CLK_SF32LB52_HXT_DEFINE(sym, _name, _base, _flash,...)
Define the crystal trim.
Definition sf32lb52_hxt.h:54
◆ pbl_clk_sf32lb52_hxt
| struct pbl_clk_sf32lb52_hxt |
Crystal trim, a child of the flash holding the configuration.
| Data Fields |
|
uintptr_t |
base |
PMUC registers. |
|
const char *const * |
cells |
Names of the OTP cells holding it, in search order. |
|
struct pbl_device |
dev |
Device. |
|
const struct pbl_flash * |
flash |
Flash holding the configuration. |
|
uint8_t |
num_cells |
Number of cells. |
◆ PBL_CLK_SF32LB52_HXT_DEFINE
| #define PBL_CLK_SF32LB52_HXT_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_base, |
|
|
|
_flash, |
|
|
|
... |
|
) |
| |
Value:
static const char *const sym##_cells[] = {__VA_ARGS__}; \
PBL_DEVICE_REGISTER(sym##_inst, &sym##_inst.dev); \
.base = (_base), \
.cells = sym##_cells, \
}
const struct pbl_flash * flash
Flash holding the configuration.
Definition sf32lb52_hxt.h:34
struct pbl_device dev
Device.
Definition sf32lb52_hxt.h:30
Crystal trim, a child of the flash holding the configuration.
Definition sf32lb52_hxt.h:28
#define PBL_DEVICE_INIT(sym, _name, _init, _parent)
Initializer for the struct pbl_device of device instance sym.
Definition device.h:169
#define PBL_DEVICE_STATE_DEFINE(sym)
Define the runtime state of device instance sym.
Definition device.h:132
#define PBL_ARRAY_SIZE(array)
Get the number of elements of an array.
Definition size.h:40
A hardware device.
Definition device.h:90
Define the crystal trim.
- Parameters
-
| sym | Symbol of the device. |
| _name | Name. |
| _base | PMUC registers. |
| _flash | Flash, a struct pbl_flash. |
| ... | Names of the OTP cells holding the configuration, in search order. |