AFE_NXP_Arduino 2.0.1 Analog Front-End (AFE) device operation sample code for Arduino

Loading...
Searching...
No Matches
NAFE33352.h
Go to the documentation of this file.
1
8
9#include <Arduino.h>
10#include "AFE_NXP.h"
11#include "SPI_for_AFE.h"
12
13#ifndef ARDUINO_AFE_NAFE33352_DRIVER_H
14#define ARDUINO_AFE_NAFE33352_DRIVER_H
15
16 class NAFE33352_Base : public AFE_base
17{
18public:
19 using ch_setting_t = uint16_t[ 4 ];
20 static constexpr double on_board_shunt_resister = 50.00;
21
23 NAFE33352_Base( bool spi_addr, bool highspeed_variant, int nINT, int DRDY, int SYN, int nRESET, int DRDY_input, int SYNCDAC );
24
26 virtual ~NAFE33352_Base();
27
29 virtual void boot( void );
30
32 virtual void reset( bool hardware_reset = false );
33
42 virtual void open_logical_channel( int ch, uint16_t cc0, uint16_t cc1, uint16_t cc2, uint16_t dummy );
43
49 virtual void open_logical_channel( int ch, const uint16_t (&cc)[ 4 ] );
50
52 class LogicalChannel : public LogicalChannel_Base
53 {
54 public:
55 LogicalChannel();
56 virtual ~LogicalChannel();
57
62 void configure( const uint16_t (&cc)[ 3 ] );
63
70 void configure( uint16_t cc0, uint16_t cc1 = 0x0000, uint16_t cc2 = 0x0000 );
71 };
72
74 LogicalChannel logical_channel[ 16 ];
75
77 class DAC
78 {
79 public:
80
82 enum class ModeSelect : uint16_t {
83 OFF = 0,
84 VOLTAGE,
85 CURRENT,
86 CURRENT_RECAL,
87 DAC_OFF_VOLTAGE_IN,
88 DAC_OFF_CURRENT_IN
89 };
90
91 DAC();
92 virtual ~DAC();
93
98 void configure( const uint16_t (&cc)[ 6 ] );
99
109 void configure( uint16_t cc0, uint16_t cc1, uint16_t cc2, uint16_t cc3, uint16_t cc4, uint16_t cc5 );
110
116 void configure( ModeSelect mode, double full_scale_range = 0.00 );
117
122 void configure( double full_scale_range );
123
128 void output( double value );
129
134 DAC& operator=( double value );
135
137 NAFE33352_Base *afe_ptr;
138 private:
139 ModeSelect output_mode;
140 double full_scale;
141 };
142
143 DAC dac;
144
145private:
146 double calc_delay( int ch );
147 void channel_info_update( uint16_t value );
148
149public:
150 void open_dac_output( const uint16_t (&cc)[ 6 ] );
151
152
157 virtual void close_logical_channel( int ch );
158
161 virtual void close_logical_channel( void );
162
167 void enable_logical_channel( int ch );
168
173 virtual void start( int ch );
174
177 virtual void start( void );
178
181 virtual void start_continuous_conversion();
182
187 virtual void DRDY_by_sequencer_done( bool flag = true );
188
193 virtual raw_t read( int ch );
194
199 virtual void read( raw_t *data );
200
205 virtual void read( volt_t *data );
206
212 inline double raw2v( int ch, raw_t value )
213 {
214 if ( mux_setting[ ch ] == ISNS )
215 return value * coeff_V[ ch ] / on_board_shunt_resister;
216 else if ( mux_setting[ ch ] == BG )
217 return value - (double)(1L << 24) * 20.00 * 2.50 / (12.50 * (double)(1L << 24)) -1.50;
218 else
219 return value * coeff_V[ ch ];
220 }
221
222 virtual void dac_out( double vi, double full_scale, uint8_t bit_length );
223 int32_t dac_code( double a, double full_scale, uint8_t bit_length );
224
225 constexpr static double pga_gain[] = { 1.00, 16.00 };
226
227 enum IN_SEL : uint8_t {
228 VCM_VCM = 0,
229 AIP_AIN,
230 AIP_VSNS,
231 GPIO0_GPIO1,
232 AIP,
233 AIN,
234 ISNS,
235 VSNS,
236 TIA,
237 GPIO0_VCM,
238 VCM_GPIO1,
239 REF_BYP__VCM,
240 VCM__REF_BYP,
241 BG,
242 VADD,
243 LDO,
244 VHDD,
245 VHSS,
246 DAC_REF
247 };
248
249 enum GainPGA : uint8_t {
250 G_PGA_x_1_0,
251 G_PGA_x16_0,
252 };
253
254 enum class Register16 : uint16_t {
255 CRC_CONF_REGS = 0x20,
256 CRC_COEF_REGS = 0x21,
257 CRC_TRIM_REGS = 0x22,
258 CRC_TRIM_REF = 0x3F,
259 GPI_DATA = 0x23,
260 GPO_ENABLE = 0x24,
261 GPIO_FUNCTION = 0x25,
262 GPI_ENABLE = 0x26,
263 GPI_EDGE_POS = 0x27,
264 GPI_EDGE_NEG = 0x28,
265 GPO_DATA = 0x29,
266 SYS_CONFIG = 0x2A,
267 SYS_STATUS = 0x2B,
268 CK_SRC_SEL_CONFIG = 0x30,
269 GLOBAL_ALARM_ENABLE = 0x2C,
270 GLOBAL_ALARM_INT = 0x2D,
271 DIE_TEMP = 0x2E,
272 TEMP_THRS = 0x2F,
273 PN2 = 0x40,
274 PN1 = 0x41,
275 PN0_REV = 0x42,
276
277 AI_CONFIG0 = 0x1000 | 0x20,
278 AI_CONFIG1 = 0x1000 | 0x21,
279 AI_CONFIG2 = 0x1000 | 0x22,
280 AI_MULTI_CH_EN = 0x1000 | 0x23,
281 AI_SYSCFG = 0x1000 | 0x24,
282 AI_STATUS = 0x1000 | 0x25,
283 AI_STATUS_OVR = 0x1000 | 0x26,
284 AI_STATUS_UDR = 0x1000 | 0x27,
285
286 AIO_CONFIG = 0x1C00 | 0x20,
287 AO_CAL_COEF = 0x1C00 | 0x21,
288 AIO_PROT_CFG = 0x1C00 | 0x22,
289 AO_SLR_CTRL = 0x1C00 | 0x23,
290 AWG_PER = 0x1C00 | 0x24,
291 AO_SYSCFG = 0x1C00 | 0x25,
292 AIO_STATUS = 0x1C00 | 0x26
293 };
294
295 enum class Register24 : uint16_t {
296 GAIN_COEF0 = 0x50,
297 GAIN_COEF1,
298 GAIN_COEF2,
299 GAIN_COEF3,
300 GAIN_COEF4,
301 GAIN_COEF5,
302 GAIN_COEF6,
303 GAIN_COEF7,
304 OFFSET_COEF0 = 0x58,
305 OFFSET_COEF1,
306 OFFSET_COEF2,
307 OFFSET_COEF3,
308 OFFSET_COEF4,
309 OFFSET_COEF5,
310 OFFSET_COEF6,
311 OFFSET_COEF7,
312 EXTRA_CAL_COEF0 = 0x60,
313 EXTRA_CAL_COEF1,
314 EXTRA_CAL_COEF2,
315 EXTRA_CAL_COEF3,
316 EXTRA_CAL_COEF4,
317 EXTRA_CAL_COEF5,
318 EXTRA_CAL_COEF6,
319 EXTRA_CAL_COEF7,
320 SERIAL1 = 0x43,
321 SERIAL0,
322
323 AI_DATA0 = 0x1000 | 0x30,
324 AI_DATA1,
325 AI_DATA2,
326 AI_DATA3,
327 AI_DATA4,
328 AI_DATA5,
329 AI_DATA6,
330 AI_DATA7,
331 AI_CH_OVR_THR_0 = 0x1000 | 0x38,
332 AI_CH_OVR_THR_1,
333 AI_CH_OVR_THR_2,
334 AI_CH_OVR_THR_3,
335 AI_CH_OVR_THR_4,
336 AI_CH_OVR_THR_5,
337 AI_CH_OVR_THR_6,
338 AI_CH_OVR_THR_7,
339 AI_CH_UDR_THR_0 = 0x1000 | 0x40,
340 AI_CH_UDR_THR_1,
341 AI_CH_UDR_THR_2,
342 AI_CH_UDR_THR_3,
343 AI_CH_UDR_THR_4,
344 AI_CH_UDR_THR_5,
345 AI_CH_UDR_THR_6,
346 AI_CH_UDR_THR_7,
347
348 AO_DATA = 0x1C00 | 0x28,
349 AO_OC_POS_LIMIT,
350 AO_OC_NEG_LIMIT,
351 AWG_AMP_MAX,
352 AWG_AMP_MIN
353 };
354
355 enum Command : uint16_t {
356 CMD_CLEAR_ALARM = 0x12,
357 CMD_RESET = 0x14,
358 CMD_CLEAR_REG = 0x15,
359 CMD_RELOAD = 0x16,
360 CMD_CALC_CRC_CONFIG = 0x2006,
361 CMD_CALC_CRC_COEF = 0x2007,
362 CMD_CALC_CRC_FAC = 0x2008,
363
364 CMD_CH0 = 0x1000,
365 CMD_CH1 = 0x1001,
366 CMD_CH2 = 0x1002,
367 CMD_CH3 = 0x1003,
368 CMD_CH4 = 0x1004,
369 CMD_CH5 = 0x1005,
370 CMD_CH6 = 0x1006,
371 CMD_CH7 = 0x1007,
372 CMD_ADC_ABORT = 0x1010,
373 CMD_END = 0x1012,
374 CMD_CLEAR_DATA = 0x1013,
375 CMD_SS = 0x3000,
376 CMD_SC = 0x3001,
377 CMD_MM = 0x3002,
378 CMD_MC = 0x3003,
379 CMD_MS = 0x3004,
380 CMD_BURST_DATA = 0x3005,
381
382 CMD_WGEN_STOP = 0x1C00,
383 CMD_WGEN_START = 0x1C01,
384 CMD_CLEAR_DAC0 = 0x1C02,
385 CMD_AO_ABORT = 0x1C03,
386 CMD_AO_ABORT_HIZ = 0x1C04,
387 CMD_CISW_ABORT = 0x1C05,
388 CMD_CISW_ABORT_HIZ = 0x1C06,
389 };
390
395 virtual void command( uint16_t com );
396
402 virtual void reg( Register16 r, uint16_t value );
403
409 virtual void reg( Register24 r, uint32_t value );
410
417 virtual uint16_t reg( Register16 r );
418
425 virtual uint32_t reg( Register24 r );
426
434 template<typename T>
435 uint32_t bit_op( T rg, uint32_t mask, uint32_t value )
436 {
437 uint32_t v = reg( rg );
438
439 v &= mask;
440 v |= value & ~mask;
441
442 reg( rg, v );
443
444 return v;
445 }
446
451 uint64_t part_number( void );
452
457 uint8_t revision_number( void );
458
463 uint64_t serial_number( void );
464
469 float temperature( void );
470};
471
472 class NAFE33352 : public NAFE33352_Base
473{
474public:
476 NAFE33352( bool spi_addr = 0, bool highspeed_variant = false, int nINT = 7, int DRDY = 4, int SYN = 14, int nRESET = 14, int DRDY_input = 2, int SYNCDAC = 14 );
477
479 virtual ~NAFE33352();
480};
481
482 class NAFE33352_UIOM : public NAFE33352_Base
483{
484public:
486 NAFE33352_UIOM( bool spi_addr = 0, bool highspeed_variant = false, int nINT = 7, int DRDY = 4, int SYN = 14, int nRESET = 14, int DRDY_input = 2, int SYNCDAC = 14 );
487
489 virtual ~NAFE33352_UIOM();
490};
491
492
493 inline NAFE33352_Base::Register16 operator+( NAFE33352_Base::Register16 rn, int n )
494{
495 return static_cast<NAFE33352_Base::Register16>( static_cast<uint16_t>( rn ) + n );
496}
497
498 inline NAFE33352_Base::Register16 operator+( int n, NAFE33352_Base::Register16 rn )
499{
500 return static_cast<NAFE33352_Base::Register16>( n + static_cast<uint16_t>( rn ) );
501}
502
503 inline NAFE33352_Base::Register24 operator+( NAFE33352_Base::Register24 rn, int n )
504{
505 return static_cast<NAFE33352_Base::Register24>( static_cast<uint16_t>( rn ) + n );
506}
507
508 inline NAFE33352_Base::Register24 operator+( int n, NAFE33352_Base::Register24 rn )
509{
510 return static_cast<NAFE33352_Base::Register24>( n + static_cast<uint16_t>( rn ) );
511}
512
513#endif // !ARDUINO_AFE_NAFE33352_DRIVER_H
AFE_NXP.h
operator+
NAFE33352_Base::Register16 operator+(NAFE33352_Base::Register16 rn, int n)
Definition NAFE33352.h:493
SPI_for_AFE.h
AFE_base::raw_t
int32_t raw_t
Definition AFE_NXP.h:22
AFE_base::volt_t
double volt_t
Definition AFE_NXP.h:23
AFE_base::highspeed_variant
bool highspeed_variant
Definition AFE_NXP.h:216
AFE_base::coeff_V
double coeff_V[16]
Definition AFE_NXP.h:234
AFE_base::AFE_base
AFE_base(bool spi_addr, bool highspeed_variant, int nINT, int DRDY, int SYN, int nRESET, int DRDY_input, int SYNCDAC)
Definition AFE_NXP.cpp:70
AFE_base::mux_setting
int mux_setting[16]
Definition AFE_NXP.h:237
LogicalChannel_Base::LogicalChannel_Base
LogicalChannel_Base()
Definition AFE_NXP.h:264
NAFE33352_Base::DAC
Definition NAFE33352.h:78
NAFE33352_Base::DAC::afe_ptr
NAFE33352_Base * afe_ptr
Definition NAFE33352.h:137
NAFE33352_Base::DAC::operator=
DAC & operator=(double value)
Definition NAFE33352.cpp:105
NAFE33352_Base::DAC::output_mode
ModeSelect output_mode
Definition NAFE33352.h:139
NAFE33352_Base::DAC::full_scale
double full_scale
Definition NAFE33352.h:140
NAFE33352_Base::DAC::DAC
DAC()
Definition NAFE33352.cpp:34
NAFE33352_Base::DAC::output
void output(double value)
Definition NAFE33352.cpp:100
NAFE33352_Base::DAC::~DAC
virtual ~DAC()
Definition NAFE33352.cpp:38
NAFE33352_Base::DAC::configure
void configure(const uint16_t(&cc)[6])
Definition NAFE33352.cpp:48
NAFE33352_Base::DAC::ModeSelect
ModeSelect
Definition NAFE33352.h:82
NAFE33352_Base::DAC::ModeSelect::DAC_OFF_CURRENT_IN
@ DAC_OFF_CURRENT_IN
Definition NAFE33352.h:88
NAFE33352_Base::DAC::ModeSelect::OFF
@ OFF
Definition NAFE33352.h:83
NAFE33352_Base::DAC::ModeSelect::CURRENT
@ CURRENT
Definition NAFE33352.h:85
NAFE33352_Base::DAC::ModeSelect::CURRENT_RECAL
@ CURRENT_RECAL
Definition NAFE33352.h:86
NAFE33352_Base::DAC::ModeSelect::DAC_OFF_VOLTAGE_IN
@ DAC_OFF_VOLTAGE_IN
Definition NAFE33352.h:87
NAFE33352_Base::DAC::ModeSelect::VOLTAGE
@ VOLTAGE
Definition NAFE33352.h:84
NAFE33352_Base::LogicalChannel
Definition NAFE33352.h:53
NAFE33352_Base::LogicalChannel::configure
void configure(const uint16_t(&cc)[3])
Definition NAFE33352.cpp:22
NAFE33352_Base::LogicalChannel::LogicalChannel
LogicalChannel()
Definition NAFE33352.cpp:13
NAFE33352_Base::LogicalChannel::~LogicalChannel
virtual ~LogicalChannel()
Definition NAFE33352.cpp:17
NAFE33352_Base::bit_op
uint32_t bit_op(T rg, uint32_t mask, uint32_t value)
Definition NAFE33352.h:435
NAFE33352_Base::on_board_shunt_resister
static constexpr double on_board_shunt_resister
Definition NAFE33352.h:20
NAFE33352_Base::part_number
uint64_t part_number(void)
Definition NAFE33352.cpp:442
NAFE33352_Base::revision_number
uint8_t revision_number(void)
Definition NAFE33352.cpp:447
NAFE33352_Base::read
virtual raw_t read(int ch)
Definition NAFE33352.cpp:380
NAFE33352_Base::enable_logical_channel
void enable_logical_channel(int ch)
Definition NAFE33352.cpp:337
NAFE33352_Base::Register16
Register16
Definition NAFE33352.h:254
NAFE33352_Base::Register16::AIO_STATUS
@ AIO_STATUS
Definition NAFE33352.h:292
NAFE33352_Base::Register16::AIO_PROT_CFG
@ AIO_PROT_CFG
Definition NAFE33352.h:288
NAFE33352_Base::Register16::CK_SRC_SEL_CONFIG
@ CK_SRC_SEL_CONFIG
Definition NAFE33352.h:268
NAFE33352_Base::Register16::AI_STATUS_OVR
@ AI_STATUS_OVR
Definition NAFE33352.h:283
NAFE33352_Base::Register16::GLOBAL_ALARM_INT
@ GLOBAL_ALARM_INT
Definition NAFE33352.h:270
NAFE33352_Base::Register16::SYS_CONFIG
@ SYS_CONFIG
Definition NAFE33352.h:266
NAFE33352_Base::Register16::CRC_TRIM_REGS
@ CRC_TRIM_REGS
Definition NAFE33352.h:257
NAFE33352_Base::Register16::PN1
@ PN1
Definition NAFE33352.h:274
NAFE33352_Base::Register16::CRC_COEF_REGS
@ CRC_COEF_REGS
Definition NAFE33352.h:256
NAFE33352_Base::Register16::GPI_EDGE_POS
@ GPI_EDGE_POS
Definition NAFE33352.h:263
NAFE33352_Base::Register16::AO_SLR_CTRL
@ AO_SLR_CTRL
Definition NAFE33352.h:289
NAFE33352_Base::Register16::GPIO_FUNCTION
@ GPIO_FUNCTION
Definition NAFE33352.h:261
NAFE33352_Base::Register16::AI_CONFIG2
@ AI_CONFIG2
Definition NAFE33352.h:279
NAFE33352_Base::Register16::AWG_PER
@ AWG_PER
Definition NAFE33352.h:290
NAFE33352_Base::Register16::PN0_REV
@ PN0_REV
Definition NAFE33352.h:275
NAFE33352_Base::Register16::AO_CAL_COEF
@ AO_CAL_COEF
Definition NAFE33352.h:287
NAFE33352_Base::Register16::AI_CONFIG0
@ AI_CONFIG0
Definition NAFE33352.h:277
NAFE33352_Base::Register16::GPI_DATA
@ GPI_DATA
Definition NAFE33352.h:259
NAFE33352_Base::Register16::SYS_STATUS
@ SYS_STATUS
Definition NAFE33352.h:267
NAFE33352_Base::Register16::GLOBAL_ALARM_ENABLE
@ GLOBAL_ALARM_ENABLE
Definition NAFE33352.h:269
NAFE33352_Base::Register16::AI_CONFIG1
@ AI_CONFIG1
Definition NAFE33352.h:278
NAFE33352_Base::Register16::DIE_TEMP
@ DIE_TEMP
Definition NAFE33352.h:271
NAFE33352_Base::Register16::GPI_ENABLE
@ GPI_ENABLE
Definition NAFE33352.h:262
NAFE33352_Base::Register16::TEMP_THRS
@ TEMP_THRS
Definition NAFE33352.h:272
NAFE33352_Base::Register16::GPO_ENABLE
@ GPO_ENABLE
Definition NAFE33352.h:260
NAFE33352_Base::Register16::CRC_CONF_REGS
@ CRC_CONF_REGS
Definition NAFE33352.h:255
NAFE33352_Base::Register16::GPO_DATA
@ GPO_DATA
Definition NAFE33352.h:265
NAFE33352_Base::Register16::CRC_TRIM_REF
@ CRC_TRIM_REF
Definition NAFE33352.h:258
NAFE33352_Base::Register16::AI_STATUS_UDR
@ AI_STATUS_UDR
Definition NAFE33352.h:284
NAFE33352_Base::Register16::GPI_EDGE_NEG
@ GPI_EDGE_NEG
Definition NAFE33352.h:264
NAFE33352_Base::Register16::AI_SYSCFG
@ AI_SYSCFG
Definition NAFE33352.h:281
NAFE33352_Base::Register16::PN2
@ PN2
Definition NAFE33352.h:273
NAFE33352_Base::Register16::AO_SYSCFG
@ AO_SYSCFG
Definition NAFE33352.h:291
NAFE33352_Base::Register16::AIO_CONFIG
@ AIO_CONFIG
Definition NAFE33352.h:286
NAFE33352_Base::Register16::AI_STATUS
@ AI_STATUS
Definition NAFE33352.h:282
NAFE33352_Base::Register16::AI_MULTI_CH_EN
@ AI_MULTI_CH_EN
Definition NAFE33352.h:280
NAFE33352_Base::Command
Command
Definition NAFE33352.h:355
NAFE33352_Base::CMD_WGEN_STOP
@ CMD_WGEN_STOP
Definition NAFE33352.h:382
NAFE33352_Base::CMD_CALC_CRC_FAC
@ CMD_CALC_CRC_FAC
Definition NAFE33352.h:362
NAFE33352_Base::CMD_CALC_CRC_CONFIG
@ CMD_CALC_CRC_CONFIG
Definition NAFE33352.h:360
NAFE33352_Base::CMD_CH7
@ CMD_CH7
Definition NAFE33352.h:371
NAFE33352_Base::CMD_CALC_CRC_COEF
@ CMD_CALC_CRC_COEF
Definition NAFE33352.h:361
NAFE33352_Base::CMD_CH0
@ CMD_CH0
Definition NAFE33352.h:364
NAFE33352_Base::CMD_AO_ABORT_HIZ
@ CMD_AO_ABORT_HIZ
Definition NAFE33352.h:386
NAFE33352_Base::CMD_END
@ CMD_END
Definition NAFE33352.h:373
NAFE33352_Base::CMD_MC
@ CMD_MC
Definition NAFE33352.h:378
NAFE33352_Base::CMD_SC
@ CMD_SC
Definition NAFE33352.h:376
NAFE33352_Base::CMD_MS
@ CMD_MS
Definition NAFE33352.h:379
NAFE33352_Base::CMD_RELOAD
@ CMD_RELOAD
Definition NAFE33352.h:359
NAFE33352_Base::CMD_AO_ABORT
@ CMD_AO_ABORT
Definition NAFE33352.h:385
NAFE33352_Base::CMD_CH1
@ CMD_CH1
Definition NAFE33352.h:365
NAFE33352_Base::CMD_ADC_ABORT
@ CMD_ADC_ABORT
Definition NAFE33352.h:372
NAFE33352_Base::CMD_WGEN_START
@ CMD_WGEN_START
Definition NAFE33352.h:383
NAFE33352_Base::CMD_CLEAR_DAC0
@ CMD_CLEAR_DAC0
Definition NAFE33352.h:384
NAFE33352_Base::CMD_CLEAR_ALARM
@ CMD_CLEAR_ALARM
Definition NAFE33352.h:356
NAFE33352_Base::CMD_CH4
@ CMD_CH4
Definition NAFE33352.h:368
NAFE33352_Base::CMD_SS
@ CMD_SS
Definition NAFE33352.h:375
NAFE33352_Base::CMD_CH3
@ CMD_CH3
Definition NAFE33352.h:367
NAFE33352_Base::CMD_CLEAR_REG
@ CMD_CLEAR_REG
Definition NAFE33352.h:358
NAFE33352_Base::CMD_CLEAR_DATA
@ CMD_CLEAR_DATA
Definition NAFE33352.h:374
NAFE33352_Base::CMD_RESET
@ CMD_RESET
Definition NAFE33352.h:357
NAFE33352_Base::CMD_BURST_DATA
@ CMD_BURST_DATA
Definition NAFE33352.h:380
NAFE33352_Base::CMD_CH6
@ CMD_CH6
Definition NAFE33352.h:370
NAFE33352_Base::CMD_MM
@ CMD_MM
Definition NAFE33352.h:377
NAFE33352_Base::CMD_CH5
@ CMD_CH5
Definition NAFE33352.h:369
NAFE33352_Base::CMD_CISW_ABORT_HIZ
@ CMD_CISW_ABORT_HIZ
Definition NAFE33352.h:388
NAFE33352_Base::CMD_CH2
@ CMD_CH2
Definition NAFE33352.h:366
NAFE33352_Base::CMD_CISW_ABORT
@ CMD_CISW_ABORT
Definition NAFE33352.h:387
NAFE33352_Base::boot
virtual void boot(void)
Definition NAFE33352.cpp:131
NAFE33352_Base::open_logical_channel
virtual void open_logical_channel(int ch, uint16_t cc0, uint16_t cc1, uint16_t cc2, uint16_t dummy)
Definition NAFE33352.cpp:330
NAFE33352_Base::close_logical_channel
virtual void close_logical_channel(void)
Definition NAFE33352.cpp:353
NAFE33352_Base::pga_gain
static constexpr double pga_gain[]
Definition NAFE33352.h:225
NAFE33352_Base::open_dac_output
void open_dac_output(const uint16_t(&cc)[6])
Definition NAFE33352.cpp:171
NAFE33352_Base::Register24
Register24
Definition NAFE33352.h:295
NAFE33352_Base::Register24::AI_CH_UDR_THR_5
@ AI_CH_UDR_THR_5
Definition NAFE33352.h:344
NAFE33352_Base::Register24::AWG_AMP_MIN
@ AWG_AMP_MIN
Definition NAFE33352.h:352
NAFE33352_Base::Register24::AI_CH_UDR_THR_4
@ AI_CH_UDR_THR_4
Definition NAFE33352.h:343
NAFE33352_Base::Register24::AI_DATA3
@ AI_DATA3
Definition NAFE33352.h:326
NAFE33352_Base::Register24::GAIN_COEF0
@ GAIN_COEF0
Definition NAFE33352.h:296
NAFE33352_Base::Register24::AO_OC_NEG_LIMIT
@ AO_OC_NEG_LIMIT
Definition NAFE33352.h:350
NAFE33352_Base::Register24::OFFSET_COEF3
@ OFFSET_COEF3
Definition NAFE33352.h:307
NAFE33352_Base::Register24::GAIN_COEF5
@ GAIN_COEF5
Definition NAFE33352.h:301
NAFE33352_Base::Register24::GAIN_COEF4
@ GAIN_COEF4
Definition NAFE33352.h:300
NAFE33352_Base::Register24::OFFSET_COEF2
@ OFFSET_COEF2
Definition NAFE33352.h:306
NAFE33352_Base::Register24::EXTRA_CAL_COEF4
@ EXTRA_CAL_COEF4
Definition NAFE33352.h:316
NAFE33352_Base::Register24::AI_CH_UDR_THR_7
@ AI_CH_UDR_THR_7
Definition NAFE33352.h:346
NAFE33352_Base::Register24::EXTRA_CAL_COEF2
@ EXTRA_CAL_COEF2
Definition NAFE33352.h:314
NAFE33352_Base::Register24::AI_CH_UDR_THR_0
@ AI_CH_UDR_THR_0
Definition NAFE33352.h:339
NAFE33352_Base::Register24::AI_CH_OVR_THR_6
@ AI_CH_OVR_THR_6
Definition NAFE33352.h:337
NAFE33352_Base::Register24::AI_CH_UDR_THR_6
@ AI_CH_UDR_THR_6
Definition NAFE33352.h:345
NAFE33352_Base::Register24::AI_DATA5
@ AI_DATA5
Definition NAFE33352.h:328
NAFE33352_Base::Register24::OFFSET_COEF5
@ OFFSET_COEF5
Definition NAFE33352.h:309
NAFE33352_Base::Register24::EXTRA_CAL_COEF1
@ EXTRA_CAL_COEF1
Definition NAFE33352.h:313
NAFE33352_Base::Register24::AI_CH_OVR_THR_3
@ AI_CH_OVR_THR_3
Definition NAFE33352.h:334
NAFE33352_Base::Register24::EXTRA_CAL_COEF5
@ EXTRA_CAL_COEF5
Definition NAFE33352.h:317
NAFE33352_Base::Register24::AI_DATA6
@ AI_DATA6
Definition NAFE33352.h:329
NAFE33352_Base::Register24::OFFSET_COEF4
@ OFFSET_COEF4
Definition NAFE33352.h:308
NAFE33352_Base::Register24::AI_DATA1
@ AI_DATA1
Definition NAFE33352.h:324
NAFE33352_Base::Register24::AI_DATA0
@ AI_DATA0
Definition NAFE33352.h:323
NAFE33352_Base::Register24::GAIN_COEF6
@ GAIN_COEF6
Definition NAFE33352.h:302
NAFE33352_Base::Register24::AI_CH_UDR_THR_3
@ AI_CH_UDR_THR_3
Definition NAFE33352.h:342
NAFE33352_Base::Register24::EXTRA_CAL_COEF7
@ EXTRA_CAL_COEF7
Definition NAFE33352.h:319
NAFE33352_Base::Register24::AI_CH_OVR_THR_0
@ AI_CH_OVR_THR_0
Definition NAFE33352.h:331
NAFE33352_Base::Register24::OFFSET_COEF6
@ OFFSET_COEF6
Definition NAFE33352.h:310
NAFE33352_Base::Register24::AI_CH_OVR_THR_1
@ AI_CH_OVR_THR_1
Definition NAFE33352.h:332
NAFE33352_Base::Register24::AI_DATA4
@ AI_DATA4
Definition NAFE33352.h:327
NAFE33352_Base::Register24::GAIN_COEF7
@ GAIN_COEF7
Definition NAFE33352.h:303
NAFE33352_Base::Register24::AO_DATA
@ AO_DATA
Definition NAFE33352.h:348
NAFE33352_Base::Register24::AI_CH_OVR_THR_5
@ AI_CH_OVR_THR_5
Definition NAFE33352.h:336
NAFE33352_Base::Register24::GAIN_COEF1
@ GAIN_COEF1
Definition NAFE33352.h:297
NAFE33352_Base::Register24::OFFSET_COEF0
@ OFFSET_COEF0
Definition NAFE33352.h:304
NAFE33352_Base::Register24::AO_OC_POS_LIMIT
@ AO_OC_POS_LIMIT
Definition NAFE33352.h:349
NAFE33352_Base::Register24::AI_CH_UDR_THR_1
@ AI_CH_UDR_THR_1
Definition NAFE33352.h:340
NAFE33352_Base::Register24::AWG_AMP_MAX
@ AWG_AMP_MAX
Definition NAFE33352.h:351
NAFE33352_Base::Register24::OFFSET_COEF1
@ OFFSET_COEF1
Definition NAFE33352.h:305
NAFE33352_Base::Register24::EXTRA_CAL_COEF6
@ EXTRA_CAL_COEF6
Definition NAFE33352.h:318
NAFE33352_Base::Register24::EXTRA_CAL_COEF0
@ EXTRA_CAL_COEF0
Definition NAFE33352.h:312
NAFE33352_Base::Register24::EXTRA_CAL_COEF3
@ EXTRA_CAL_COEF3
Definition NAFE33352.h:315
NAFE33352_Base::Register24::AI_CH_OVR_THR_4
@ AI_CH_OVR_THR_4
Definition NAFE33352.h:335
NAFE33352_Base::Register24::SERIAL0
@ SERIAL0
Definition NAFE33352.h:321
NAFE33352_Base::Register24::OFFSET_COEF7
@ OFFSET_COEF7
Definition NAFE33352.h:311
NAFE33352_Base::Register24::GAIN_COEF2
@ GAIN_COEF2
Definition NAFE33352.h:298
NAFE33352_Base::Register24::AI_CH_OVR_THR_7
@ AI_CH_OVR_THR_7
Definition NAFE33352.h:338
NAFE33352_Base::Register24::AI_CH_UDR_THR_2
@ AI_CH_UDR_THR_2
Definition NAFE33352.h:341
NAFE33352_Base::Register24::AI_DATA7
@ AI_DATA7
Definition NAFE33352.h:330
NAFE33352_Base::Register24::AI_CH_OVR_THR_2
@ AI_CH_OVR_THR_2
Definition NAFE33352.h:333
NAFE33352_Base::Register24::SERIAL1
@ SERIAL1
Definition NAFE33352.h:320
NAFE33352_Base::Register24::GAIN_COEF3
@ GAIN_COEF3
Definition NAFE33352.h:299
NAFE33352_Base::Register24::AI_DATA2
@ AI_DATA2
Definition NAFE33352.h:325
NAFE33352_Base::reset
virtual void reset(bool hardware_reset=false)
Definition NAFE33352.cpp:147
NAFE33352_Base::command
virtual void command(uint16_t com)
Definition NAFE33352.cpp:417
NAFE33352_Base::start
virtual void start(void)
Definition NAFE33352.cpp:365
NAFE33352_Base::GainPGA
GainPGA
Definition NAFE33352.h:249
NAFE33352_Base::G_PGA_x_1_0
@ G_PGA_x_1_0
Definition NAFE33352.h:250
NAFE33352_Base::G_PGA_x16_0
@ G_PGA_x16_0
Definition NAFE33352.h:251
NAFE33352_Base::~NAFE33352_Base
virtual ~NAFE33352_Base()
Definition NAFE33352.cpp:127
NAFE33352_Base::channel_info_update
void channel_info_update(uint16_t value)
Definition NAFE33352.cpp:253
NAFE33352_Base::serial_number
uint64_t serial_number(void)
Definition NAFE33352.cpp:452
NAFE33352_Base::dac
DAC dac
Definition NAFE33352.h:143
NAFE33352_Base::dac_code
int32_t dac_code(double a, double full_scale, uint8_t bit_length)
Definition NAFE33352.cpp:405
NAFE33352_Base::NAFE33352_Base
NAFE33352_Base(bool spi_addr, bool highspeed_variant, int nINT, int DRDY, int SYN, int nRESET, int DRDY_input, int SYNCDAC)
Definition NAFE33352.cpp:115
NAFE33352_Base::calc_delay
double calc_delay(int ch)
Definition NAFE33352.cpp:278
NAFE33352_Base::start_continuous_conversion
virtual void start_continuous_conversion()
Definition NAFE33352.cpp:370
NAFE33352_Base::raw2v
double raw2v(int ch, raw_t value)
Definition NAFE33352.h:212
NAFE33352_Base::ch_setting_t
uint16_t[4] ch_setting_t
Definition NAFE33352.h:19
NAFE33352_Base::dac_out
virtual void dac_out(double vi, double full_scale, uint8_t bit_length)
Definition NAFE33352.cpp:400
NAFE33352_Base::IN_SEL
IN_SEL
Definition NAFE33352.h:227
NAFE33352_Base::VCM__REF_BYP
@ VCM__REF_BYP
Definition NAFE33352.h:240
NAFE33352_Base::AIP_VSNS
@ AIP_VSNS
Definition NAFE33352.h:230
NAFE33352_Base::DAC_REF
@ DAC_REF
Definition NAFE33352.h:246
NAFE33352_Base::AIP_AIN
@ AIP_AIN
Definition NAFE33352.h:229
NAFE33352_Base::REF_BYP__VCM
@ REF_BYP__VCM
Definition NAFE33352.h:239
NAFE33352_Base::VHSS
@ VHSS
Definition NAFE33352.h:245
NAFE33352_Base::LDO
@ LDO
Definition NAFE33352.h:243
NAFE33352_Base::BG
@ BG
Definition NAFE33352.h:241
NAFE33352_Base::VCM_VCM
@ VCM_VCM
Definition NAFE33352.h:228
NAFE33352_Base::AIN
@ AIN
Definition NAFE33352.h:233
NAFE33352_Base::VCM_GPIO1
@ VCM_GPIO1
Definition NAFE33352.h:238
NAFE33352_Base::VADD
@ VADD
Definition NAFE33352.h:242
NAFE33352_Base::AIP
@ AIP
Definition NAFE33352.h:232
NAFE33352_Base::VHDD
@ VHDD
Definition NAFE33352.h:244
NAFE33352_Base::GPIO0_GPIO1
@ GPIO0_GPIO1
Definition NAFE33352.h:231
NAFE33352_Base::GPIO0_VCM
@ GPIO0_VCM
Definition NAFE33352.h:237
NAFE33352_Base::ISNS
@ ISNS
Definition NAFE33352.h:234
NAFE33352_Base::TIA
@ TIA
Definition NAFE33352.h:236
NAFE33352_Base::VSNS
@ VSNS
Definition NAFE33352.h:235
NAFE33352_Base::DRDY_by_sequencer_done
virtual void DRDY_by_sequencer_done(bool flag=true)
Definition NAFE33352.cpp:375
NAFE33352_Base::temperature
float temperature(void)
Definition NAFE33352.cpp:461
NAFE33352_Base::logical_channel
LogicalChannel logical_channel[16]
Definition NAFE33352.h:74
NAFE33352_Base::reg
virtual void reg(Register16 r, uint16_t value)
Definition NAFE33352.cpp:422
NAFE33352_UIOM::~NAFE33352_UIOM
virtual ~NAFE33352_UIOM()
Definition NAFE33352.cpp:484
NAFE33352_UIOM::NAFE33352_UIOM
NAFE33352_UIOM(bool spi_addr=0, bool highspeed_variant=false, int nINT=7, int DRDY=4, int SYN=14, int nRESET=14, int DRDY_input=2, int SYNCDAC=14)
Definition NAFE33352.cpp:479
NAFE33352::NAFE33352
NAFE33352(bool spi_addr=0, bool highspeed_variant=false, int nINT=7, int DRDY=4, int SYN=14, int nRESET=14, int DRDY_input=2, int SYNCDAC=14)
Definition NAFE33352.cpp:468
NAFE33352::~NAFE33352
virtual ~NAFE33352()
Definition NAFE33352.cpp:473