Si7210 Details#

Register interface and implementation details.

Registers#

#define

Hardware revision ID register

#define

The most significant byte of the last conversion result

#define

The least significant byte of the last conversion result

#define

Select the data after filtering

#define

Power control register

#define

Enables auto increment of the I2C register address pointer

#define

Control register 1, output pin configuration

#define

Control register 2, output pin configuration

#define

Sleep time control register

#define

Control register 3, output pin and sleep time configuration

#define

Coefficient A0

#define

Coefficient A1

#define

Coefficient A2

#define

Control register 4, Digital filter configuration

#define

Coefficient A3

#define

Coefficient A4

#define

Coefficient A5

#define

OTP address of the data to read

#define

Data read from OTP

#define

OTP read control register

#define

On-chip test coil control

#define

Revision ID mask, Hardware revision ID register

#define

Revision ID shift value, Hardware revision ID register

#define

Chip ID mask, Hardware revision ID register

#define

Revision ID shift value, Hardware revision ID register

#define

New data available mask, MSB of last conversion result register

#define

New data available shift value, MSB of last conversion result register

#define

MSB bits of conversion mask, MSB of last conversion result register

#define

MSB bits of conversion shift value, MSB of last conversion result register

#define

Sleep mode bit mask, Power control register

#define

Sleep mode bit shift value, Power control register

#define

Stop bit mask, Power control register

#define

Stop bit shift value, Power control register

#define

One burst mesurement bit mask, Power control register

#define

One burst mesurement bit shift value, Power control register

#define

Save the current state of OTP regs bit mask, Power control register

#define

Save the current state of OTP regs bit shift value, Power control register

#define

Measurement in progress bit mask, Power control register

#define

Measurement in progress bit shift value, Power control register

#define

Switching point mask, Control register 1

#define

Switching point shift value, Control register 1

#define

Output polarity setting bit mask, Control register 1

#define

Output polarity setting bit shift value, Control register 1

#define

Switch hysteresis mask, Control register 2

#define

Switch hyteresis shift value, Control register 2

#define

Switch polarity mask, Control register 2

#define

Switchi polarity shift value, Control register 2

#define

Sleep timer enable bit mask, Control register 3

#define

Sleep timer enable bit shift value, Control register 3

#define

Sleep time reduction enable bit mask, Control register 3

#define

Sleep time reduction bit shift value, Control register 3

#define

Tamper switch threshold mask, Control register 3

#define

Tamper switch threshold shift value, Control register 3

#define

IIR filter enable bit mask, Control register 4

#define

IIR filter enable bit shift value, Control register 4

#define

Number of samples to average mask, Control register 4

#define

Number of samples to average shift value, Control register 4

#define

Measurement burst size mask, Control register 4

#define

Measurement burst size shift value, Control register 4

#define

OTP busy indicator bit mask, OTP read control register

#define

OTP busy indicator bit shift value, OTP read control register

#define

OTP read enable bit mask, OTP read control register

#define

OTP read enable bit shift value, OTP read control register

#define

OTP Control register 1, output pin configuration

#define

OTP Control register 2, output pin configuration

#define

OTP Sleep time control register

#define

OTP Control register 3, output pin and sleep time configuration

#define

OTP Coefficient A0

#define

OTP Coefficient A1

#define

OTP Coefficient A2

#define

OTP Control register 4, Digital filter configuration

#define

OTP Coefficient A3

#define

OTP Coefficient A4

#define

OTP Coefficient A5

#define

OTP Base part number

#define

OTP Variant number

#define

OTP Serial number

#define

OTP On-chip field generator calibration value

#define

OTP 20mT scale no magnet temperature compensation value

#define

OTP 200mT scale no magnet temperature compensation value

#define

OTP 20mT scale neodymium magnet temperature compensation value

#define

OTP 200mT scale neodymium temperature compensation value

#define

OTP 20mT scale ceramic magnet temperature compensation value

#define

OTP 200mT scale ceramic magnet temperature compensation value

Functions#

sl_status_t
sl_si7210_read_otp_register(sl_i2cspm_t *i2cspm, uint8_t otpAddr, uint8_t *otpData)

Read register from the OTP area of the Si7021 device.

sl_status_t
sl_si7210_read_register(sl_i2cspm_t *i2cspm, uint8_t addr, uint8_t *data)

Read register from the Hall sensor device.

