|
TLE92466ED Driver 0.1.0
API reference
|
Driver for one TLE92466ED on a platform port. More...
#include <tle92466ed.hpp>
Public Member Functions | |
| TLE92466ED (Port &port, const Config &config={}) noexcept | |
| Bind the driver to a port and store the configuration. No I/O, cannot fail. | |
| TLE92466ED (const TLE92466ED &)=delete | |
| One driver object per chip. | |
| TLE92466ED & | operator= (const TLE92466ED &)=delete |
| One driver object per chip. | |
Lifecycle | |
| Result< void > | EnsureInitialized () noexcept |
| Start the chip, once: the only way to initialise the driver. | |
| bool | IsInitialized () const noexcept |
| Result< void > | Deinitialize () noexcept |
| Switch every channel off: Config Mode (CH_CTRL with OP_MODE and every EN_CH 0), then EN low. The driver is uninitialised afterwards even if a step failed. On an uninitialised driver (never started, or left by a reset or a critical fault) only EN is driven low, with no SPI. | |
| Result< void > | HardwareReset () noexcept |
Pulse RESN and start again as EnsureInitialized() does, with the stored configuration. | |
Configuration | |
| Result< void > | ApplyConfig (const Config &config) noexcept |
| Change the whole configuration. Before the start it is only stored, with no I/O; on a started driver it is written as at start-up (no reset), which needs Config Mode. | |
| const Config & | GetConfig () const &noexcept |
| void | GetConfig () const &&=delete |
| Not on a temporary driver: the reference would dangle (KB-CPP20-044). | |
| Result< void > | ConfigureChannel (Channel channel, const ChannelConfig &config, Verify verify=Verify::None) noexcept |
| Write one channel's registers (MODE is writable in Config Mode only, section 4.4.1). Before the start only stored. SETPOINT is written with TARGET 0. | |
| Result< void > | SetParallel (ParallelPair pair, bool enabled) noexcept |
Join or split a pair (CH_CTRL.CH_PAR, Config Mode only, section 4.5.2). Joining sets the master's SETPOINT to 0 first, since one TARGET count is then twice the current; set it again with SetCurrent(), checked against the pair's limit. Splitting rewrites the slave's registers, which the chip requires. | |
Operation state (section 4.3) | |
| Result< void > | EnterMissionMode () noexcept |
Enter Mission Mode, as Figure 4 allows it. First the entry conditions: FB_STAT (INIT_DONE = 1; no SPI watchdog, clock, central temperature, external or internal supply fault), the DIAG_ERR_CHGR and DIAG_WARN_CHGR groups FB_STAT flags (no channel OTE or OTW), GLOBAL_DIAG2 (no REG_ECC_ERR); any of them set is MissionBlocked with nothing written. Then EN high, OP_MODE with every channel off, and CH_CTRL read back, always: the copy is what the chip did, and an OP_MODE the chip refused is MissionBlocked. VPRE_OV blocks entry too, a fail-safe choice: the datasheet does not list it in Figure 4. 8 frames, 2 more per flagged group. | |
| Result< void > | EnterConfigMode () noexcept |
| Enter Config Mode: OP_MODE 0, which turns every channel off (section 4.3.1), then EN low, whatever the SPI result; the first error is returned. Two frames. | |
| bool | IsMissionMode () const noexcept |
| Result< uint16_t > | ReadChannelControl () noexcept |
| Read CH_CTRL: the operation state and the enabled channels as the chip has them. A supply, clock or watchdog fault ends Mission Mode and clears EN_CH (sections 4.1.2, 4.2.2, 5.2.2), a channel fault clears its EN_CH (4.9.2 to 4.9.6): the driver's copy follows this read. Every enable change does this read first. Two frames. | |
Channels | |
| Result< void > | SetEnabledChannels (uint8_t mask, Verify verify=Verify::None) noexcept |
| Switch channels on and off together. CH_CTRL is read first, so the copy is the chip's (a channel a fault switched off stays off), then written whole with only the EN_CH bits the mask names changed; OP_MODE is kept as the chip has it, never set (handbook KB-CPP-121, -122). | |
| Result< void > | EnableChannel (Channel channel, Verify verify=Verify::None) noexcept |
Switch one channel on, leaving the others as they are. As SetEnabledChannels(). | |
| Result< void > | DisableChannel (Channel channel, Verify verify=Verify::None) noexcept |
| Switch one channel off, leaving the others as they are. Allowed in any state. When the CH_CTRL read fails, the write still goes out, from the copy with the channel cleared, and the read's error is returned: switching off never depends on a read. | |
| uint8_t | GetDroppedChannels () const noexcept |
| void | ClearDroppedChannels () noexcept |
Empty the record of GetDroppedChannels(). No I/O. | |
| uint8_t | GetEnabledChannels () const noexcept |
| Result< uint32_t > | SetCurrent (Channel channel, uint32_t microamps, Verify verify=Verify::None) noexcept |
| Set a channel's average current setpoint (SETPOINT.TARGET, section 4.6.1). | |
| uint32_t | GetCurrentSetpoint (Channel channel) const noexcept |
| Result< void > | SetDither (Channel channel, const DitherConfig &dither, Verify verify=Verify::None) noexcept |
| Change a channel's dither at run time (section 4.7.2): DITHER_CLK_DIV (takes effect at once), DITHER_STEP, then DITHER_CTRL, whose write starts the update at the next dither period. | |
| Result< void > | StartOvercurrentCheck (Channel channel) noexcept |
Run the OFF-state overcurrent check once (section 4.9.6): set CH_CONFIG.OC_DIAG_EN and the channel's EN_CH; the chip switches the stage on for t_OCon and clears OC_DIAG_EN. Read the result with ReadFaults() after t_OCon. The channel must be off with setpoint 0, so the check does not start the current controller; afterwards it stays enabled with setpoint 0, which is the OFF-state diagnosis condition (4.9.1): DisableChannel() when that is not wanted. | |
| Result< void > | SetDrivePin (CtrlPin pin, bool high) noexcept |
| Drive DRV0 or DRV1, the inputs of the direct-drive channels (section 4.8.1). | |
Watchdog (section 5.2.2) | |
| Result< void > | ReloadWatchdog () noexcept |
Reload the SPI watchdog: write Config::watchdog_reload to WD_RELOAD. Call it more often than the timeout while Config::spi_watchdog is set. Not verifiable: the counter runs. Two frames. | |
Diagnostics | |
| Result< DeviceStatus > | ReadStatus () noexcept |
| Read FB_STAT, the one-register summary (section 5.3.2.21). Two frames. | |
| Result< Faults > | ReadFaults () noexcept |
Read the nine diagnosis registers (GLOBAL_DIAG0..2, DIAG_ERR_CHGR0..2, DIAG_WARN_CHGR0..2). Reading DIAG_WARN_CHGR clears OLSG_WARN_CHK_NOK on the chip (4.9.3); every flag read is also ORed into the latch (GetLatchedFaults()). 18 frames. | |
| Result< void > | ClearFaults () noexcept |
Clear the diagnosis flags on the chip: every diagnosis register is read and latched (GetLatchedFaults()), then exactly the flags read are cleared, so a flag raised since the last read is never lost (handbook KB-CPP-119). An rwh flag is cleared by a 1 where it read 1, an rw flag (POR_EVENT, RES_EVENT, VDD2V5_UV/OV) by a 0 (sections 4.1.2, 4.9.1, 5.3.1); OC and OTP_ECC_ERR get the two clears they need (4.9.6, 4.9.7); OTP_VIRGIN is never cleared. A register with nothing set is not written. With the reset watch armed, POR_EVENT or RES_EVENT read 1 is UnexpectedReset, nothing cleared. A flag set again at once means the cause is still there. Not verified. 18 frames, 2 more per register written (4 with OC or OTP_ECC_ERR). | |
| Result< void > | ClearChannelFaults (Channel channel) noexcept |
| Clear one channel's flags and warnings: its DIAG_ERR_CHGR and DIAG_WARN_CHGR group read and latched (both channels), then 1 written to the flags of this channel that read 1 (twice for OC), 0 to everything else. A channel switched off by a fault stays off until its flags are cleared and EN_CH is set again (sections 4.9.2 to 4.9.6). 4 frames, 2 more per write. | |
| const Faults & | GetLatchedFaults () const &noexcept |
| void | GetLatchedFaults () const &&=delete |
| Not on a temporary driver. | |
| void | ClearLatchedFaults () noexcept |
Empty the latch of GetLatchedFaults(). No I/O. | |
| const Faults & | GetStartupFaults () const &noexcept |
| void | GetStartupFaults () const &&=delete |
| Not on a temporary driver. | |
| Result< bool > | ReadFaultPin () noexcept |
Read the FAULTN pin through the port's GpioRead(). | |
| Result< PinStatus > | ReadPinStatus () noexcept |
| Read PIN_STAT (section 5.3.2.20). Two frames. | |
| Result< SupplyReadings > | ReadSupply () noexcept |
| Read FB_VOLTAGE1 and FB_VOLTAGE2: VIO, VDD, VBAT and the central temperature (sections 4.1.2, 4.11.1). Four frames. | |
| Result< ChannelFeedback > | ReadChannelFeedback (Channel channel) noexcept |
| Read one measurement period of a channel's feedback, as section 4.10.5 recommends: read FB_UPD; when the channel has new values, freeze it (FB_FRZ), read FB_DC, FB_VBAT, FB_I_AVG, FB_IMIN_IMAX and FB_PERIOD_MIN_MAX, and release the freeze, which clears its FB_UPD bit. The conversions use f_SYS of the configuration (handbook KB-CPP-128). 16 frames; 2 when there is nothing new. | |
| Result< BistResult > | RunBist () noexcept |
Run the safety flip-flop self-test (section 4.9.8, Config Mode only): start it, poll SMU_SLF_TST_DONE every kPollIntervalUs for at most kBistTimeoutUs, read the result, clear SFF_BIST (a write of 0), read and latch GLOBAL_DIAG2 and clear only the REG_ECC_ERR the test sets on purpose. | |
| Result< ChipId > | ReadChipId () noexcept |
| Read CHIPID0..2, the unique chip identification. Six frames. | |
| uint8_t | GetIcVersion () const noexcept |
| bool | IsResetWatchArmed () const noexcept |
Raw access (handbook KB-CPP-129) | |
| Result< uint32_t > | ReadRegister (uint16_t address) noexcept |
| Read one register once: two frames, no retry, no decoding. Reading DIAG_WARN_CHGR clears OLSG_WARN_CHK_NOK on the chip; a diagnosis register read here feeds the latch too. | |
| uint32_t | GetLastReply () const noexcept |
| uint8_t | GetLastCriticalFault () const noexcept |
| BusDiagnostics | GetBusDiagnostics () const noexcept |
Driver for one TLE92466ED on a platform port.
Lifecycle: construct with the configuration (no I/O), then EnsureInitialized(), the one way to start (reset, readiness, identity, start-up faults, every register), which leaves the chip in Config Mode; EnterMissionMode() lets the channels switch. Every call that touches the chip returns Error::NotInitialized until EnsureInitialized() has succeeded; no call starts the chip as a side effect.
Optional port hooks, found at compile time:
| Hook | Used for | Without it |
|---|---|---|
void DelayUs(uint32_t us) noexcept | t_POR, t_RESN, the INIT_DONE and self-test polls | Compile error: the waits are required |
bool GpioSet(CtrlPin, GpioSignal) noexcept | RESN pulse at start-up, EN with the operation state, DRV0/DRV1 | Start-up waits t_POR and rewrites every register; HardwareReset() and SetDrivePin() return Unsupported |
bool GpioRead(CtrlPin, GpioSignal&) noexcept | ReadFaultPin() | ReadFaultPin() returns Unsupported |
void Log(LogLevel, const char* message) noexcept | One line per lifecycle event or start-up failure | Nothing is logged |
A hook declared with the wrong signature (for example void GpioSet(...)) is a compile error.
| Port | Your class derived from SpiInterface<Port>. |
|
inlineexplicitnoexcept |
Bind the driver to a port and store the configuration. No I/O, cannot fail.
| port | The port; it must outlive the driver. |
| config | What EnsureInitialized() will apply; checked there, before any I/O. |
|
noexcept |
Change the whole configuration. Before the start it is only stored, with no I/O; on a started driver it is written as at start-up (no reset), which needs Config Mode.
| config | Checked with Validate() before any I/O. |
Ok, InvalidArgument, NotInitialized never, WrongState (Mission Mode), WriteMismatch, Bus or a reply error.
|
noexcept |
Clear one channel's flags and warnings: its DIAG_ERR_CHGR and DIAG_WARN_CHGR group read and latched (both channels), then 1 written to the flags of this channel that read 1 (twice for OC), 0 to everything else. A channel switched off by a fault stays off until its flags are cleared and EN_CH is set again (sections 4.9.2 to 4.9.6). 4 frames, 2 more per write.
| channel | The channel. |
Ok, NotInitialized, InvalidArgument, Bus or a reply error.
|
noexcept |
Clear the diagnosis flags on the chip: every diagnosis register is read and latched (GetLatchedFaults()), then exactly the flags read are cleared, so a flag raised since the last read is never lost (handbook KB-CPP-119). An rwh flag is cleared by a 1 where it read 1, an rw flag (POR_EVENT, RES_EVENT, VDD2V5_UV/OV) by a 0 (sections 4.1.2, 4.9.1, 5.3.1); OC and OTP_ECC_ERR get the two clears they need (4.9.6, 4.9.7); OTP_VIRGIN is never cleared. A register with nothing set is not written. With the reset watch armed, POR_EVENT or RES_EVENT read 1 is UnexpectedReset, nothing cleared. A flag set again at once means the cause is still there. Not verified. 18 frames, 2 more per register written (4 with OC or OTP_ECC_ERR).
Ok, NotInitialized, UnexpectedReset, Bus or a reply error.
|
noexcept |
Write one channel's registers (MODE is writable in Config Mode only, section 4.4.1). Before the start only stored. SETPOINT is written with TARGET 0.
| channel | The channel; not the slave of an enabled pair. |
| config | Its configuration; the whole Config with it must pass Validate(). |
| verify | ReadBack: read the 11 registers back and compare, 22 more frames. |
Ok, InvalidArgument, WrongState (Mission Mode, or a slave), WriteMismatch, Bus or a reply error. 26 frames: the 11 registers and FAULT_MASK0..1.
|
noexcept |
Switch every channel off: Config Mode (CH_CTRL with OP_MODE and every EN_CH 0), then EN low. The driver is uninitialised afterwards even if a step failed. On an uninitialised driver (never started, or left by a reset or a critical fault) only EN is driven low, with no SPI.
Ok, Bus or a reply error.
|
noexcept |
Switch one channel off, leaving the others as they are. Allowed in any state. When the CH_CTRL read fails, the write still goes out, from the copy with the channel cleared, and the read's error is returned: switching off never depends on a read.
| channel | The channel. |
| verify | As SetEnabledChannels(). |
SetEnabledChannels().
|
noexcept |
Switch one channel on, leaving the others as they are. As SetEnabledChannels().
| channel | The channel. |
| verify | As SetEnabledChannels(). |
SetEnabledChannels().
|
noexcept |
Start the chip, once: the only way to initialise the driver.
In order: check the configuration; bring the port up; reset the chip (EN low, RESN low for kResetPulseUs, then t_RESN; without GpioSet() write CH_CTRL to 0 at once, so a chip an earlier run left in Mission Mode is switched off, then wait t_POR, section 4.1.3); poll FB_STAT until INIT_DONE = 1, at most Config::init_timeout_us (4.2.1); check ICVID (manufacturer 0xC1, version A11 or A13); write CH_CTRL to Config Mode with every channel off; read, keep (GetStartupFaults()) and clear the diagnosis flags it found, refusing an unprogrammed OTP (4.9.7); write CLK_DIV and wait for INIT_DONE again; write GLOBAL_CONFIG with the SPI watchdog off and read it back; write VBAT_TH, FAULT_MASK0..2, the pairs and every register of every channel that is not an enabled pair's slave; write WD_RELOAD, and last, with Config::spi_watchdog, GLOBAL_CONFIG with SPI_WD_EN, read back (5.2.2); then arm the reset watch if POR_EVENT and RES_EVENT read 0 (4.1.1). It ends in Config Mode. 181 frames on a clean chip with every channel written, plus the reset; later calls return Ok at once with no I/O. After a failure the driver stays uninitialised and the next call starts again from the beginning.
Ok, InvalidArgument (no I/O), Bus, Timeout, DeviceIdMismatch, DeviceFault (OTP_VIRGIN), WriteMismatch (GLOBAL_CONFIG), or a reply error (NoDevice, CriticalFault, Crc, ReplyMismatch, FrameRejected).
|
noexcept |
Enter Config Mode: OP_MODE 0, which turns every channel off (section 4.3.1), then EN low, whatever the SPI result; the first error is returned. Two frames.
Ok, NotInitialized, Bus or a reply error.
|
noexcept |
Enter Mission Mode, as Figure 4 allows it. First the entry conditions: FB_STAT (INIT_DONE = 1; no SPI watchdog, clock, central temperature, external or internal supply fault), the DIAG_ERR_CHGR and DIAG_WARN_CHGR groups FB_STAT flags (no channel OTE or OTW), GLOBAL_DIAG2 (no REG_ECC_ERR); any of them set is MissionBlocked with nothing written. Then EN high, OP_MODE with every channel off, and CH_CTRL read back, always: the copy is what the chip did, and an OP_MODE the chip refused is MissionBlocked. VPRE_OV blocks entry too, a fail-safe choice: the datasheet does not list it in Figure 4. 8 frames, 2 more per flagged group.
Ok, NotInitialized, MissionBlocked, Bus or a reply error.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
| channel | The channel. |
SetCurrent() the larger of the old and the requested setpoint, which the chip may hold, until a SetCurrent() succeeds. No I/O.
|
inlinenoexcept |
ClearDroppedChannels(), bit x for channel x: a channel the driver last asked on that a validated read of CH_CTRL (the read before every channel call, or Verify::ReadBack) found off: a refused enable or a latched fault (4.9.2 to 4.9.6), or a supply, clock or watchdog fault (4.1.2, 4.2.2, 5.2.2). Never taken from a write's reply. Each is also logged. Emptied by every start (EnsureInitialized(), HardwareReset()). No I/O.
|
inlinenoexcept |
Verify::ReadBack a bit is set only when both the value written and the write's reply have it, so the copy can under-report a channel that is on, never report one that is off.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
ClearLatchedFaults(), the reads inside ReadFaults() and ReadRegister() included (handbook KB-CPP-119). No I/O.
|
inlinenoexcept |
|
noexcept |
Pulse RESN and start again as EnsureInitialized() does, with the stored configuration.
Ok, NotInitialized, Unsupported (no GpioSet()), or the errors of EnsureInitialized().
|
inlinenoexcept |
EnsureInitialized() and before Deinitialize(). No I/O.
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
Read CH_CTRL: the operation state and the enabled channels as the chip has them. A supply, clock or watchdog fault ends Mission Mode and clears EN_CH (sections 4.1.2, 4.2.2, 5.2.2), a channel fault clears its EN_CH (4.9.2 to 4.9.6): the driver's copy follows this read. Every enable change does this read first. Two frames.
NotInitialized, Bus or a reply error.
|
noexcept |
Read one measurement period of a channel's feedback, as section 4.10.5 recommends: read FB_UPD; when the channel has new values, freeze it (FB_FRZ), read FB_DC, FB_VBAT, FB_I_AVG, FB_IMIN_IMAX and FB_PERIOD_MIN_MAX, and release the freeze, which clears its FB_UPD bit. The conversions use f_SYS of the configuration (handbook KB-CPP-128). 16 frames; 2 when there is nothing new.
| channel | The channel; not a slave (its feedback is meaningless, section 4.5.2). |
NotInitialized, InvalidArgument, WrongState, NotReady (no new values, or TP_MANT = 0: no measurement period, as with a dither clock of 0), Bus or a reply error.
|
noexcept |
Read CHIPID0..2, the unique chip identification. Six frames.
NotInitialized, Bus or a reply error.
|
noexcept |
Read the FAULTN pin through the port's GpioRead().
NotInitialized, Unsupported or Bus.
|
noexcept |
Read the nine diagnosis registers (GLOBAL_DIAG0..2, DIAG_ERR_CHGR0..2, DIAG_WARN_CHGR0..2). Reading DIAG_WARN_CHGR clears OLSG_WARN_CHK_NOK on the chip (4.9.3); every flag read is also ORed into the latch (GetLatchedFaults()). 18 frames.
NotInitialized, Bus or a reply error.
|
noexcept |
Read PIN_STAT (section 5.3.2.20). Two frames.
NotInitialized, Bus or a reply error.
|
noexcept |
Read one register once: two frames, no retry, no decoding. Reading DIAG_WARN_CHGR clears OLSG_WARN_CHK_NOK on the chip; a diagnosis register read here feeds the latch too.
| address | A register of Tables 19 and 24 (reg::IsRegister()). |
NotInitialized, InvalidArgument (no such register; nothing sent), Bus or a reply error.
|
noexcept |
Read FB_STAT, the one-register summary (section 5.3.2.21). Two frames.
NotInitialized, Bus or a reply error.
|
noexcept |
Read FB_VOLTAGE1 and FB_VOLTAGE2: VIO, VDD, VBAT and the central temperature (sections 4.1.2, 4.11.1). Four frames.
NotInitialized, Bus or a reply error.
|
noexcept |
Reload the SPI watchdog: write Config::watchdog_reload to WD_RELOAD. Call it more often than the timeout while Config::spi_watchdog is set. Not verifiable: the counter runs. Two frames.
Ok, NotInitialized, Bus or a reply error.
|
noexcept |
Run the safety flip-flop self-test (section 4.9.8, Config Mode only): start it, poll SMU_SLF_TST_DONE every kPollIntervalUs for at most kBistTimeoutUs, read the result, clear SFF_BIST (a write of 0), read and latch GLOBAL_DIAG2 and clear only the REG_ECC_ERR the test sets on purpose.
NotInitialized, WrongState, Timeout, Bus or a reply error.
|
noexcept |
Set a channel's average current setpoint (SETPOINT.TARGET, section 4.6.1).
The current is checked against the operating range, never clamped (handbook KB-CPP-126): up to 1.5 A, and with the configured dither amplitude up to 1.8 A; for the master of a pair, up to 2.7 A with dither (Table 14). With dither, a non-zero setpoint must exceed the amplitude (section 4.7.1). The value is rounded to the nearest TARGET count; the call returns what was programmed. Allowed in either state: the channel switches when it is enabled in Mission Mode.
| channel | The channel; not a slave. |
| microamps | The setpoint. |
| verify | ReadBack: read SETPOINT back, two more frames. |
NotInitialized, InvalidArgument, WrongState (a slave), WriteMismatch, Bus or a reply error. Two frames.
|
noexcept |
Change a channel's dither at run time (section 4.7.2): DITHER_CLK_DIV (takes effect at once), DITHER_STEP, then DITHER_CTRL, whose write starts the update at the next dither period.
| channel | The channel; not a slave. |
| dither | The settings; checked as Validate() does and against the current setpoint. |
| verify | ReadBack: read the three registers back, six more frames. |
Ok, NotInitialized, InvalidArgument, WrongState, WriteMismatch, Bus or a reply error. Six frames.
|
noexcept |
Drive DRV0 or DRV1, the inputs of the direct-drive channels (section 4.8.1).
| pin | CtrlPin::Drv0 or CtrlPin::Drv1. |
| high | The level. |
Ok, NotInitialized, InvalidArgument (another pin), Unsupported (no GpioSet()) or Bus.
|
noexcept |
Switch channels on and off together. CH_CTRL is read first, so the copy is the chip's (a channel a fault switched off stays off), then written whole with only the EN_CH bits the mask names changed; OP_MODE is kept as the chip has it, never set (handbook KB-CPP-121, -122).
| mask | Bit x for channel x, 0 to 0x3F. A channel the mask enables must be declared loaded and not be a slave, and Mission Mode is needed to enable one (section 5.3.2.3). A channel already on whose state a failed write left unknown is kept as the chip has it, so the mask still switches the others off; only a channel it newly turns on is refused (WrongState). |
| verify | ReadBack: read CH_CTRL back, two more frames. |
Ok, NotInitialized, InvalidArgument, WrongState (nothing sent), MissionBlocked (the chip left Mission Mode on its own), WriteMismatch (the chip keeps a channel with a latched fault off, section 4.9.2), Bus or a reply error. 4 frames.
|
noexcept |
Join or split a pair (CH_CTRL.CH_PAR, Config Mode only, section 4.5.2). Joining sets the master's SETPOINT to 0 first, since one TARGET count is then twice the current; set it again with SetCurrent(), checked against the pair's limit. Splitting rewrites the slave's registers, which the chip requires.
| pair | The pair. |
| enabled | Join or split. |
Ok, NotInitialized, InvalidArgument (the slave is declared loaded), WrongState (Mission Mode), Bus or a reply error.
|
noexcept |
Run the OFF-state overcurrent check once (section 4.9.6): set CH_CONFIG.OC_DIAG_EN and the channel's EN_CH; the chip switches the stage on for t_OCon and clears OC_DIAG_EN. Read the result with ReadFaults() after t_OCon. The channel must be off with setpoint 0, so the check does not start the current controller; afterwards it stays enabled with setpoint 0, which is the OFF-state diagnosis condition (4.9.1): DisableChannel() when that is not wanted.
| channel | A loaded channel, not a slave, with on_time_mant not 0 and t_OCon at most 300 ms (TON register note). |
Ok, NotInitialized, InvalidArgument, WrongState (Config Mode, a slave, a setpoint, or the channel on or asked on since the last read of CH_CTRL: nothing sent), MissionBlocked, Bus or a reply error. 6 frames.