pub struct Config {
pub clkout_en: bool,
pub pwrdwn_en: bool,
pub temp_en: bool,
pub adc_freq: AdcFreqVal,
pub swrst: bool,
pub bw: bool,
}
Expand description
Configuration struct.
Fields§
§clkout_en: bool
Enables CLKOUT functionality at the CLKOUT/DREADY pin. When clkout_en = false
, the default
value, DREADY functionality is enabled. When clkout_en = true
, CLKOUT functionality is
enabled.
pwrdwn_en: bool
Shuts down the dc-to-dc converter. When pwrdwn_en = false
, the default value, the dc-to-dc
converter is functional and the Σ-Δ modulators are active. When pwrwdn_en = true
, the
dc-to-dc converter is turned off and the Σ-Δ modulators are shut down.
temp_en: bool
This field selects the second voltage channel measurement. When the temp_en
field is set
to false
, the default value, the voltage between the V2P and VM pins is measured. When
this field is true
, the internal temperature sensor is measured. In the case of the
ADE7912, the internal temperature sensor is always measured, and this field does not have
any significance.
adc_freq: AdcFreqVal
This field selects the ADC output frequency.
swrst: bool
When this field is set to true
,a software reset is initiated. This field clears itself to
false
after one CLKIN cycle.
bw: bool
Selects the bandwidth of the digital low-pass filter of the ADC. When bw = false
, the
default value, the bandwidth is 3.3 kHz. When bw = true
, the bandwidth is 2 kHz. The
bandwidth data is for CLKIN = 4.096 MHz and an ADC output frequency of 8 kHz.