HF-MAX22200 Driver 0.1.0-dev
HF-MAX22200 C++ Driver
Loading...
Searching...
No Matches
max22200::StatusConfig Struct Reference

STATUS register structure. More...

#include <max22200_types.hpp>

Public Member Functions

 StatusConfig ()
 Default constructor.
 
uint32_t toRegister () const
 Build 32-bit register value from writable fields.
 
void fromRegister (uint32_t val)
 Parse a 32-bit register value.
 
bool hasFault () const
 Check if any fault flag is active.
 
bool hasOvertemperature () const
 
bool hasOvercurrent () const
 
bool hasOpenLoadFault () const
 
bool hasHitNotReached () const
 
bool hasPlungerMovementFault () const
 
bool hasCommunicationError () const
 
bool hasUndervoltage () const
 
bool isActive () const
 
bool isChannelOn (uint8_t ch) const
 
uint8_t channelCountOn () const
 
bool isOvertemperatureMasked () const
 
bool isOvercurrentMasked () const
 
bool isOpenLoadFaultMasked () const
 
bool isHitNotReachedMasked () const
 
bool isPlungerMovementFaultMasked () const
 
bool isCommunicationErrorMasked () const
 
bool isUndervoltageMasked () const
 
bool is80KHzBase () const
 
bool is100KHzBase () const
 
ChannelMode getChannelPairMode76 () const
 
ChannelMode getChannelPairMode54 () const
 
ChannelMode getChannelPairMode32 () const
 
ChannelMode getChannelPairMode10 () const
 
uint8_t getChannelsOnMask () const
 

Public Attributes

uint8_t channels_on_mask
 
bool overtemperature_masked
 OVT fault mask; when true OVT does not assert FAULT pin.
 
bool overcurrent_masked
 OCP fault mask; when true OCP does not assert FAULT pin.
 
bool open_load_fault_masked
 OLF fault mask; when true OLF does not assert FAULT pin.
 
bool hit_not_reached_masked
 HHF fault mask; when true HHF does not assert FAULT pin.
 
bool plunger_movement_fault_masked
 DPM fault mask; when true DPM does not assert FAULT pin.
 
bool communication_error_masked
 COMER mask (default=true); when true COMER does not assert FAULT pin.
 
bool undervoltage_masked
 UVM fault mask; when true UVM does not assert FAULT pin.
 
bool master_clock_80khz
 Master clock base (false=100kHz, true=80kHz); affects fCHOP.
 
ChannelMode channel_pair_mode_76
 CH6/CH7 pair mode; change only when both CH6 and CH7 are OFF.
 
ChannelMode channel_pair_mode_54
 CH4/CH5 pair mode.
 
ChannelMode channel_pair_mode_32
 CH2/CH3 pair mode.
 
ChannelMode channel_pair_mode_10
 CH0/CH1 pair mode.
 
bool active
 Global enable (0=low-power, 1=normal); set to 1 during init.
 
bool overtemperature
 OVT fault flag (read-only); die over temp.
 
bool overcurrent
 OCP fault flag (read-only); output exceeded OCP level.
 
bool open_load_fault
 OLF fault flag (read-only); load disconnected if OL enabled.
 
bool hit_not_reached
 HHF fault flag (read-only); IHIT not reached by end of tHIT.
 
bool plunger_movement_fault
 DPM fault flag (read-only); no valid plunger movement.
 
bool communication_error
 COMER flag (read-only); SPI error detected.
 
bool undervoltage
 UVM fault flag (read-only); clear by reading STATUS at init.
 

Detailed Description

STATUS register structure.

Maps directly to the 32-bit STATUS register (0x00). Contains channel activation, hardware configuration, fault masks, fault flags, and the global ACTIVE bit.

Register Layout

Byte Bits Field Description
3 31:24 ONCH[7:0] Channel on/off bits (1=on, 0=off)
2 23:16 M_OVT, M_OCP, etc. Fault mask bits + FREQM
1 15:8 CM76, CM54, etc. Channel-pair mode configuration
0 7:0 OVT, OCP, etc. Fault flags (read-only) + ACTIVE

