PF1550 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
pf1550_config.hpp File Reference

PF1550 configuration: the application's Limits, its explicit acknowledgements, the typed configuration of every block and Validate(). More...

#include <array>
#include <cstddef>
#include <cstdint>
#include "pf1550_codec.hpp"
#include "pf1550_detail.hpp"
#include "pf1550_sequencer.hpp"
#include "pf1550_types.hpp"

Go to the source code of this file.

Classes

struct  pf1550::RailLimits
 The voltage window and load a rail's consumer tolerates. All zero means "not set". More...
 
struct  pf1550::Limits
 What the application's hardware tolerates. No defaults: Validate() rejects unset ones. More...
 
struct  pf1550::Acknowledgements
 Explicit acknowledgements; every flag defaults to false. More...
 
struct  pf1550::RailModes
 Per-state rail enables (EN, STBY_EN, OMODE, LPWR). More...
 
struct  pf1550::BuckConfig
 A buck regulator. apply = false leaves the block as the chip holds it. More...
 
struct  pf1550::LdoConfig
 An LDO. More...
 
struct  pf1550::VrefDdrConfig
 VREFDDR. More...
 
struct  pf1550::VsnvsConfig
 VSNVS. More...
 
struct  pf1550::CoinCell
 The coin cell charger (Table 111). More...
 
struct  pf1550::UsbPhyConfig
 The USBPHY LDO (Table 165). More...
 
struct  pf1550::LedConfig
 The charger LED driver (Tables 170 and 172). More...
 
struct  pf1550::PowerConfig
 Power control (Tables 135 to 137). More...
 
struct  pf1550::PowerDownConfig
 The power-down order (Tables 139 to 145); needs power_down_order_reviewed. More...
 
struct  pf1550::VbusOptions
 VBUS options (Tables 164, 166, 169). More...
 
struct  pf1550::JeitaConfig
 JEITA thresholds and reductions (Tables 162, 168). More...
 
struct  pf1550::FaultPolicy
 BATFET behaviour per fault; false opens the BATFET (the reset value, the safe one). More...
 
struct  pf1550::BatfetConfig
 The battery FET (Tables 156, 161, 171). More...
 
struct  pf1550::WatchdogConfig
 The charger watchdog. When on, ServiceChargerWatchdog() must run every 16 s or less. More...
 
struct  pf1550::ChargerInterrupts
 Charger interrupt options (Table 167). More...
 
struct  pf1550::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  pf1550::Config
 Everything the driver writes. The constructor stores it with no I/O. More...
 

Namespaces

namespace  pf1550
 The PF1550 driver: everything it declares lives here; internals in detail.
 

Functions

constexpr Error pf1550::Validate (const Config &config) noexcept
 Check a configuration without touching the chip.
 
constexpr Limits pf1550::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.
 

Detailed Description

PF1550 configuration: the application's Limits, its explicit acknowledgements, the typed configuration of every block and Validate().

The chip is a power supply: a wrong byte can overcharge a cell or overvolt a processor. The driver therefore has no public raw register write. Everything is written through the typed values below, after Validate() has checked them against the data sheet grids and against Limits, the application's own description of what its battery, supply and loads tolerate. Limits has no defaults: an unset limit is rejected. A safety downgrade (no charge timer, thermistor ignored, no battery overcurrent protection, a hard-reset path changed) is accepted only with the matching flag of Acknowledgements, so that it is visible in the application's source.