ETAMPDET - External Tamper Detect
Description
External Tamper Detect (ETAMPDET) Peripheral API.
This module contains functions to control the ETAMPDET peripheral of Silicon Labs 32-bit MCUs and SoCs. The ETAMPDET can alert the system to unauthorized physical access with very low current consumption.
Data Structures |
|
struct | sl_etampdet_config_channel_t |
ETAMPDET channel configuration structure.
|
|
struct | sl_etampdet_config_t |
ETAMPDET configuration structure.
|
|
Functions |
|
void | sl_etampdet_init (const sl_etampdet_config_t *config) |
Initialize ETAMPDET.
|
|
void | sl_etampdet_init_channel (const sl_etampdet_config_channel_t *config_channel) |
Initialize ETAMPDET channel.
|
|
void | sl_etampdet_wait_sync (void) |
Wait for the ETAMPDET to complete all synchronization of register changes and commands.
|
|
void | sl_etampdet_wait_ready (void) |
Wait for the ETAMPDET to complete disabling procedure.
|
|
void | sl_etampdet_enable (void) |
Enable ETAMPDET.
|
|
void | sl_etampdet_disable (void) |
Disable ETAMPDET.
|
|
void | sl_etampdet_load ( sl_etampdet_channel_t channel) |
Load seed value into channel LFSR.
|
|
void | sl_etampdet_start ( sl_etampdet_channel_t channel) |
Start ETAMPDET channel.
|
|
void | sl_etampdet_stop ( sl_etampdet_channel_t channel) |
Stop ETAMPDET channel.
|
|
void | sl_etampdet_enable_interrupts (uint32_t interrupts) |
Enable ETAMPDET interrupts.
|
|
void | sl_etampdet_disable_interrupts (uint32_t interrupts) |
Disable ETAMPDET interrupts.
|
|
void | sl_etampdet_set_interrupts (uint32_t interrupts) |
Set ETAMPDET interrupts.
|
|
void | sl_etampdet_clear_interrupts (uint32_t interrupts) |
Clear ETAMPDET interrupts.
|
|
uint32_t | sl_etampdet_get_interrupts (void) |
Gets pending ETAMPDET interrupt flags.
|
|
uint32_t | sl_etampdet_get_enabled_interrupts (void) |
Gets enabled and pending ETAMPDET interrupt flags.
|
|
void | sl_etampdet_lock (void) |
Lock ETAMPDET registers.
|
|
void | sl_etampdet_unlock (void) |
Unlock ETAMPDET registers.
|
|
uint32_t | sl_etampdet_get_status (void) |
Gets ETAMPDET STATUS register value.
|
|
void | sl_etampdet_set_seed_value (uint32_t seed_value, sl_etampdet_channel_t channel) |
Set ETAMPDET channel seed value.
|
|
uint32_t | sl_etampdet_get_seed_value ( sl_etampdet_channel_t channel) |
Get ETAMPDET channel seed value.
|
|
Macros |
|
#define | ETAMPDET_CONFIG_CHANNEL_DEFAULT |
ETAMPDET default channel configuration.
|
|
#define | ETAMPDET_CONFIG_DEFAULT |
ETAMPDET default configuration.
|
|
Enumerations |
|
enum |
sl_etampdet_channel_t
{
channel_0 = 0, channel_1 } |
ETAMPDET channels.
|
|
enum |
sl_etampdet_channel_cnt_mismatch_threshold_t
{
detect_filt_threshold_1 = _ETAMPDET_CNTMISMATCHMAX_CHNLCNTMISMATCHMAX0_DetectFilterThreshold1, detect_filt_threshold_2 = _ETAMPDET_CNTMISMATCHMAX_CHNLCNTMISMATCHMAX0_DetectFilterThreshold2, detect_filt_threshold_3 = _ETAMPDET_CNTMISMATCHMAX_CHNLCNTMISMATCHMAX0_DetectFilterThreshold3, detect_filt_threshold_4 = _ETAMPDET_CNTMISMATCHMAX_CHNLCNTMISMATCHMAX0_DetectFilterThreshold4, detect_filt_threshold_5 = _ETAMPDET_CNTMISMATCHMAX_CHNLCNTMISMATCHMAX0_DetectFilterThreshold5, detect_filt_threshold_6 = _ETAMPDET_CNTMISMATCHMAX_CHNLCNTMISMATCHMAX0_DetectFilterThreshold6, detect_filt_threshold_7 = _ETAMPDET_CNTMISMATCHMAX_CHNLCNTMISMATCHMAX0_DetectFilterThreshold7, detect_filt_threshold_8 = _ETAMPDET_CNTMISMATCHMAX_CHNLCNTMISMATCHMAX0_DetectFilterThreshold8 } |
ETAMPDET filter thresholds.
|
|
enum |
sl_etampdet_channel_filt_win_size_t
{
detect_filt_win_size_2 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize2, detect_filt_win_size_3 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize3, detect_filt_win_size_4 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize4, detect_filt_win_size_5 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize5, detect_filt_win_size_6 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize6, detect_filt_win_size_7 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize7, detect_filt_win_size_8 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize8, detect_filt_win_size_9 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize9, detect_filt_win_size_10 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize10, detect_filt_win_size_11 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize11, detect_filt_win_size_12 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize12, detect_filt_win_size_13 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize13, detect_filt_win_size_14 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize14, detect_filt_win_size_15 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize15, detect_filt_win_size_16 = _ETAMPDET_CHNLFILTWINSIZE_CHNLFILTWINSIZE0_DetectFilterMovingWinSize16 } |
ETAMPDET filter moving window size.
|
|
enum |
sl_etampdet_upper_clk_presc_t
{
upper_clk_prescaler_bypass = _ETAMPDET_CLKPRESCVAL_UPPERPRESC_Bypass, upper_clk_prescaler_divide_2 = _ETAMPDET_CLKPRESCVAL_UPPERPRESC_DivideBy2, upper_clk_prescaler_divide_4 = _ETAMPDET_CLKPRESCVAL_UPPERPRESC_DivideBy4, upper_clk_prescaler_divide_8 = _ETAMPDET_CLKPRESCVAL_UPPERPRESC_DivideBy8, upper_clk_prescaler_divide_16 = _ETAMPDET_CLKPRESCVAL_UPPERPRESC_DivideBy16, upper_clk_prescaler_divide_32 = _ETAMPDET_CLKPRESCVAL_UPPERPRESC_DivideBy32, upper_clk_prescaler_divide_64 = _ETAMPDET_CLKPRESCVAL_UPPERPRESC_DivideBy64 } |
ETAMPDET upper part of divider ripple counter.
|
|
enum |
sl_etampdet_lower_clk_presc_t
{
lower_clk_prescaler_bypass = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_Bypass, lower_clk_prescaler_divide_2 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy2, lower_clk_prescaler_divide_3 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy3, lower_clk_prescaler_divide_4 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy4, lower_clk_prescaler_divide_5 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy5, lower_clk_prescaler_divide_6 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy6, lower_clk_prescaler_divide_7 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy7, lower_clk_prescaler_divide_8 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy8, lower_clk_prescaler_divide_9 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy9, lower_clk_prescaler_divide_10 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy10, lower_clk_prescaler_divide_11 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy11, lower_clk_prescaler_divide_12 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy12, lower_clk_prescaler_divide_13 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy13, lower_clk_prescaler_divide_14 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy14, lower_clk_prescaler_divide_15 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy15, lower_clk_prescaler_divide_16 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy16, lower_clk_prescaler_divide_17 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy17, lower_clk_prescaler_divide_18 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy18, lower_clk_prescaler_divide_19 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy19, lower_clk_prescaler_divide_20 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy20, lower_clk_prescaler_divide_21 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy21, lower_clk_prescaler_divide_22 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy22, lower_clk_prescaler_divide_23 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy23, lower_clk_prescaler_divide_24 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy24, lower_clk_prescaler_divide_25 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy25, lower_clk_prescaler_divide_26 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy26, lower_clk_prescaler_divide_27 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy27, lower_clk_prescaler_divide_28 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy28, lower_clk_prescaler_divide_29 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy29, lower_clk_prescaler_divide_30 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy30, lower_clk_prescaler_divide_31 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy31, lower_clk_prescaler_divide_32 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy32, lower_clk_prescaler_divide_33 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy33, lower_clk_prescaler_divide_34 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy34, lower_clk_prescaler_divide_35 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy35, lower_clk_prescaler_divide_36 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy36, lower_clk_prescaler_divide_37 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy37, lower_clk_prescaler_divide_38 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy38, lower_clk_prescaler_divide_39 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy39, lower_clk_prescaler_divide_40 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy40, lower_clk_prescaler_divide_41 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy41, lower_clk_prescaler_divide_42 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy42, lower_clk_prescaler_divide_43 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy43, lower_clk_prescaler_divide_44 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy44, lower_clk_prescaler_divide_45 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy45, lower_clk_prescaler_divide_46 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy46, lower_clk_prescaler_divide_47 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy47, lower_clk_prescaler_divide_48 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy48, lower_clk_prescaler_divide_49 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy49, lower_clk_prescaler_divide_50 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy50, lower_clk_prescaler_divide_51 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy51, lower_clk_prescaler_divide_52 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy52, lower_clk_prescaler_divide_53 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy53, lower_clk_prescaler_divide_54 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy54, lower_clk_prescaler_divide_55 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy55, lower_clk_prescaler_divide_56 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy56, lower_clk_prescaler_divide_57 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy57, lower_clk_prescaler_divide_58 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy58, lower_clk_prescaler_divide_59 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy59, lower_clk_prescaler_divide_60 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy60, lower_clk_prescaler_divide_61 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy61, lower_clk_prescaler_divide_62 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy62, lower_clk_prescaler_divide_63 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy63, lower_clk_prescaler_divide_64 = _ETAMPDET_CLKPRESCVAL_LOWERPRESC_DivideBy64 } |
ETAMPDET lower part of divider binary counter.
|
|
Function Documentation
◆ sl_etampdet_init()
void sl_etampdet_init | ( | const sl_etampdet_config_t * |
config
|
) |
Initialize ETAMPDET.
- Parameters
-
[in] config
The pointer to the initialization structure.
- Note
- User should call sl_etampdet_init_channel() for full initialization. This function should be called before sl_etampdet_init_channel()
- The control registers setting of the GPIOs to be used by ETAMPDET should be at the default values to ensure that other clients are not accidentally driving the GPIOs that ETAMPDET is using.
◆ sl_etampdet_init_channel()
void sl_etampdet_init_channel | ( | const sl_etampdet_config_channel_t * |
config_channel
|
) |
Initialize ETAMPDET channel.
- Parameters
-
[in] config_channel
The pointer to the channel initialization structure.
- Note
- User should call sl_etampdet_init() for full initialization.
◆ sl_etampdet_wait_sync()
|
inline |
Wait for the ETAMPDET to complete all synchronization of register changes and commands.
◆ sl_etampdet_wait_ready()
|
inline |
Wait for the ETAMPDET to complete disabling procedure.
◆ sl_etampdet_enable()
|
inline |
Enable ETAMPDET.
◆ sl_etampdet_disable()
|
inline |
Disable ETAMPDET.
◆ sl_etampdet_load()
|
inline |
Load seed value into channel LFSR.
- Parameters
-
[in] channel
The channel number.
◆ sl_etampdet_start()
|
inline |
Start ETAMPDET channel.
- Parameters
-
[in] channel
The channel number.
◆ sl_etampdet_stop()
|
inline |
Stop ETAMPDET channel.
- Parameters
-
[in] channel
The channel number.
◆ sl_etampdet_enable_interrupts()
|
inline |
Enable ETAMPDET interrupts.
- Parameters
-
[in] interrupts
The interrupts flags to enable.
◆ sl_etampdet_disable_interrupts()
|
inline |
Disable ETAMPDET interrupts.
- Parameters
-
[in] interrupts
The interrupts flags to disable.
◆ sl_etampdet_set_interrupts()
|
inline |
Set ETAMPDET interrupts.
- Parameters
-
[in] interrupts
The interrupts flags to set.
◆ sl_etampdet_clear_interrupts()
|
inline |
Clear ETAMPDET interrupts.
- Parameters
-
[in] interrupts
The interrupts flags to clear.
◆ sl_etampdet_get_interrupts()
|
inline |
Gets pending ETAMPDET interrupt flags.
- Note
- Event bits are not cleared by using this function.
- Returns
- Pending ETAMPDET interrupt sources. Returns a set of interrupt flags OR-ed together for multiple interrupt sources.
◆ sl_etampdet_get_enabled_interrupts()
|
inline |
Gets enabled and pending ETAMPDET interrupt flags.
Useful for handling more interrupt sources in the same interrupt handler.
- Note
- Interrupt flags are not cleared by using this function.
- Returns
-
Pending and enabled ETAMPDET interrupt sources. The return value is the bitwise AND of
- the enabled interrupt sources in ETAMPDET_IEN and
- the pending interrupt flags ETAMPDET_IF.
◆ sl_etampdet_lock()
|
inline |
Lock ETAMPDET registers.
- Note
- When ETAMPDET registers are locked, ETAMPDET_EN, ETAMPDET_CFG, ETAMPDET_CMD, ETAMPDET_CHNLSEEDVALx, ETAMPDET_CNTMISMATCHMAX, ETAMPDET_CHNLFILTWINSIZE, ETAMPDET_EM4WUEN and ETAMPDET_CLKPRESCVAL registers cannot be written to.
◆ sl_etampdet_unlock()
|
inline |
Unlock ETAMPDET registers.
- Note
- When ETAMPDET registers are unlocked, registers are writable.
◆ sl_etampdet_get_status()
|
inline |
Gets ETAMPDET STATUS register value.
- Returns
- Current STATUS register value.
◆ sl_etampdet_set_seed_value()
|
inline |
Set ETAMPDET channel seed value.
- Parameters
-
[in] channel
The channel to set seed value. [in] seed_value
The seed value to set into LFSR of the channel.
- Note
- It is recommended to get the random seed value using TRNG (True random Number Generator) peripheral.
◆ sl_etampdet_get_seed_value()
|
inline |
Get ETAMPDET channel seed value.
- Parameters
-
[in] channel
The channel to get seed value from.
- Returns
- The seed value of the channel.
Macro Definition Documentation
◆ ETAMPDET_CONFIG_CHANNEL_DEFAULT
#define ETAMPDET_CONFIG_CHANNEL_DEFAULT |
ETAMPDET default channel configuration.
◆ ETAMPDET_CONFIG_DEFAULT
#define ETAMPDET_CONFIG_DEFAULT |
ETAMPDET default configuration.
Enumeration Type Documentation
◆ sl_etampdet_channel_t
◆ sl_etampdet_channel_cnt_mismatch_threshold_t
ETAMPDET filter thresholds.
◆ sl_etampdet_channel_filt_win_size_t
ETAMPDET filter moving window size.
◆ sl_etampdet_upper_clk_presc_t
ETAMPDET upper part of divider ripple counter.
◆ sl_etampdet_lower_clk_presc_t
ETAMPDET lower part of divider binary counter.