sl_status_t
sl_si7210_write_register(sl_i2cspm_t *i2cspm, uint8_t addr, uint8_t data)

Write a register in the Hall sensor device.

sl_status_t
sl_si7210_set_register_bits(sl_i2cspm_t *i2cspm, uint8_t addr, uint8_t mask)

Set the given bit(s) in a register in the Hall sensor device.

sl_status_t
sl_si7210_clear_register_bits(sl_i2cspm_t *i2cspm, uint8_t addr, uint8_t mask)

Clear the given bit(s) in a register in the Hall sensor device.

uint8_t
sl_si7210_calculate_sw_op(float threshold)

Calculate the sw_op value from the threshold by finding the inverse of the formula: threshold = (16 + sw_op[3:0]) * 2^sw_op[6:4].

uint8_t
sl_si7210_calculate_sw_hyst(float hysteresis, bool scale200mT)

Calculate the sw_hyst value from the hysteresis by finding the inverse of the formula: hysteresis = (8 + sw_hyst[2:0]) * 2^sw_hyst[5:3].

uint8_t
sl_si7210_calculate_sw_tamper(float tamper, bool scale200mT)

Calculate the sw_tamper value from the tamper threshold by finding the inverse of the formula: tamper = (16 + sw_tamper[3:0]) * 2^(sw_tamper[5:4] + 5)

uint8_t
sl_si7210_calculate_sltime(uint32_t samplePeriod, uint8_t *slFast)

Calculate the slTime value from the sleep time by finding the inverse of the formula: tsleep = (32 + slTime[4:0]) * 2^(8 + slTime[7:5]) / 12 MHz.

Registers Documentation#

SI7210_REG_ADDR_HREVID#

#define SI7210_REG_ADDR_HREVID
Value:
0xC0

Hardware revision ID register


Definition at line 46 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_DSPSIGM#

#define SI7210_REG_ADDR_DSPSIGM
Value:
0xC1

The most significant byte of the last conversion result


Definition at line 47 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_DSPSIGL#

#define SI7210_REG_ADDR_DSPSIGL
Value:
0xC2

The least significant byte of the last conversion result


Definition at line 48 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_DSPSIGSEL#

#define SI7210_REG_ADDR_DSPSIGSEL
Value:
0xC3

Select the data after filtering


Definition at line 49 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_POWER_CTRL#

#define SI7210_REG_ADDR_POWER_CTRL
Value:
0xC4

Power control register


Definition at line 50 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_ARAUTOINC#

#define SI7210_REG_ADDR_ARAUTOINC
Value:
0xC5

Enables auto increment of the I2C register address pointer


Definition at line 51 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_CTRL1#

#define SI7210_REG_ADDR_CTRL1
Value:
0xC6

Control register 1, output pin configuration


Definition at line 52 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_CTRL2#

#define SI7210_REG_ADDR_CTRL2
Value:
0xC7

Control register 2, output pin configuration


Definition at line 53 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_SLTIME#

#define SI7210_REG_ADDR_SLTIME
Value:
0xC8

Sleep time control register


Definition at line 54 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_CTRL3#

#define SI7210_REG_ADDR_CTRL3
Value:
0xC9

Control register 3, output pin and sleep time configuration


Definition at line 55 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_A0#

#define SI7210_REG_ADDR_A0
Value:
0xCA

Coefficient A0


Definition at line 56 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_A1#

#define SI7210_REG_ADDR_A1
Value:
0xCB

Coefficient A1


Definition at line 57 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_A2#

#define SI7210_REG_ADDR_A2
Value:
0xCC

Coefficient A2


Definition at line 58 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_CTRL4#

#define SI7210_REG_ADDR_CTRL4
Value:
0xCD

Control register 4, Digital filter configuration


Definition at line 59 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_A3#

#define SI7210_REG_ADDR_A3
Value:
0xCE

Coefficient A3


Definition at line 60 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_A4#

#define SI7210_REG_ADDR_A4
Value:
0xCF

Coefficient A4


Definition at line 61 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_A5#

#define SI7210_REG_ADDR_A5
Value:
0xD0

Coefficient A5


Definition at line 62 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_OTP_ADDR#

#define SI7210_REG_ADDR_OTP_ADDR
Value:
0xE1

OTP address of the data to read


Definition at line 63 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_OTP_DATA#

#define SI7210_REG_ADDR_OTP_DATA
Value:
0xE2

Data read from OTP