Key Fields

  • ONCH[7:0]: Individual channel enable/disable. Bit N controls channel N. Can be updated with fast 8-bit write to STATUS[31:24] for low-latency control.
  • ACTIVE: Global enable bit. Must be set to 1 for normal operation. When 0, device enters low-power mode and all channels are three-stated. Default is 0 at power-up. Set to 1 during initialization.
  • UVM: Undervoltage flag. Set high at power-up and must be cleared by reading the STATUS register. Reading STATUS clears UVM and deasserts nFAULT.
  • CMxy: Channel-pair mode bits (CM76, CM54, CM32, CM10). Configure pairs of contiguous channels for independent, parallel, or H-bridge operation. Can only be written when both channels in the pair are OFF (ONCHx=0, ONCHy=0).
  • Fault Masks (M_OVT, M_OCP, etc.): When set to 1, the fault is masked and does not assert the FAULT pin. When 0 (default), fault events assert FAULT. M_COMF defaults to 1 (masked) at reset.
Note
Fault flags (bits 7:1) are read-only. They are cleared by reading the STATUS register (UVM) or FAULT register (OCP, HHF, OLF, DPM).
Reading STATUS register clears UVM flag and deasserts nFAULT pin.

Constructor & Destructor Documentation

◆ StatusConfig()

max22200::StatusConfig::StatusConfig ( )
inline

Member Function Documentation

◆ channelCountOn()

uint8_t max22200::StatusConfig::channelCountOn ( ) const
inline

◆ fromRegister()

void max22200::StatusConfig::fromRegister ( uint32_t val)
inline

◆ getChannelPairMode10()

ChannelMode max22200::StatusConfig::getChannelPairMode10 ( ) const
inline

◆ getChannelPairMode32()

ChannelMode max22200::StatusConfig::getChannelPairMode32 ( ) const
inline

◆ getChannelPairMode54()

ChannelMode max22200::StatusConfig::getChannelPairMode54 ( ) const
inline

◆ getChannelPairMode76()

ChannelMode max22200::StatusConfig::getChannelPairMode76 ( ) const
inline

◆ getChannelsOnMask()

uint8_t max22200::StatusConfig::getChannelsOnMask ( ) const
inline

◆ hasCommunicationError()

bool max22200::StatusConfig::hasCommunicationError ( ) const
inline

◆ hasFault()

bool max22200::StatusConfig::hasFault ( ) const
inline

◆ hasHitNotReached()

bool max22200::StatusConfig::hasHitNotReached ( ) const
inline

◆ hasOpenLoadFault()

bool max22200::StatusConfig::hasOpenLoadFault ( ) const
inline

◆ hasOvercurrent()

bool max22200::StatusConfig::hasOvercurrent ( ) const
inline

◆ hasOvertemperature()

bool max22200::StatusConfig::hasOvertemperature ( ) const
inline

◆ hasPlungerMovementFault()

bool max22200::StatusConfig::hasPlungerMovementFault ( ) const
inline

◆ hasUndervoltage()

bool max22200::StatusConfig::hasUndervoltage ( ) const
inline

◆ is100KHzBase()

bool max22200::StatusConfig::is100KHzBase ( ) const
inline

◆ is80KHzBase()

bool max22200::StatusConfig::is80KHzBase ( ) const
inline

◆ isActive()

bool max22200::StatusConfig::isActive ( ) const
inline

◆ isChannelOn()

bool max22200::StatusConfig::isChannelOn ( uint8_t ch) const
inline

◆ isCommunicationErrorMasked()

bool max22200::StatusConfig::isCommunicationErrorMasked ( ) const
inline

◆ isHitNotReachedMasked()

bool max22200::StatusConfig::isHitNotReachedMasked ( ) const
inline

