RO Temperature Sensor#

Introduction#

A Ring Oscillator Temperature Sensor (RO Temperature Sensor) is a type of temperature sensor that utilizes a ring oscillator circuit to measure temperature variations. A ring oscillator is a circuit configuration that consists of an odd number of inverters connected in a loop. The frequency of oscillation of the ring oscillator is influenced by various factors, including temperature.

Here's how a Ring Oscillator Temperature Sensor typically works:

  • Ring Oscillator Circuit: The ring oscillator is designed with an odd number of inverters (amplifiers) connected in a loop. The delay through each inverter contributes to the overall oscillation frequency of the ring.

  • Temperature Sensitivity: The delay through each inverter is sensitive to temperature variations. As the temperature changes, the characteristics of the transistors in the inverters are affected, causing a change in the overall delay and, consequently, the oscillation frequency.

  • Frequency Measurement: The frequency of the ring oscillator is measured or monitored. This frequency is directly related to the temperature of the environment or the temperature of the integrated circuit itself.

  • Temperature Calibration: The sensor is often calibrated to provide an accurate temperature reading based on the measured oscillation frequency. Calibration may involve correlating the frequency with a temperature reference to create a temperature-sensitive output.

Configuration#

By altering the mode in the structure below, one can update the trigger time

Usage#

RO temperature sensor is set with nominal temperature and the temperature sensor is enabled after the Temperature is updated through RO based calculation. RO temperature sensor will be triggered and updated for every 2 seconds. And the apis used in the RO Temperature Sensor are:

  1. sl_si91x_ro_temperature_select_reference_clock

  2. sl_si91x_ro_temperature_nominal

  3. sl_si91x_ro_temperature_based_update

  4. sl_si91x_ro_temperature_set_count

  5. sl_si91x_ro_temperature_enable

  6. sl_si91x_ro_temperature_periodic_update

  7. sl_si91x_ro_temperature_read

Enumerations#

enum
SL_RO_REF_CLK
SL_RO_FSM_CLK
SL_RO_CLK_LAST
}

RO temperature sensor reference clock.

enum
SL_RO_TEMPERATURE_DISABLE
SL_RO_TEMPERATURE_ENABLE
SL_RO_TEMPERATURE_LAST
}

Enable/Disable RO temperature sensor.

enum
SL_RO_TEMP_BJT_UPDATE_ENABLE
SL_RO_TEMP_SPI_UPDATE_ENABLE
SL_RO_TEMP_BJT_UPDATE_LAST
}

Enable/Disable BJT based temperature update.

enum
SL_RO_TEMPERATURE_PERIODIC_DISABLE
SL_RO_TEMPERATURE_PERIODIC_ENABLE
SL_RO_TEMPERATURE_PERIODIC_LAST
}

Enable/Disable RO periodic temperature checking.

enum
SL_RO_TEMPERATURE_TRIGGER_1SEC
SL_RO_TEMPERATURE_TRIGGER_2SEC
SL_RO_TEMPERATURE_TRIGGER_4SEC
SL_RO_TEMPERATURE_TRIGGER_5SEC
SL_RO_TEMPERATURE_TRIGGER_LAST
}

RO temperature periodic check time.

Functions#

sl_status_t

Set reference clock count for RO temperature sensor.

sl_status_t
sl_si91x_ro_temperature_select_reference_clock(sl_ro_reference_clock_t ref_clk)

Select reference clock for RO temperature sensor.

sl_status_t
sl_si91x_ro_temperature_enable(sl_ro_temperature_state_t state)

Enable/disable RO temperature sensor.

sl_status_t

Set nominal value for RO temperature sensor.

sl_status_t
sl_si91x_ro_temperature_read(int32_t *temperature)

Read value from RO temperature sensor.

sl_status_t
sl_si91x_ro_temperature_based_update(sl_ro_temperature_update_t enable)

Calculate temperature from RO temperature sensor reading.

sl_status_t
sl_si91x_ro_temperature_load(uint8_t temperature)

Update temperature for RO temperature sensor.

sl_status_t

Get reference clock count for RO temperature sensor.

sl_status_t

Get ptat clock count for RO temperature sensor.

sl_status_t
sl_si91x_ro_temperature_periodic_update(sl_ro_temperature_periodic_check_t periodic_check, sl_ro_temperature_trigger_time_t trigger_time)

Update temperature periodically for RO temperature sensor.

Enumeration Documentation#

sl_ro_reference_clock_t#

sl_ro_reference_clock_t

RO temperature sensor reference clock.

Enumerator
SL_RO_REF_CLK

Enable RO kHz clock from analog as reference clock.

SL_RO_FSM_CLK

Enable MCU FSM clock as reference clock.

SL_RO_CLK_LAST

Last member of enum for validation.


Definition at line 64 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_ro_temperature_state_t#

sl_ro_temperature_state_t

Enable/Disable RO temperature sensor.

Enumerator
SL_RO_TEMPERATURE_DISABLE

Temperature sensing disable.

SL_RO_TEMPERATURE_ENABLE

Temperature sensing enable.

SL_RO_TEMPERATURE_LAST

Last member of enum for validation.


Definition at line 71 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_ro_temperature_update_t#

