AON Domain Functionality

Description

Provides access to always-on domain system functionality

This includes:

  • AON_BATMON values (measured temperature and VDDS voltage). This can for example be used to:
    • Compensate for temperature and supply voltage dependencies
  • AON_RTC values (16-bit second and 16-bit sub-second). This can for example be used to:
    • Timestamp measurement results
    • Calculate the time between wake-ups
  • VDDR recharge monitoring and triggering. This can for example be used to:
    • Redo or invalidate measurements that might have been disturbed by current spikes during VDDR recharging.
    • Ensure that VDDR recharging current spikes do not occur during measurements.
  • System state (MCU domain, AUX domain and JTAG) and power supply state. This can for example be used to:
    • Detect or avoid measurement disturbances caused by VDDR recharging.
  • Detection of side-effects on the 2 MHz clock when the Sensor Controller is in low-power mode and the MCU domain switches between standby and active modes. This can for example be used to:
    • Redo or invalidate measurements that might have been disturbed by jitter on the 2 MHz clock.

Examples

Timestamping Using RTC

// Select ADC (and COMPB) input
adcSelectGpioInput(AUXIO_A_SIGNAL);

// Enable the ADC
adcEnableSync(ADC_REF_FIXED, ADC_SAMPLE_TIME_2P7_US, ADC_TRIGGER_MANUAL);

// Sample the sensor and get the timestamp
U16 adcValue;
adcGenManualTrigger();
sysGetRtcValue(output.timestampSec, output.timestampSubsec);
adcReadFifo(output.adcValue);

// Disable the ADC
adcDisable();

AON_BATMON Temperature Reading

// Get temperature from AON_BATMON (signed, unit = 1/4 degrees C)
S16 temp;
sysGetBatmonTemp(temp);

// Change algorithm behavior depending on temperature (60 degrees C)
if (temp > (60 << 2)) {
    ...
} else {
    ...
}

AON_BATMON Voltage Reading

// Get voltage from AON_BATMON [unsigned, unit = 1/256 volts]
U16 volt;
sysGetBatmonVolt(volt);

// Change algorithm behavior depending on supply voltage (2.5 V)
if (volt > (5 << 7)) {
    ...
} else {
    ...
}

Procedures Overview

Name Brief description
sysCheckActiveState() Returns whether any part of the system (MCU domain, AUX domain and/or JTAG) is in active mode. More …
sysCheckMcuPmSwitchDet() Returns whether the MCU domain has switched between the active and standby power mode since the last call to sysClearMcuPmSwitchDet() . More …
sysCheckVddrRechargeDet() Returns the VDDR recharge detection flag. More …
sysClearMcuPmSwitchDet() Clears the MCU domain power mode switch detection flag that is returned by sysCheckMcuPmSwitchDet() . More …
sysDisableVddrRechargeDet() Disables and resets the VDDR recharge detection flag. More …
sysEnableVddrRechargeDet() Enables the VDDR recharge detection flag. More …
sysForceAndWaitOnVddrRecharge() Forces VDDR recharging, and waits for it to finish. More …
sysGetBatmonTemp() Returns the last AON_BATMON temperature value. More …
sysGetBatmonVolt() Returns the last AON_BATMON voltage value. More …
sysGetPwrSupplyState() Returns the current state of the power supply system. More …
sysGetRtcSubsecValue() Returns the current sub-second part of the RTC counter value. More …
sysGetRtcValue() Returns the current RTC counter value in 16.16 format (16-bit second value, 16-bit sub-second value). More …
sysGetVddrRechargeState() Returns the current VDDR recharging state. More …
sysWaitForActiveState() Waits until any part of the system (MCU domain, AUX domain and/or JTAG) is in active mode, or until no part of the system is longer in active mode. More …
sysWaitForPwrSupplyState() Waits for the specified power supply system state. More …
sysWaitForVddrRechargeState() Waits for the specified VDDR recharging state. More …

Constants

None.

Global Variables

None.

Procedures

sysCheckActiveState

Prototype: sysCheckActiveState(isActive)

Returns whether any part of the system (MCU domain, AUX domain and/or JTAG) is in active mode.

The AUX domain is in active mode when:

  • The Sensor Controller is in active mode
  • Timer 2 runs at 24 MHz (SCLK_HF/2)

Return value(s)

  • isActive : 1 if any part of the system (MCU domain, AUX domain and/or JTAG) is in active mode, otherwise 0

sysCheckMcuPmSwitchDet

Prototype: sysCheckMcuPmSwitchDet(flag)

Returns whether the MCU domain has switched between the active and standby power mode since the last call to sysClearMcuPmSwitchDet() .