Definition at line 64 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_OTP_CTRL#

#define SI7210_REG_ADDR_OTP_CTRL
Value:
0xE3

OTP read control register


Definition at line 65 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_ADDR_TM_FG#

#define SI7210_REG_ADDR_TM_FG
Value:
0xE4

On-chip test coil control


Definition at line 66 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_HREVID_REVID_MASK#

#define SI7210_REG_HREVID_REVID_MASK
Value:
0x0F

Revision ID mask, Hardware revision ID register


Definition at line 68 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_HREVID_REVID_SHIFT#

#define SI7210_REG_HREVID_REVID_SHIFT
Value:
0

Revision ID shift value, Hardware revision ID register


Definition at line 69 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_HREVID_CHIPID_MASK#

#define SI7210_REG_HREVID_CHIPID_MASK
Value:
0xF0

Chip ID mask, Hardware revision ID register


Definition at line 70 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_HREVID_CHIPID_SHIFT#

#define SI7210_REG_HREVID_CHIPID_SHIFT
Value:
4

Revision ID shift value, Hardware revision ID register


Definition at line 71 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_DSPSIGM_FRESH_MASK#

#define SI7210_REG_DSPSIGM_FRESH_MASK
Value:
0x80

New data available mask, MSB of last conversion result register


Definition at line 73 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_DSPSIGM_FRESH_SHIFT#

#define SI7210_REG_DSPSIGM_FRESH_SHIFT
Value:
7

New data available shift value, MSB of last conversion result register


Definition at line 74 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_DSPSIGM_DSPSIGM_MASK#

#define SI7210_REG_DSPSIGM_DSPSIGM_MASK
Value:
0x7F

MSB bits of conversion mask, MSB of last conversion result register


Definition at line 75 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_DSPSIGM_DSPSIGM_SHIFT#

#define SI7210_REG_DSPSIGM_DSPSIGM_SHIFT
Value:
0

MSB bits of conversion shift value, MSB of last conversion result register


Definition at line 76 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_SLEEP_MASK#

#define SI7210_REG_POWER_CTRL_SLEEP_MASK
Value:
0x01

Sleep mode bit mask, Power control register


Definition at line 78 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_SLEEP_SHIFT#

#define SI7210_REG_POWER_CTRL_SLEEP_SHIFT
Value:
0

Sleep mode bit shift value, Power control register


Definition at line 79 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_STOP_MASK#

#define SI7210_REG_POWER_CTRL_STOP_MASK
Value:
0x02

Stop bit mask, Power control register


Definition at line 80 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_STOP_SHIFT#

#define SI7210_REG_POWER_CTRL_STOP_SHIFT
Value:
1

Stop bit shift value, Power control register


Definition at line 81 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_ONEBURST_MASK#

#define SI7210_REG_POWER_CTRL_ONEBURST_MASK
Value:
0x04

One burst mesurement bit mask, Power control register


Definition at line 82 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_ONEBURST_SHIFT#

#define SI7210_REG_POWER_CTRL_ONEBURST_SHIFT
Value:
2

One burst mesurement bit shift value, Power control register


Definition at line 83 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_USESTORE_MASK#

#define SI7210_REG_POWER_CTRL_USESTORE_MASK
Value:
0x08

Save the current state of OTP regs bit mask, Power control register


Definition at line 84 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_USESTORE_SHIFT#

#define SI7210_REG_POWER_CTRL_USESTORE_SHIFT
Value:
3

Save the current state of OTP regs bit shift value, Power control register


Definition at line 85 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_MEAS_MASK#

#define SI7210_REG_POWER_CTRL_MEAS_MASK
Value:
0x80

Measurement in progress bit mask, Power control register


Definition at line 86 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_POWER_CTRL_MEAS_SHIFT#

#define SI7210_REG_POWER_CTRL_MEAS_SHIFT
Value:
7

Measurement in progress bit shift value, Power control register


Definition at line 87 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL1_SW_OP_MASK#

#define SI7210_REG_CTRL1_SW_OP_MASK
Value:
0x7F

Switching point mask, Control register 1


Definition at line 89 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL1_SW_OP_SHIFT#

#define SI7210_REG_CTRL1_SW_OP_SHIFT
Value:
0

Switching point shift value, Control register 1


Definition at line 90 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL1_SW_LOW4FIELD_MASK#

