|
PF1550 Driver 0.1.0
API reference
|
The PF1550 driver: everything it declares lives here; internals in detail.
More...
Namespaces | |
| namespace | reg |
| The PF1550 register map. | |
Classes | |
| struct | Acknowledgements |
| Explicit acknowledgements; every flag defaults to false. More... | |
| struct | BatfetConfig |
| The battery FET (Tables 156, 161, 171). More... | |
| struct | BuckConfig |
A buck regulator. apply = false leaves the block as the chip holds it. More... | |
| struct | Categories |
| Which category-summary bits are set in INT_CATEGORY (Table 89). More... | |
| struct | ChargerAsFound |
| Charger registers as found at start-up (the as-found check). More... | |
| struct | ChargerConfig |
The charger. apply = false leaves it as found. Voltage, current and input limit have no default: they must be set when apply is true. More... | |
| struct | ChargerInterrupts |
| Charger interrupt options (Table 167). More... | |
| struct | ChargerStatus |
The charger status of one ReadChargerStatus() pass (separate reads, not atomic). More... | |
| struct | CoinCell |
| The coin cell charger (Table 111). More... | |
| struct | Config |
| Everything the driver writes. The constructor stores it with no I/O. More... | |
| struct | CoreOffConfirm |
Token: the caller confirms that EnterCoreOff() turns the PMIC core off. More... | |
| struct | FaultPolicy |
| BATFET behaviour per fault; false opens the BATFET (the reset value, the safe one). More... | |
| class | I2cInterface |
| CRTP base of the platform I2C port. More... | |
| struct | InterruptEvents |
Interrupt events returned by ServiceInterrupts(), one status byte per group. More... | |
| struct | IrqLocation |
| Where one interrupt source lives. More... | |
| struct | IrqMask |
| Interrupt masks, one byte per group; a set bit masks the source. The default masks every source, as the chip does after power-up (section 9.4). More... | |
| struct | JeitaConfig |
| JEITA thresholds and reductions (Tables 162, 168). More... | |
| struct | LdoConfig |
| An LDO. More... | |
| struct | LedConfig |
| The charger LED driver (Tables 170 and 172). More... | |
| struct | Limits |
What the application's hardware tolerates. No defaults: Validate() rejects unset ones. More... | |
| struct | LoadSwitchConfirm |
Token: the caller confirms that a load switch has no current limit and cannot go back, and states the voltage of the LDO's input rail. The call refuses when that voltage is outside the rail's Limits window: in switch mode the output is the input voltage (section 7.2.6). More... | |
| struct | Microvolts |
| A voltage in microvolts, so that grids such as 12.5 mV steps stay exact. More... | |
| class | PF1550 |
| Driver for one PF1550 on a platform port. More... | |
| struct | PowerConfig |
| Power control (Tables 135 to 137). More... | |
| struct | PowerDownConfig |
The power-down order (Tables 139 to 145); needs power_down_order_reviewed. More... | |
| struct | PowerDownSequence |
| The registers of the power-down sequence (Tables 139 to 145). More... | |
| struct | RailLimits |
| The voltage window and load a rail's consumer tolerates. All zero means "not set". More... | |
| struct | RailModes |
| Per-state rail enables (EN, STBY_EN, OMODE, LPWR). More... | |
| struct | RailReadout |
| One rail as the chip holds it. More... | |
| struct | Result |
| The value of a call, or why there is none. More... | |
| struct | Result< void > |
| The result of a call that returns no value. More... | |
| struct | SelfCheckReport |
Result of SelfCheck(): what is wrong, if anything. More... | |
| struct | ShipConfirm |
Token: the caller confirms that EnterShip() cuts all supplies, VSNVS included. More... | |
| struct | Snapshot |
A read-only view of the chip for diagnostics (ReadSnapshot()). More... | |
| struct | StartupProfile |
| The start-up behaviour of one pre-programmed option (Table 85). More... | |
| struct | UsbPhyConfig |
| The USBPHY LDO (Table 165). More... | |
| struct | VariantInfo |
What ReadVariant() reports. More... | |
| struct | VbusFlags |
| VBUS flags of VBUS_SNS (Table 153). More... | |
| struct | VbusOptions |
| VBUS options (Tables 164, 166, 169). More... | |
| struct | VrefDdrConfig |
| VREFDDR. More... | |
| struct | VsnvsConfig |
| VSNVS. More... | |
| struct | WatchdogConfig |
The charger watchdog. When on, ServiceChargerWatchdog() must run every 16 s or less. More... | |
Concepts | |
| concept | I2cPort |
Satisfied by a class that derives from I2cInterface<Port> and implements the required hooks with exactly the types above, noexcept and returning bool. | |
Enumerations | |
| enum class | CtrlPin : uint8_t { Standby = 0 , Intb = 1 } |
Control pins the port may reach through the optional GpioSet() and GpioGet() hooks. More... | |
| enum class | GpioSignal : uint8_t { INACTIVE = 0 , ACTIVE = 1 } |
| Logical level of a control pin; the port maps it to the physical polarity. More... | |
| enum class | I2cFailure : uint8_t { None = 0 , AddressNack = 1 , DataNack = 2 , Bus = 3 } |
Why the last transfer failed, reported by the optional GetLastFailure() hook. More... | |
| enum class | Error : uint8_t { Error::Ok = 0 , Error::NotInitialized = 1 , Error::InvalidArgument = 2 , Error::Bus = 3 , Error::Timeout = 4 , Error::DeviceIdMismatch = 5 , Error::Crc = 6 , Error::Busy = 7 , Error::DeviceFault = 8 , Error::Unsupported = 9 , Error::OutOfLimits = 16 , Error::ReadOnlyRail = 17 , Error::Unsafe = 18 , Error::Refused = 19 , Error::ChargerFault = 20 , Error::VerifyFailed = 21 , Error::NoDevice = 22 , Error::DeviceReset = 23 } |
Why a call failed. Every call of the driver returns one of these in its Result. More... | |
| enum class | LogLevel : uint8_t { LogLevel::Error = 0 , LogLevel::Warning , LogLevel::Info , LogLevel::Debug } |
Severity passed to the optional Log() hook. More... | |
| enum class | Option : uint8_t { Option::A0 = 0 , Option::A1 = 1 , Option::A2 = 2 , Option::A3 = 3 , Option::A4 = 4 , Option::A5 = 5 , Option::A6 = 6 , Option::A7 = 7 , Option::A8 = 8 , Option::A9 = 9 , Option::Unknown = 10 } |
| The start-up option of the part (OTP_FLAVOR, Table 87; ordering codes A0 to A9). More... | |
| enum class | PowerState : uint8_t { PowerState::Wait = 0 , PowerState::Run = 1 , PowerState::Standby = 2 , PowerState::Sleep = 3 , PowerState::RegsDisable = 4 , PowerState::Unknown = 5 } |
| STATE_INFO decoded (Table 146). More... | |
| enum class | Rail : uint8_t { Rail::Sw1 = 0 , Rail::Sw2 = 1 , Rail::Sw3 = 2 , Rail::Ldo1 = 3 , Rail::Ldo2 = 4 , Rail::Ldo3 = 5 , Rail::VrefDdr = 6 } |
| The power rails the driver configures. More... | |
| enum class | Dvs : uint8_t { Dvs::Disabled = 0 , Dvs::Enabled = 1 } |
| Whether the OTP configured a buck for dynamic voltage scaling (OTP_SWx_DVS_SEL). More... | |
| enum class | SwCurrentLimit : uint8_t { SwCurrentLimit::A1p0 = 0 , SwCurrentLimit::A1p2 = 1 , SwCurrentLimit::A1p5 = 2 , SwCurrentLimit::A2p0 = 3 } |
| Buck current limit, typical (SWx_ILIM, Tables 116, 121, 126). More... | |
| enum class | DvsSpeed : uint8_t { DvsSpeed::Us2 = 0 , DvsSpeed::Us4 = 1 } |
| DVS slew rate (SWx_DVSSPEED). More... | |
| enum class | ChargerMode : uint8_t { ChargerMode::Off = 0 , ChargerMode::LinearOnly = 1 , ChargerMode::Charge = 2 } |
| Charger operating mode (CHG_OPER, Table 156). More... | |
| enum class | FastChargeTimer : uint8_t { FastChargeTimer::Disabled = 0 , FastChargeTimer::Hours2 = 1 , FastChargeTimer::Hours4 = 2 , FastChargeTimer::Hours6 = 3 , FastChargeTimer::Hours8 = 4 , FastChargeTimer::Hours10 = 5 , FastChargeTimer::Hours12 = 6 , FastChargeTimer::Hours14 = 7 } |
| Fast-charge timer (FCHGTIME, Table 157). More... | |
| enum class | EocTimer : uint8_t { EocTimer::Debounce16s = 0 , EocTimer::Min10 = 1 , EocTimer::Min20 = 2 , EocTimer::Min30 = 3 , EocTimer::Min40 = 4 , EocTimer::Min50 = 5 , EocTimer::Min60 = 6 , EocTimer::Min70 = 7 } |
| End-of-charge timer (EOCTIME, Table 157): 0 is a 16 s debounce, then 10 min steps. More... | |
| enum class | PrechargeTimer : uint8_t { PrechargeTimer::Min30 = 0 , PrechargeTimer::Min45 = 1 } |
| Precharge timer (TPRECHG, Table 157). More... | |
| enum class | Restart : uint8_t { Restart::Mv100 = 0 , Restart::Mv150 = 1 , Restart::Mv200 = 2 , Restart::Disabled = 3 } |
| Charge restart threshold below CHGCV (CHG_RESTART, Table 158). More... | |
| enum class | SystemMin : uint8_t { SystemMin::Mv3500 = 0 , SystemMin::Mv3700 = 1 , SystemMin::Mv4300 = 2 } |
| Minimum system voltage (VSYSMIN, Table 160). More... | |
| enum class | Thermistor : uint8_t { Thermistor::Ignore = 0 , Thermistor::Suspend = 1 , Thermistor::Jeita1 = 2 , Thermistor::Jeita2 = 3 } |
| Thermistor behaviour (THM_CNFG, Table 162). More... | |
| enum class | ThermalRegTemp : uint8_t { ThermalRegTemp::C80 = 0 , ThermalRegTemp::C95 = 1 , ThermalRegTemp::C110 = 2 } |
| Junction temperature where charge current folds back (REGTEMP, Table 162). More... | |
| enum class | WatchdogTime : uint8_t { WatchdogTime::S80 = 0 , WatchdogTime::S32 = 1 } |
| Charger watchdog period (WD_TIME, Table 161; the table prints 0 twice, ambiguity C8). More... | |
| enum class | BatfetOc : uint8_t { BatfetOc::Disabled = 0 , BatfetOc::A2p2 = 1 , BatfetOc::A2p8 = 2 , BatfetOc::A3p2 = 3 } |
| Battery discharge overcurrent threshold (BATFET_OC, Table 161). More... | |
| enum class | Cold : uint8_t { C0 = 0 , CMinus10 = 1 } |
| Cold threshold (THM_COLD). | |
| enum class | Hot : uint8_t { C60 = 0 , C55 = 1 } |
| Hot threshold (THM_HOT). | |
| enum class | Cool : uint8_t { C15 = 0 , C10 = 1 } |
| Cool threshold (THM_COOL). | |
| enum class | Warm : uint8_t { C45 = 0 , C50 = 1 } |
| Warm threshold (THM_WARM). | |
| enum class | CvAdjust : uint8_t { Mv60 = 0 , Mv100 = 1 , Mv160 = 2 , Mv200 = 3 } |
| JEITA charge voltage reduction (CV_ADJ, Table 168). | |
| enum class | CcAdjust : uint8_t { Pct25 = 0 , Pct50 = 1 , Pct75 = 2 , Pct100 = 3 } |
| JEITA charge current as a share of IFC (CC_ADJ, Table 168). | |
| enum class | DpmVoltage : uint8_t { DpmVoltage::Mv3900 = 0 , DpmVoltage::Mv4000 = 1 , DpmVoltage::Mv4100 = 2 , DpmVoltage::Mv4200 = 3 , DpmVoltage::Mv4300 = 4 , DpmVoltage::Mv4400 = 5 , DpmVoltage::Mv4500 = 6 , DpmVoltage::Mv4600 = 7 } |
| VBUS input regulation (DPM) voltage (VBUS_DPM_REG, Table 164): 3.9 V + 100 mV x code. More... | |
| enum class | DpmStop : uint8_t { Mv200 = 0 , Mv250 = 1 } |
| DPM panic stop threshold (VIN_DPM_STOP). | |
| enum class | ShortDebounce : uint8_t { ShortDebounce::Us100 = 0 , ShortDebounce::Ms1 = 1 , ShortDebounce::Ms10 = 2 } |
| Short debounce times (VBUS_OV_TDB, VBUS2SYS_TDB; code 0 is reserved and not offered). More... | |
| enum class | WakeupDelay : uint8_t { Ms8 = 0 , Ms16 = 1 , Ms32 = 2 , Ms100 = 3 } |
| System wake-up delay (SYS_WKUP_DLY, Table 166). | |
| enum class | Vbus2SysThreshold : uint8_t { Mv50 = 0 , Mv175 = 1 } |
| VBUS to VSYS comparator threshold (VBUS2SYS_THRSH). | |
| enum class | UsbPhyVoltage : uint8_t { V3p3 = 0 , V4p9 = 1 } |
| USBPHY LDO voltage (USBPHY, Table 165). | |
| enum class | LedFrequency : uint8_t { Hz1 = 0 , Hz0p5 = 1 , Hz256 = 2 , Hz8 = 3 } |
| LED PWM frequency (LED_FREQ, Table 172). | |
| enum class | LedMode : uint8_t { LedMode::OnWhileCharging = 0 , LedMode::FlashWhileCharging = 1 } |
| LED mode (LED_CFG). More... | |
| enum class | StandbyDelay : uint8_t { None = 0 , Cycles1 = 1 , Cycles2 = 2 , Cycles3 = 3 } |
| STANDBY pin delay in 32 kHz cycles (STANDBYDLY, Table 135). | |
| enum class | Debounce : uint8_t { Debounce::Ms31 = 0 , Debounce::Ms125 = 1 , Debounce::Ms750 = 2 } |
| Button debounce (PWRONDBNC, ONKEYDBNC; codes 00 and 01 are equal, ambiguity C41). More... | |
| enum class | GlobalReset : uint8_t { S4 = 0 , S8 = 1 , S12 = 2 , S16 = 3 } |
| ONKEY hold time for a global reset (TGRESET, Table 135). | |
| enum class | Uvdet : uint8_t { Mv2650 = 0 , Mv2800 = 1 , Mv3000 = 2 , Mv3100 = 3 } |
| VSYS undervoltage detect, rising threshold (UVDET, Table 137). | |
| enum class | LowSysWarn : uint8_t { Mv3300 = 0 , Mv3500 = 1 , Mv3700 = 2 , Mv3900 = 3 } |
| Low system voltage warning, rising threshold (LOW_SYS_WARN, Table 137). | |
| enum class | AsFoundPolicy : uint8_t { AsFoundPolicy::Report = 0 , AsFoundPolicy::MakeSafe = 1 } |
| What to do when the charger is found on and unsafe at start-up. More... | |
| enum class | ChargerState : uint8_t { ChargerState::Precharge = 0 , ChargerState::FastChargeCc = 1 , ChargerState::FastChargeCv = 2 , ChargerState::EndOfCharge = 3 , ChargerState::Done = 4 , ChargerState::TimerFault = 6 , ChargerState::ThermistorSuspend = 7 , ChargerState::Off = 8 , ChargerState::BatteryOvervoltage = 9 , ChargerState::ThermalShutdown = 10 , ChargerState::LinearOnly = 12 , ChargerState::Unknown = 255 } |
| Charger state (CHG_SNS[3:0], Table 154). More... | |
| enum class | BatteryState : uint8_t { BatteryState::NoValidVbus = 0 , BatteryState::BelowPrecharge = 1 , BatteryState::CannotChargePastPrecharge = 2 , BatteryState::AbovePrecharge = 4 , BatteryState::Overvoltage = 5 , BatteryState::NotDetected = 6 , BatteryState::Unknown = 255 } |
| Battery state (BATT_SNS[2:0], Table 155). More... | |
| enum class | Fault : uint8_t { Fault::None = 0 , Fault::TimerFault = 1 , Fault::ThermistorSuspend = 2 , Fault::ThermalShutdown = 3 , Fault::BatteryOvervoltage = 4 , Fault::BatteryOvercurrent = 5 , Fault::WatchdogExpired = 6 , Fault::BatteryMissing = 7 , Fault::UnknownState = 8 } |
| The fault the charger reports, classified from the state and flag registers. More... | |
| enum class | IrqGroup : uint8_t { IrqGroup::Charger = 0 , IrqGroup::SwLowSide = 1 , IrqGroup::SwHighSide = 2 , IrqGroup::SwDvs = 3 , IrqGroup::Ldo = 4 , IrqGroup::Temp = 5 , IrqGroup::Onkey = 6 , IrqGroup::Misc = 7 } |
| Interrupt groups, one status/mask/sense register triple each. More... | |
| enum class | IrqSource : uint8_t { IrqSource::ChgSupplement = 0 , IrqSource::ChgBat2Soc , IrqSource::ChgBattery , IrqSource::ChgCharger , IrqSource::ChgVbus , IrqSource::ChgVbusDpm , IrqSource::ChgThermistor , IrqSource::Sw1LowSideLimit , IrqSource::Sw2LowSideLimit , IrqSource::Sw3LowSideLimit , IrqSource::Sw1HighSideLimit , IrqSource::Sw2HighSideLimit , IrqSource::Sw3HighSideLimit , IrqSource::Sw1DvsDone , IrqSource::Sw2DvsDone , IrqSource::Ldo1Fault , IrqSource::Ldo2Fault , IrqSource::Ldo3Fault , IrqSource::Temp110 , IrqSource::Temp125 , IrqSource::OnkeyPush , IrqSource::Onkey1s , IrqSource::Onkey2s , IrqSource::Onkey3s , IrqSource::Onkey4s , IrqSource::Onkey8s , IrqSource::PowerUp , IrqSource::PowerDown , IrqSource::PwronChange , IrqSource::LowSysWarning , IrqSource::SysOvervoltage } |
| Every interrupt source of Tables 90 to 110 and 150 (31 sources). More... | |
Functions | |
| constexpr Result< uint8_t > | ChargeVoltageCode (uint32_t mv) noexcept |
| CHGCV code for a charge voltage. | |
| constexpr uint32_t | ChargeVoltageMv (uint32_t code) noexcept |
| The charge voltage a CHGCV code stands for. | |
| constexpr Result< uint8_t > | ChargeCurrentCode (uint32_t ma) noexcept |
| CHG_CC code for a charge current. | |
| constexpr Result< uint32_t > | ChargeCurrentMa (uint32_t code) noexcept |
| The current of a CHG_CC code. | |
| constexpr Result< uint8_t > | TerminationCode (uint32_t ma) noexcept |
| IEOC code for a termination current. | |
| constexpr Result< uint32_t > | TerminationMa (uint32_t code) noexcept |
| The termination current of an IEOC code. | |
| constexpr Result< uint8_t > | InputLimitCode (uint32_t ma) noexcept |
| VBUS_LIN_ILIM code for an input current limit. | |
| constexpr Result< uint32_t > | InputLimitMa (uint32_t code) noexcept |
| The limit of a VBUS_LIN_ILIM code. | |
| constexpr Result< uint8_t > | BuckDvsCode (uint32_t uv) noexcept |
| DVS-mode buck code for a voltage (SW1, SW2: 0.6 V + 12.5 mV x code). | |
| constexpr uint32_t | BuckDvsUv (uint32_t code) noexcept |
| The voltage of a DVS-mode buck code. | |
| constexpr uint32_t | BuckFixedUvOf (uint32_t code) noexcept |
| The voltage of a buck code in the non-DVS table (Table 31): codes 0 to 6, 3.3 V above. | |
| constexpr uint32_t | Sw3Uv (uint32_t code) noexcept |
| The voltage of an SW3 code (1.80 V + 100 mV x code, Table 37). | |
| constexpr Result< uint8_t > | LdoCode (Rail rail, uint32_t uv) noexcept |
| LDO voltage code. | |
| constexpr uint32_t | LdoUv (Rail rail, uint32_t code) noexcept |
| The voltage of an LDO code. | |
| constexpr Result< uint8_t > | CoinVoltageCode (uint32_t mv) noexcept |
| VCOIN code for a coin cell charge voltage (1.8 V + 100 mV x code, ambiguity C40). | |
| constexpr PowerState | DecodePowerState (uint32_t code) noexcept |
The 4-bit power-state code of STATE_INFO (Table 146) as a PowerState. | |
| constexpr Option | DecodeOption (uint32_t flavor) noexcept |
The option an OTP_FLAVOR byte names (Table 87 lists 0 to 3 and then "continues": a larger byte is Unknown, ambiguity C10, and the part's Table 85 profile is not assumed for it). | |
| constexpr Error | Validate (const Config &config) noexcept |
| Check a configuration without touching the chip. | |
| constexpr Limits | SingleCellLimits () noexcept |
A Limits for a 4.2 V single cell charged at up to 500 mA from a 1 A supply; a starting point whose numbers the application must check against its own cell and supply. | |
| constexpr uint8_t | CategoryBitsOf (IrqGroup group) noexcept |
| constexpr IrqLocation | LocationOf (IrqSource source) noexcept |
| constexpr bool | Has (const InterruptEvents &events, IrqSource source) noexcept |
| constexpr bool | IsFaultSource (IrqSource source) noexcept |
| constexpr bool | HasFault (const std::array< uint8_t, kIrqGroups > &status) noexcept |
| constexpr uint8_t | MaskByteFor (const IrqMask &mask, IrqGroup group) noexcept |
| template<std::size_t N> | |
| constexpr IrqMask | UnmaskOnly (const std::array< IrqSource, N > &sources) noexcept |
| constexpr Config | KconfigDefaults () noexcept |
The configuration menuconfig selected: the cell and supply Limits and the as-found policy, with every block left unapplied. | |
| constexpr Result< StartupProfile > | StartupProfileOf (Option option) noexcept |
| The pre-programmed start-up sequence of an option (Table 85). | |
| constexpr uint32_t | PowerUpDelayUs (const StartupProfile &profile, Rail rail) noexcept |
| When a rail turns on, counted from the start of the first power-up slot. | |
| constexpr uint32_t | PowerUpDurationUs (const StartupProfile &profile) noexcept |
| How long the power-up sequencer runs: the start of the last slot used. | |
| constexpr Result< uint32_t > | ResetReleaseDelayMs (uint32_t code) noexcept |
The delay of RESETBMCU after the last regulator, from POR_DLY[2:0] (Table 135). | |
| constexpr Result< uint32_t > | ColdStartToResetReleaseUs (const StartupProfile &profile, uint32_t por_dly_code) noexcept |
From a cold start to RESETBMCU high, for an option and a POR_DLY code (Table 84). | |
| constexpr bool | IsPowerDownBypassed (const PowerDownSequence &sequence) noexcept |
| Whether the power-down sequencer is bypassed: every order is 0 (section 10.7). | |
| constexpr uint32_t | PowerDownDelayUs (const PowerDownSequence &sequence, Rail rail) noexcept |
| When a rail turns off in a power-down, counted from the start of the sequence. | |
| constexpr uint32_t | PowerDownDurationUs (const PowerDownSequence &sequence) noexcept |
| How long the power-down sequence takes: the delay of the last rail. | |
| constexpr PowerDownSequence | MirrorOf (const StartupProfile &profile) noexcept |
The power-down order that mirrors the power-up order of an option, as the registers hold it after reset (section 10.7: SW1_PWRDN_SEQ = OTP_SW1_PWRUP_SEQ, and so on). | |
| constexpr const char * | ToString (Error error) noexcept |
| The name of an error, for logs. | |
| constexpr Microvolts | FromMillivolts (uint32_t mv) noexcept |
| Microvolts from millivolts. | |
| constexpr const char * | GetDriverVersion () noexcept |
| constexpr uint32_t | GetDriverVersionMajor () noexcept |
| constexpr uint32_t | GetDriverVersionMinor () noexcept |
| constexpr uint32_t | GetDriverVersionPatch () noexcept |
Variables | |
| constexpr uint32_t | kChargeVoltageMinMv = 3500 |
| Lowest charge voltage (CHGCV code 8), mV (Table 160). | |
| constexpr uint32_t | kChargeVoltageMaxMv = 4440 |
| Highest charge voltage (CHGCV code 55), mV. | |
| constexpr uint32_t | kChargeCurrentMinMa = 100 |
| Charge current range, mA (Table 159: codes 0 to 18). | |
| constexpr uint32_t | kChargeCurrentMaxMa = 1000 |
| Highest charge current, mA. | |
| constexpr uint32_t | kBuckDvsMinUv = 600000 |
| DVS buck lowest voltage, uV (Table 31). | |
| constexpr uint32_t | kBuckDvsStepUv = 12500 |
| DVS buck step, uV. | |
| constexpr std::size_t | kInputLimitCodes = 21 |
| Number of VBUS_LIN_ILIM codes the data sheet defines (Table 163). | |
| constexpr std::array< uint16_t, kInputLimitCodes > | kInputLimitMa |
| The VBUS_LIN_ILIM table, mA, indexed by code (Table 163, Table 58). | |
| constexpr std::array< uint32_t, 7 > | kBuckFixedUv |
| The fixed (DVS disabled) buck table, uV, codes 0 to 6; every code above is 3.3 V (Table 31). | |
| constexpr std::array< IrqLocation, kIrqSourceCount > | kIrqLocations |
The location of every source, indexed by IrqSource (Tables 90 to 110 and 150). | |
| constexpr std::array< uint8_t, kIrqGroups > | kIrqStatRegs |
The status register of each group, indexed by IrqGroup. | |
| constexpr std::array< uint8_t, kIrqGroups > | kIrqMaskRegs |
| The mask register of each group. | |
| constexpr std::array< uint8_t, kIrqGroups > | kIrqSenseRegs |
The sense register of each group (the charger's is CHG_INT_OK). | |
| constexpr std::array< uint8_t, kIrqGroups > | kIrqDefinedBits |
| The bits that carry a source in each group; the others are reserved and preserved. | |
| constexpr uint8_t | kCategoryCharger = 1U << 0 |
| INT_CATEGORY bit of a group's summary (the three SW groups share bits 1 to 3 by rail). | |
| constexpr uint8_t | kCategorySw = 0x0E |
| SW1_INT, SW2_INT and SW3_INT. | |
| constexpr uint8_t | kCategoryLdo = 1U << 4 |
| LDO_INT. | |
| constexpr uint8_t | kCategoryOnkey = 1U << 5 |
| ONKEY_INT. | |
| constexpr uint8_t | kCategoryTemp = 1U << 6 |
| TEMP_INT. | |
| constexpr uint8_t | kCategoryMisc = 1U << 7 |
| MISC_INT. | |
| constexpr uint32_t | kVsnvsTurnOnDelayUs = 600 |
| Turn-on delay of VSNVS after a cold start, microseconds (Table 84, tD1 typical 0.6 ms). | |
| constexpr uint32_t | kVsnvsRiseUs = 100 |
| Rise time of VSNVS, microseconds (tR1 typical 0.1 ms). | |
| constexpr uint32_t | kSlotFastUs = 500 |
Power-up slot with OTP_SEQ_CLK_SPEED = 0, microseconds (tD3 typical 0.5 ms). | |
| constexpr uint32_t | kSlotSlowUs = 2000 |
Power-up slot with OTP_SEQ_CLK_SPEED = 1, microseconds (tD3 typical 2.0 ms). | |
| constexpr uint32_t | kPowerDownStepUs = 2000 |
| Power-down delay between regulators, microseconds (tD5 typical 2.0 ms). | |
| constexpr uint8_t | kMaxSequenceNumber = 7 |
Largest sequence number a *_PWRUP_SEQ or *_PWRDN_SEQ field holds. | |
| constexpr uint8_t | kDefaultAddress = 0x08 |
| Default 7-bit I2C address (section 9.7.1); OTP selects 0x08 to 0x0F. | |
| constexpr uint32_t | kDvsWaitMaxUs = 256 |
| The longest the driver waits for one DVS step sequence, in microseconds (64 steps x 4 us). | |
| constexpr uint32_t | kWatchdogServiceMaxS = 16 |
| constexpr std::size_t | kIrqGroups = 8 |
| Number of interrupt groups. | |
| constexpr std::size_t | kRailCount = 7 |
| Number of rails. | |
| constexpr std::size_t | kIrqSourceCount = 31 |
| Number of interrupt sources. | |
Bus requirements | |
What the PF1550 needs from the I2C bus (datasheet sections 9.7.1, 9.7.2). A port and a board configuration check their settings against these with | |
| constexpr uint8_t | kI2cAddress = 0x08 |
| Default 7-bit I2C address (section 9.7.1). | |
| constexpr uint8_t | kMinI2cAddress = 0x08 |
Lowest address OTP can select (I2C_ADDR[2:0] = 000). | |
| constexpr uint8_t | kMaxI2cAddress = 0x0F |
Highest address OTP can select (I2C_ADDR[2:0] = 111). | |
| constexpr uint32_t | kMaxClockHz = 400'000 |
| Highest SCL frequency: fast mode (section 9.7.2). | |
| constexpr uint32_t | kMinEdgeNs = 20 |
| Shortest SCL and SDA rise and fall time the chip accepts, in nanoseconds (section 9.7). | |
| constexpr bool | kRepeatedStart = true |
true: a register read is a combined write-read with a repeated START (Figure 25). | |
The PF1550 driver: everything it declares lives here; internals in detail.
|
strong |
Control pins the port may reach through the optional GpioSet() and GpioGet() hooks.
|
strong |
|
strong |
Why the last transfer failed, reported by the optional GetLastFailure() hook.
|
constexprnoexcept |
The configuration menuconfig selected: the cell and supply Limits and the as-found policy, with every block left unapplied.
Config that Validate() accepts; rail windows are not set, so no rail is configurable until the application sets them.