The switch affects the Sensor Controller and AUX domain peripherals, except Timer 2, in low-power mode or standby mode:

  • A single 2 MHz / 32 kHz clock cycle is up to 0.167 us longer when MCU domain enters active state
  • A single 2 MHz / 32 kHz clock cycle is up to 0.167 us shorter when MCU domain exits active state

Return value(s)

  • flag : 1 if an MCU domain power mode switch has occurred, otherwise 0

sysCheckVddrRechargeDet

Prototype: sysCheckVddrRechargeDet(flag)

Returns the VDDR recharge detection flag.

Return value(s)

  • flag : 1 if VDDR recharging has occurred since detection was enabled, otherwise 0

sysClearMcuPmSwitchDet

Prototype: sysClearMcuPmSwitchDet()

Clears the MCU domain power mode switch detection flag that is returned by sysCheckMcuPmSwitchDet() .

sysDisableVddrRechargeDet

Prototype: sysDisableVddrRechargeDet()

Disables and resets the VDDR recharge detection flag.

sysEnableVddrRechargeDet

Prototype: sysEnableVddrRechargeDet()

Enables the VDDR recharge detection flag.

sysForceAndWaitOnVddrRecharge

Prototype: sysForceAndWaitOnVddrRecharge()

Forces VDDR recharging, and waits for it to finish.

This can be used to avoid noise caused by VDDR recharging. To avoid noise caused by System CPU activities, for example use of serial interfaces or the radio, the System CPU application can notify Sensor Controller tasks by setting a Sensor Controller data structure variable during such activities.

VDDR recharging is not triggered if any part of the system (MCU domain, AUX domain and/or JTAG) is currently in active mode.

sysGetBatmonTemp

Prototype: sysGetBatmonTemp(temperature)

Returns the last AON_BATMON temperature value.

Important: The value resolution and accuracy are very limited compared to the return value unit. See the device datasheet for details.

Return value(s)

  • temperature : Temperature in units of 1/4 degrees C (2’s complement)

sysGetBatmonVolt

Prototype: sysGetBatmonVolt(voltage)

Returns the last AON_BATMON voltage value.

Important: The value resolution and accuracy are very limited compared to the return value unit. See the device datasheet for details.

Return value(s)

  • voltage : Voltage in units of 1/256 V

sysGetPwrSupplyState

Prototype: sysGetPwrSupplyState(isActive)

Returns the current state of the power supply system.

The power supply system is in active mode while any part of the system (MCU domain, AUX domain and/or JTAG) is in active mode, and also during VDDR recharge. In this state:

  • VDDR is driven by DCDC / Global LDO from VDDS
  • VDD is driven by Digital LDO from VDDR

The power supply system is in standby mode otherwise. In this case:

  • VDDR is discharging slowly
  • VDD is driven by Micro LDO from VDDR

Return value(s)

  • isActive : 1 if the power supply is in active mode, 0 if the power supply is in standby mode

sysGetRtcSubsecValue

Prototype: sysGetRtcSubsecValue(subsec)

Returns the current sub-second part of the RTC counter value.

Return value(s)

  • subsec : Sub-second value

sysGetRtcValue

Prototype: sysGetRtcValue(sec, subsec)

Returns the current RTC counter value in 16.16 format (16-bit second value, 16-bit sub-second value).

Return value(s)

  • sec : Second value
  • subsec : Sub-second value

sysGetVddrRechargeState

Prototype: sysGetVddrRechargeState(state)

Returns the current VDDR recharging state.

Return value(s)

  • state : 1 if VDDR recharging is currently ongoing, otherwise 0

sysWaitForActiveState

Prototype: sysWaitForActiveState(#waitForActive)

Waits until any part of the system (MCU domain, AUX domain and/or JTAG) is in active mode, or until no part of the system is longer in active mode.

Parameter value(s)

  • #waitForActive : State to wait for (1 = active, 0 = standby)

sysWaitForPwrSupplyState

Prototype: sysWaitForPwrSupplyState(#waitForActive)

Waits for the specified power supply system state.

The power supply system is in active mode while any part of the system (MCU domain, AUX domain and/or JTAG) is in active mode, and also during VDDR recharge. In this state:

  • VDDR is driven by DCDC / Global LDO from VDDS
  • VDD is driven by Digital LDO from VDDR

The power supply system is in standby mode otherwise. In this case:

  • VDDR is discharging slowly
  • VDD is driven by Micro LDO from VDDR

Parameter value(s)

  • #waitForActive : State to wait for (1 = active, 0 = standby)

sysWaitForVddrRechargeState

Prototype: sysWaitForVddrRechargeState(#waitForActive)

Waits for the specified VDDR recharging state.

Parameter value(s)

  • #waitForActive : State to wait for (1 = active, 0 = idle)