sl_ro_temperature_update_t

Enable/Disable BJT based temperature update.

Enumerator
SL_RO_TEMP_BJT_UPDATE_ENABLE

Enable BJT based temperature through RO calculation.

SL_RO_TEMP_SPI_UPDATE_ENABLE

Disable BJT based temperature through RO calculation and Enable update through SPI.

SL_RO_TEMP_BJT_UPDATE_LAST

Last member of enum for validation.


Definition at line 78 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_ro_temperature_periodic_check_t#

sl_ro_temperature_periodic_check_t

Enable/Disable RO periodic temperature checking.

Enumerator
SL_RO_TEMPERATURE_PERIODIC_DISABLE

Periodic temperature checking disable.

SL_RO_TEMPERATURE_PERIODIC_ENABLE

Periodic temperature checking enable.

SL_RO_TEMPERATURE_PERIODIC_LAST

Last member of enum for validation.


Definition at line 85 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_ro_temperature_trigger_time_t#

sl_ro_temperature_trigger_time_t

RO temperature periodic check time.

Enumerator
SL_RO_TEMPERATURE_TRIGGER_1SEC

RO temperature update for every 1second.

SL_RO_TEMPERATURE_TRIGGER_2SEC

RO temperature update for every 2seconds.

SL_RO_TEMPERATURE_TRIGGER_4SEC

RO temperature update for every 4seconds.

SL_RO_TEMPERATURE_TRIGGER_5SEC

RO temperature update for every 5seconds.

SL_RO_TEMPERATURE_TRIGGER_LAST

Last member of enum for validation.


Definition at line 92 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

Function Documentation#

sl_si91x_ro_temperature_set_count#

sl_status_t sl_si91x_ro_temperature_set_count (uint32_t count)

Set reference clock count for RO temperature sensor.

Parameters
[in]count

Count of reference clock on which ptat clock counts (0- 1024)

This API is used to set the count of reference clock on which ptat clock counts.

Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 115 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_select_reference_clock#

sl_status_t sl_si91x_ro_temperature_select_reference_clock (sl_ro_reference_clock_t ref_clk)

Select reference clock for RO temperature sensor.

Parameters
[in]ref_clk

Reference clock selection:

  • 0 - reference RO clock from analog

  • 1 - MCU FSM clock

This API is used to select the reference clock to the temperature sensor Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 128 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_enable#

sl_status_t sl_si91x_ro_temperature_enable (sl_ro_temperature_state_t state)

Enable/disable RO temperature sensor.

Parameters
[in]state

Enable / disable the temperature sensor:

  • 0 - Disable

  • 1 - Enable

This API is used to enable / disable the temperature sensor Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 141 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_nominal#

sl_status_t sl_si91x_ro_temperature_nominal (uint32_t value)

Set nominal value for RO temperature sensor.

Parameters
[in]value

Calibrated temperature value(0-128).

This API is used to set the nominal value of the temperature sensor

Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 154 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_read#

sl_status_t sl_si91x_ro_temperature_read (int32_t * temperature)

Read value from RO temperature sensor.

Parameters
[out]temperature

Temperature value reading

This API is used to read the temperature value Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 164 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_based_update#

sl_status_t sl_si91x_ro_temperature_based_update (sl_ro_temperature_update_t enable)

Calculate temperature from RO temperature sensor reading.

Parameters
[in]enable

Enable RO based BJT temperature update

This API is used to updating temperature through RO based calculation Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 175 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_load#

sl_status_t sl_si91x_ro_temperature_load (uint8_t temperature)

Update temperature for RO temperature sensor.

Parameters
[in]temperature

Known temperature (0- 255)

This API is used to updating temperature

Returns

  • SL_STATUS_OK on success


Definition at line 185 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_get_reference_clk_count#

sl_status_t sl_si91x_ro_temperature_get_reference_clk_count (uint32_t * ref_count)

Get reference clock count for RO temperature sensor.

Parameters
[out]ref_count

Count of f1 clock cycles

This API is used to read the reference clock count Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 195 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_get_ptat_clk_count#

sl_status_t sl_si91x_ro_temperature_get_ptat_clk_count (uint32_t * ptat_count)

Get ptat clock count for RO temperature sensor.

Parameters
[out]ptat_count

Count of f2 clock cycles

This API is used to read the ptat clock count Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 205 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h

sl_si91x_ro_temperature_periodic_update#

sl_status_t sl_si91x_ro_temperature_periodic_update (sl_ro_temperature_periodic_check_t periodic_check, sl_ro_temperature_trigger_time_t trigger_time)

Update temperature periodically for RO temperature sensor.

Parameters
[in]periodic_check

Enable periodic checking of temperature

[in]trigger_time

Periodic check time in sec:

  • 0 - for every 1 sec

  • 1 - for every 2 secs

  • 2 - for every 4 secs

  • 3 - for every 5 secs

This API is used to update the temperature periodically after some time Returns

  • Status 0 if successful, else error code:

    • SL_STATUS_OK on success

    • SL_STATUS_INVALID_PARAMETER (0x0021) , The parameter is invalid argument

    • SL_STATUS_NULL_POINTER (0x0022) , The parameter is null pointer


Definition at line 221 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ro_temperature_sensor.h