#define SI7210_REG_CTRL1_SW_LOW4FIELD_MASK
Value:
0x80

Output polarity setting bit mask, Control register 1


Definition at line 91 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL1_SW_LOW4FIELD_SHIFT#

#define SI7210_REG_CTRL1_SW_LOW4FIELD_SHIFT
Value:
7

Output polarity setting bit shift value, Control register 1


Definition at line 92 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL2_SW_HYST_MASK#

#define SI7210_REG_CTRL2_SW_HYST_MASK
Value:
0x3F

Switch hysteresis mask, Control register 2


Definition at line 94 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL2_SW_HYST_SHIFT#

#define SI7210_REG_CTRL2_SW_HYST_SHIFT
Value:
0

Switch hyteresis shift value, Control register 2


Definition at line 95 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL2_SW_FIELDPOLSEL_MASK#

#define SI7210_REG_CTRL2_SW_FIELDPOLSEL_MASK
Value:
0xC0

Switch polarity mask, Control register 2


Definition at line 96 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL2_SW_FIELDPOLSEL_SHIFT#

#define SI7210_REG_CTRL2_SW_FIELDPOLSEL_SHIFT
Value:
6

Switchi polarity shift value, Control register 2


Definition at line 97 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL3_SLTIMEENA_MASK#

#define SI7210_REG_CTRL3_SLTIMEENA_MASK
Value:
0x01

Sleep timer enable bit mask, Control register 3


Definition at line 99 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL3_SLTIMEENA_SHIFT#

#define SI7210_REG_CTRL3_SLTIMEENA_SHIFT
Value:
0

Sleep timer enable bit shift value, Control register 3


Definition at line 100 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL3_SLFAST_MASK#

#define SI7210_REG_CTRL3_SLFAST_MASK
Value:
0x02

Sleep time reduction enable bit mask, Control register 3


Definition at line 101 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL3_SLFAST_SHIFT#

#define SI7210_REG_CTRL3_SLFAST_SHIFT
Value:
1

Sleep time reduction bit shift value, Control register 3


Definition at line 102 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL3_SW_TAMPER_MASK#

#define SI7210_REG_CTRL3_SW_TAMPER_MASK
Value:
0xFC

Tamper switch threshold mask, Control register 3


Definition at line 103 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL3_SW_TAMPER_SHIFT#

#define SI7210_REG_CTRL3_SW_TAMPER_SHIFT
Value:
2

Tamper switch threshold shift value, Control register 3


Definition at line 104 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL4_IIR_MASK#

#define SI7210_REG_CTRL4_IIR_MASK
Value:
0x01

IIR filter enable bit mask, Control register 4


Definition at line 106 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL4_IIR_SHIFT#

#define SI7210_REG_CTRL4_IIR_SHIFT
Value:
0

IIR filter enable bit shift value, Control register 4


Definition at line 107 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL4_DF_BW_MASK#

#define SI7210_REG_CTRL4_DF_BW_MASK
Value:
0x1E

Number of samples to average mask, Control register 4


Definition at line 108 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL4_DF_BW_SHIFT#

#define SI7210_REG_CTRL4_DF_BW_SHIFT
Value:
1

Number of samples to average shift value, Control register 4


Definition at line 109 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL4_DF_BURSTSIZE_MASK#

#define SI7210_REG_CTRL4_DF_BURSTSIZE_MASK
Value:
0x0E

Measurement burst size mask, Control register 4


Definition at line 110 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_CTRL4_DF_BURSTSIZE_SHIFT#

#define SI7210_REG_CTRL4_DF_BURSTSIZE_SHIFT
Value:
5

Measurement burst size shift value, Control register 4


Definition at line 111 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_OTP_CTRL_BUSY_MASK#

#define SI7210_REG_OTP_CTRL_BUSY_MASK
Value:
0x01

OTP busy indicator bit mask, OTP read control register


Definition at line 113 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_OTP_CTRL_BUSY_SHIFT#

#define SI7210_REG_OTP_CTRL_BUSY_SHIFT
Value:
0

OTP busy indicator bit shift value, OTP read control register


Definition at line 114 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_OTP_CTRL_READ_EN_MASK#

#define SI7210_REG_OTP_CTRL_READ_EN_MASK
Value:
0x02

OTP read enable bit mask, OTP read control register


Definition at line 115 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_REG_OTP_CTRL_READ_EN_SHIFT#

#define SI7210_REG_OTP_CTRL_READ_EN_SHIFT
Value:
1

OTP read enable bit shift value, OTP read control register


Definition at line 116 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_CTRL1#

#define SI7210_OTP_ADDR_CTRL1
Value:
0x04

OTP Control register 1, output pin configuration


Definition at line 118 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_CTRL2#

#define SI7210_OTP_ADDR_CTRL2
Value:
0x05

OTP Control register 2, output pin configuration


Definition at line 119 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_SLTIME#

#define SI7210_OTP_ADDR_SLTIME
Value:
0x06

OTP Sleep time control register


Definition at line 120 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_CTRL3#

#define SI7210_OTP_ADDR_CTRL3
Value:
0x08

OTP Control register 3, output pin and sleep time configuration


Definition at line 121 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_POWER_UP_A0#

#define SI7210_OTP_ADDR_POWER_UP_A0
Value:
0x09

OTP Coefficient A0


Definition at line 122 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_POWER_UP_A1#

#define SI7210_OTP_ADDR_POWER_UP_A1
Value:
0x0A

OTP Coefficient A1


Definition at line 123 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_POWER_UP_A2#

#define SI7210_OTP_ADDR_POWER_UP_A2
Value:
0x0B

OTP Coefficient A2


Definition at line 124 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_CTRL4#

#define SI7210_OTP_ADDR_CTRL4
Value:
0x0C

OTP Control register 4, Digital filter configuration


Definition at line 125 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_POWER_UP_A3#

#define SI7210_OTP_ADDR_POWER_UP_A3
Value:
0x0D

OTP Coefficient A3


Definition at line 126 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_POWER_UP_A4#

#define SI7210_OTP_ADDR_POWER_UP_A4
Value:
0x0E

OTP Coefficient A4


Definition at line 127 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_POWER_UP_A5#

#define SI7210_OTP_ADDR_POWER_UP_A5
Value:
0x0F

OTP Coefficient A5


Definition at line 128 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_BASE_PART_NUMBER#

#define SI7210_OTP_ADDR_BASE_PART_NUMBER
Value:
0x14

OTP Base part number


Definition at line 129 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_VARIANT#

#define SI7210_OTP_ADDR_VARIANT
Value:
0x15

OTP Variant number


Definition at line 130 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_SERIAL_NUMBER#

#define SI7210_OTP_ADDR_SERIAL_NUMBER
Value:
0x18

OTP Serial number


Definition at line 131 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_BPERVCAL#

#define SI7210_OTP_ADDR_BPERVCAL
Value:
0x20

OTP On-chip field generator calibration value


Definition at line 132 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_COEFFS_20MT#

#define SI7210_OTP_ADDR_COEFFS_20MT
Value:
0x21

OTP 20mT scale no magnet temperature compensation value


Definition at line 134 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_COEFFS_200MT#

#define SI7210_OTP_ADDR_COEFFS_200MT
Value:
0x27

OTP 200mT scale no magnet temperature compensation value


Definition at line 135 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_COEFFS_20MT_NEODYMIUM#

#define SI7210_OTP_ADDR_COEFFS_20MT_NEODYMIUM
Value:
0x2D

OTP 20mT scale neodymium magnet temperature compensation value


Definition at line 136 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_COEFFS_200MT_NEODYMIUM#

#define SI7210_OTP_ADDR_COEFFS_200MT_NEODYMIUM
Value:
0x33

OTP 200mT scale neodymium temperature compensation value


Definition at line 137 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_COEFFS_20MT_CERAMIC#

#define SI7210_OTP_ADDR_COEFFS_20MT_CERAMIC
Value:
0x39

OTP 20mT scale ceramic magnet temperature compensation value


Definition at line 138 of file hardware/driver/si7210/inc/sl_si7210_regs.h

SI7210_OTP_ADDR_COEFFS_200MT_CERAMIC#

#define SI7210_OTP_ADDR_COEFFS_200MT_CERAMIC
Value:
0x3F

OTP 200mT scale ceramic magnet temperature compensation value


Definition at line 139 of file hardware/driver/si7210/inc/sl_si7210_regs.h

Function Documentation#

sl_si7210_read_otp_register#

sl_status_t sl_si7210_read_otp_register (sl_i2cspm_t * i2cspm, uint8_t otpAddr, uint8_t * otpData)

Read register from the OTP area of the Si7021 device.

Parameters
[in]i2cspm

The I2CSPM instance to use.

[in]otpAddr

The register address to read from in the sensor

[out]otpData

The data read from the device


Definition at line 291 of file hardware/driver/si7210/inc/sl_si7210.h

sl_si7210_read_register#

sl_status_t sl_si7210_read_register (sl_i2cspm_t * i2cspm, uint8_t addr, uint8_t * data)

Read register from the Hall sensor device.

Parameters
[in]i2cspm

The I2CSPM instance to use.

[in]addr

The register address to read from in the sensor

[out]data

The data read from the device


Definition at line 309 of file hardware/driver/si7210/inc/sl_si7210.h

sl_si7210_write_register#

sl_status_t sl_si7210_write_register (sl_i2cspm_t * i2cspm, uint8_t addr, uint8_t data)

Write a register in the Hall sensor device.

Parameters
[in]i2cspm

The I2CSPM instance to use.

[in]addr

The register address to write

[in]data

The data to write to the register


Definition at line 327 of file hardware/driver/si7210/inc/sl_si7210.h

sl_si7210_set_register_bits#

sl_status_t sl_si7210_set_register_bits (sl_i2cspm_t * i2cspm, uint8_t addr, uint8_t mask)

Set the given bit(s) in a register in the Hall sensor device.

Parameters
[in]i2cspm

The I2CSPM instance to use.

[in]addr

The address of the register

[in]mask

The mask specifies which bits should be set. If a given bit of the mask is 1, that register bit will be set to 1. All the other register bits will be untouched.


Definition at line 347 of file hardware/driver/si7210/inc/sl_si7210.h

sl_si7210_clear_register_bits#

sl_status_t sl_si7210_clear_register_bits (sl_i2cspm_t * i2cspm, uint8_t addr, uint8_t mask)

Clear the given bit(s) in a register in the Hall sensor device.

Parameters
[in]i2cspm

The I2CSPM instance to use.

[in]addr

The address of the register

[in]mask

The mask specifies which bits should be clear. If a given bit of the mask is 1 that register bit will be cleared to 0. All the other register bits will be untouched.


Definition at line 367 of file hardware/driver/si7210/inc/sl_si7210.h

sl_si7210_calculate_sw_op#

uint8_t sl_si7210_calculate_sw_op (float threshold)

Calculate the sw_op value from the threshold by finding the inverse of the formula: threshold = (16 + sw_op[3:0]) * 2^sw_op[6:4].

Parameters
[in]threshold

Threshold value

Returns

  • The value of the sw_op bitfield


Definition at line 381 of file hardware/driver/si7210/inc/sl_si7210.h

sl_si7210_calculate_sw_hyst#

uint8_t sl_si7210_calculate_sw_hyst (float hysteresis, bool scale200mT)

Calculate the sw_hyst value from the hysteresis by finding the inverse of the formula: hysteresis = (8 + sw_hyst[2:0]) * 2^sw_hyst[5:3].

Parameters
[in]hysteresis

Hysteresis value

[in]scale200mT

scale200mT=false : full-scale equals 20mT scale200mT=true : full-scale equals 200mT

Returns

  • The value of the sw_hyst bitfield


Definition at line 399 of file hardware/driver/si7210/inc/sl_si7210.h

sl_si7210_calculate_sw_tamper#

uint8_t sl_si7210_calculate_sw_tamper (float tamper, bool scale200mT)

Calculate the sw_tamper value from the tamper threshold by finding the inverse of the formula: tamper = (16 + sw_tamper[3:0]) * 2^(sw_tamper[5:4] + 5)

Parameters
[in]tamper

scale200mT=false : full-scale equals 20mT scale200mT=true : full-scale equals 200mT

N/Ascale200mT
  • Returns

    • The value of the sw_tamper bitfield


Definition at line 417 of file hardware/driver/si7210/inc/sl_si7210.h

sl_si7210_calculate_sltime#

uint8_t sl_si7210_calculate_sltime (uint32_t samplePeriod, uint8_t * slFast)

Calculate the slTime value from the sleep time by finding the inverse of the formula: tsleep = (32 + slTime[4:0]) * 2^(8 + slTime[7:5]) / 12 MHz.

Parameters
[in]samplePeriod

The sleep time

[out]slFast

The value of the slFast bit

Returns

  • The value of the slTime bitfield


Definition at line 434 of file hardware/driver/si7210/inc/sl_si7210.h