◆ isOpenLoadFaultMasked()

bool max22200::StatusConfig::isOpenLoadFaultMasked ( ) const
inline

◆ isOvercurrentMasked()

bool max22200::StatusConfig::isOvercurrentMasked ( ) const
inline

◆ isOvertemperatureMasked()

bool max22200::StatusConfig::isOvertemperatureMasked ( ) const
inline

◆ isPlungerMovementFaultMasked()

bool max22200::StatusConfig::isPlungerMovementFaultMasked ( ) const
inline

◆ isUndervoltageMasked()

bool max22200::StatusConfig::isUndervoltageMasked ( ) const
inline

◆ toRegister()

uint32_t max22200::StatusConfig::toRegister ( ) const
inline

Build 32-bit register value from writable fields.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

Member Data Documentation

◆ active

bool max22200::StatusConfig::active

Global enable (0=low-power, 1=normal); set to 1 during init.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ channel_pair_mode_10

ChannelMode max22200::StatusConfig::channel_pair_mode_10

◆ channel_pair_mode_32

ChannelMode max22200::StatusConfig::channel_pair_mode_32

◆ channel_pair_mode_54

ChannelMode max22200::StatusConfig::channel_pair_mode_54

◆ channel_pair_mode_76

ChannelMode max22200::StatusConfig::channel_pair_mode_76

CH6/CH7 pair mode; change only when both CH6 and CH7 are OFF.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ channels_on_mask

uint8_t max22200::StatusConfig::channels_on_mask

Channel on/off bitmask (bit N = channel N) Can be updated with fast 8-bit write to STATUS[31:24] For channels with trigger_from_pin=true, ONCH bit is ignored (TRIG pin controls)

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ communication_error

bool max22200::StatusConfig::communication_error

COMER flag (read-only); SPI error detected.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ communication_error_masked

bool max22200::StatusConfig::communication_error_masked

COMER mask (default=true); when true COMER does not assert FAULT pin.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ hit_not_reached

bool max22200::StatusConfig::hit_not_reached

HHF fault flag (read-only); IHIT not reached by end of tHIT.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ hit_not_reached_masked

bool max22200::StatusConfig::hit_not_reached_masked

HHF fault mask; when true HHF does not assert FAULT pin.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ master_clock_80khz

bool max22200::StatusConfig::master_clock_80khz

Master clock base (false=100kHz, true=80kHz); affects fCHOP.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ open_load_fault

bool max22200::StatusConfig::open_load_fault

OLF fault flag (read-only); load disconnected if OL enabled.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ open_load_fault_masked

bool max22200::StatusConfig::open_load_fault_masked

OLF fault mask; when true OLF does not assert FAULT pin.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ overcurrent

bool max22200::StatusConfig::overcurrent

OCP fault flag (read-only); output exceeded OCP level.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ overcurrent_masked

bool max22200::StatusConfig::overcurrent_masked

OCP fault mask; when true OCP does not assert FAULT pin.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ overtemperature

bool max22200::StatusConfig::overtemperature

OVT fault flag (read-only); die over temp.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ overtemperature_masked

bool max22200::StatusConfig::overtemperature_masked

OVT fault mask; when true OVT does not assert FAULT pin.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ plunger_movement_fault

bool max22200::StatusConfig::plunger_movement_fault

DPM fault flag (read-only); no valid plunger movement.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ plunger_movement_fault_masked

bool max22200::StatusConfig::plunger_movement_fault_masked

DPM fault mask; when true DPM does not assert FAULT pin.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ undervoltage

bool max22200::StatusConfig::undervoltage

UVM fault flag (read-only); clear by reading STATUS at init.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

◆ undervoltage_masked

bool max22200::StatusConfig::undervoltage_masked

UVM fault mask; when true UVM does not assert FAULT pin.

Examples
/home/runner/work/hf-max22200-driver/hf-max22200-driver/inc/max22200_types.hpp.

The documentation for this struct was generated from the following file: