ETAMPDET - External Tamper Detect#
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.
Modules#
sl_hal_etampdet_config_channel_t
Enumerations#
ETAMPDET filter thresholds.
ETAMPDET filter moving window size.
ETAMPDET upper part of divider ripple counter.
ETAMPDET lower part of divider binary counter.
Functions#
Initialize ETAMPDET.
Initialize ETAMPDET channel.
Wait for the ETAMPDET to complete all synchronization of register changes and commands.
Wait for the ETAMPDET to complete disabling procedure.
Enable ETAMPDET.
Disable ETAMPDET.
Load seed value into channel LFSR.
Start ETAMPDET channel.
Stop ETAMPDET channel.
Enable ETAMPDET interrupts.
Disable ETAMPDET interrupts.
Set ETAMPDET interrupts.
Clear ETAMPDET interrupts.
Gets pending ETAMPDET interrupt flags.
Gets enabled and pending ETAMPDET interrupt flags.
Lock ETAMPDET registers.
Unlock ETAMPDET registers.
Gets ETAMPDET STATUS register value.
Set ETAMPDET channel seed value.
Get ETAMPDET channel seed value.
Macros#
ETAMPDET default channel configuration.
ETAMPDET default configuration.
Enumeration Documentation#
sl_hal_etampdet_channel_t#
sl_hal_etampdet_channel_t
ETAMPDET channels.
Enumerator | |
---|---|
channel_0 | Channel 0. |
channel_1 | Channel 1. |
56
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_channel_cnt_mismatch_threshold_t#
sl_hal_etampdet_channel_cnt_mismatch_threshold_t
ETAMPDET filter thresholds.
Enumerator | |
---|---|
detect_filt_threshold_1 | Raise detect flag after seeing 1 event before reset counter expire. |
detect_filt_threshold_2 | Raise detect flag after seeing 2 events before reset counter expire. |
detect_filt_threshold_3 | Raise detect flag after seeing 3 events before reset counter expire. |
detect_filt_threshold_4 | Raise detect flag after seeing 4 events before reset counter expire. |
detect_filt_threshold_5 | Raise detect flag after seeing 5 events before reset counter expire. |
detect_filt_threshold_6 | Raise detect flag after seeing 6 events before reset counter expire. |
detect_filt_threshold_7 | Raise detect flag after seeing 7 events before reset counter expire. |
detect_filt_threshold_8 | Raise detect flag after seeing 8 events before reset counter expire. |
65
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_channel_filt_win_size_t#
sl_hal_etampdet_channel_filt_win_size_t
ETAMPDET filter moving window size.
Enumerator | |
---|---|
detect_filt_win_size_2 | Detect filter moving window size 2. |
detect_filt_win_size_3 | Detect filter moving window size 3. |
detect_filt_win_size_4 | Detect filter moving window size 4. |
detect_filt_win_size_5 | Detect filter moving window size 5. |
detect_filt_win_size_6 | Detect filter moving window size 6. |
detect_filt_win_size_7 | Detect filter moving window size 7. |
detect_filt_win_size_8 | Detect filter moving window size 8. |
detect_filt_win_size_9 | Detect filter moving window size 9. |
detect_filt_win_size_10 | Detect filter moving window size 10. |
detect_filt_win_size_11 | Detect filter moving window size 11. |
detect_filt_win_size_12 | Detect filter moving window size 12. |
detect_filt_win_size_13 | Detect filter moving window size 13. |
detect_filt_win_size_14 | Detect filter moving window size 14. |
detect_filt_win_size_15 | Detect filter moving window size 15. |
detect_filt_win_size_16 | Detect filter moving window size 16. |
92
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_upper_clk_presc_t#
sl_hal_etampdet_upper_clk_presc_t
ETAMPDET upper part of divider ripple counter.
Enumerator | |
---|---|
upper_clk_prescaler_bypass | Ripple counter divider bypassed. |
upper_clk_prescaler_divide_2 | Divide by 2. |
upper_clk_prescaler_divide_4 | Divide by 4. |
upper_clk_prescaler_divide_8 | Divide by 8. |
upper_clk_prescaler_divide_16 | Divide by 16. |
upper_clk_prescaler_divide_32 | Divide by 32. |
upper_clk_prescaler_divide_64 | Divide by 64. |
140
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_lower_clk_presc_t#
sl_hal_etampdet_lower_clk_presc_t
ETAMPDET lower part of divider binary counter.
Enumerator | |
---|---|
lower_clk_prescaler_bypass | Divider is bypassed. |
lower_clk_prescaler_divide_2 | Divide by 2. |
lower_clk_prescaler_divide_3 | Divide by 3. |
lower_clk_prescaler_divide_4 | Divide by 4. |
lower_clk_prescaler_divide_5 | Divide by 5. |
lower_clk_prescaler_divide_6 | Divide by 6. |
lower_clk_prescaler_divide_7 | Divide by 7. |
lower_clk_prescaler_divide_8 | Divide by 8. |
lower_clk_prescaler_divide_9 | Divide by 9. |
lower_clk_prescaler_divide_10 | Divide by 10. |
lower_clk_prescaler_divide_11 | Divide by 11. |
lower_clk_prescaler_divide_12 | Divide by 12. |
lower_clk_prescaler_divide_13 | Divide by 13. |
lower_clk_prescaler_divide_14 | Divide by 14. |
lower_clk_prescaler_divide_15 | Divide by 15. |
lower_clk_prescaler_divide_16 | Divide by 16. |
lower_clk_prescaler_divide_17 | Divide by 17. |
lower_clk_prescaler_divide_18 | Divide by 18. |
lower_clk_prescaler_divide_19 | Divide by 19. |
lower_clk_prescaler_divide_20 | Divide by 20. |
lower_clk_prescaler_divide_21 | Divide by 21. |
lower_clk_prescaler_divide_22 | Divide by 22. |
lower_clk_prescaler_divide_23 | Divide by 23. |
lower_clk_prescaler_divide_24 | Divide by 24. |
lower_clk_prescaler_divide_25 | Divide by 25. |
lower_clk_prescaler_divide_26 | Divide by 26. |
lower_clk_prescaler_divide_27 | Divide by 27. |
lower_clk_prescaler_divide_28 | Divide by 28. |
lower_clk_prescaler_divide_29 | Divide by 29. |
lower_clk_prescaler_divide_30 | Divide by 30. |
lower_clk_prescaler_divide_31 | Divide by 31. |
lower_clk_prescaler_divide_32 | Divide by 32. |
lower_clk_prescaler_divide_33 | Divide by 33. |
lower_clk_prescaler_divide_34 | Divide by 34. |
lower_clk_prescaler_divide_35 | Divide by 35. |
lower_clk_prescaler_divide_36 | Divide by 36. |
lower_clk_prescaler_divide_37 | Divide by 37. |
lower_clk_prescaler_divide_38 | Divide by 38. |
lower_clk_prescaler_divide_39 | Divide by 39. |
lower_clk_prescaler_divide_40 | Divide by 40. |
lower_clk_prescaler_divide_41 | Divide by 41. |
lower_clk_prescaler_divide_42 | Divide by 42. |
lower_clk_prescaler_divide_43 | Divide by 43. |
lower_clk_prescaler_divide_44 | Divide by 44. |
lower_clk_prescaler_divide_45 | Divide by 45. |
lower_clk_prescaler_divide_46 | Divide by 46. |
lower_clk_prescaler_divide_47 | Divide by 47. |
lower_clk_prescaler_divide_48 | Divide by 48. |
lower_clk_prescaler_divide_49 | Divide by 49. |
lower_clk_prescaler_divide_50 | Divide by 50. |
lower_clk_prescaler_divide_51 | Divide by 51. |
lower_clk_prescaler_divide_52 | Divide by 52. |
lower_clk_prescaler_divide_53 | Divide by 53. |
lower_clk_prescaler_divide_54 | Divide by 54. |
lower_clk_prescaler_divide_55 | Divide by 55. |
lower_clk_prescaler_divide_56 | Divide by 56. |
lower_clk_prescaler_divide_57 | Divide by 57. |
lower_clk_prescaler_divide_58 | Divide by 58. |
lower_clk_prescaler_divide_59 | Divide by 59. |
lower_clk_prescaler_divide_60 | Divide by 60. |
lower_clk_prescaler_divide_61 | Divide by 61. |
lower_clk_prescaler_divide_62 | Divide by 62. |
lower_clk_prescaler_divide_63 | Divide by 63. |
lower_clk_prescaler_divide_64 | Divide by 64. |
164
of file platform/peripheral/inc/sl_hal_etampdet.h
Function Documentation#
sl_hal_etampdet_init#
void sl_hal_etampdet_init (const sl_hal_etampdet_config_t * config)
Initialize ETAMPDET.
[in] | config | The pointer to the initialization structure. |
Note
User should call sl_hal_etampdet_init_channel() for full initialization. This function should be called before sl_hal_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.
47
of file platform/peripheral/src/sl_hal_etampdet.c
sl_hal_etampdet_init_channel#
void sl_hal_etampdet_init_channel (const sl_hal_etampdet_config_channel_t * config_channel)
Initialize ETAMPDET channel.
[in] | config_channel | The pointer to the channel initialization structure. |
Note
User should call sl_hal_etampdet_init() for full initialization.
67
of file platform/peripheral/src/sl_hal_etampdet.c
sl_hal_etampdet_wait_sync#
void sl_hal_etampdet_wait_sync (void )
Wait for the ETAMPDET to complete all synchronization of register changes and commands.
N/A |
450
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_wait_ready#
void sl_hal_etampdet_wait_ready (void )
Wait for the ETAMPDET to complete disabling procedure.
N/A |
460
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_enable#
void sl_hal_etampdet_enable (void )
Enable ETAMPDET.
N/A |
476
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_disable#
void sl_hal_etampdet_disable (void )
Disable ETAMPDET.
N/A |
488
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_load#
void sl_hal_etampdet_load (sl_hal_etampdet_channel_t channel)
Load seed value into channel LFSR.
[in] | channel | The channel number. |
503
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_start#
void sl_hal_etampdet_start (sl_hal_etampdet_channel_t channel)
Start ETAMPDET channel.
[in] | channel | The channel number. |
516
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_stop#
void sl_hal_etampdet_stop (sl_hal_etampdet_channel_t channel)
Stop ETAMPDET channel.
[in] | channel | The channel number. |
529
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_enable_interrupts#
void sl_hal_etampdet_enable_interrupts (uint32_t interrupts)
Enable ETAMPDET interrupts.
[in] | interrupts | The interrupts flags to enable. |
542
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_disable_interrupts#
void sl_hal_etampdet_disable_interrupts (uint32_t interrupts)
Disable ETAMPDET interrupts.
[in] | interrupts | The interrupts flags to disable. |
552
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_set_interrupts#
void sl_hal_etampdet_set_interrupts (uint32_t interrupts)
Set ETAMPDET interrupts.
[in] | interrupts | The interrupts flags to set. |
562
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_clear_interrupts#
void sl_hal_etampdet_clear_interrupts (uint32_t interrupts)
Clear ETAMPDET interrupts.
[in] | interrupts | The interrupts flags to clear. |
572
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_get_interrupts#
uint32_t sl_hal_etampdet_get_interrupts (void )
Gets pending ETAMPDET interrupt flags.
N/A |
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.
586
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_get_enabled_interrupts#
uint32_t sl_hal_etampdet_get_enabled_interrupts (void )
Gets enabled and pending ETAMPDET interrupt flags.
N/A |
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.
602
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_lock#
void sl_hal_etampdet_lock (void )
Lock ETAMPDET registers.
N/A |
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.
616
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_unlock#
void sl_hal_etampdet_unlock (void )
Unlock ETAMPDET registers.
N/A |
Note
When ETAMPDET registers are unlocked, registers are writable.
626
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_get_status#
uint32_t sl_hal_etampdet_get_status (void )
Gets ETAMPDET STATUS register value.
N/A |
Returns
Current STATUS register value.
636
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_set_seed_value#
void sl_hal_etampdet_set_seed_value (uint32_t seed_value, sl_hal_etampdet_channel_t channel)
Set ETAMPDET channel seed value.
[in] | seed_value | The channel to set seed value. |
[in] | channel | 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.
651
of file platform/peripheral/inc/sl_hal_etampdet.h
sl_hal_etampdet_get_seed_value#
uint32_t sl_hal_etampdet_get_seed_value (sl_hal_etampdet_channel_t channel)
Get ETAMPDET channel seed value.
[in] | channel | The channel to get seed value from. |
Returns
The seed value of the channel.
667
of file platform/peripheral/inc/sl_hal_etampdet.h
Macro Definition Documentation#
ETAMPDET_CONFIG_CHANNEL_DEFAULT#
#define ETAMPDET_CONFIG_CHANNEL_DEFAULTValue:
ETAMPDET default channel configuration.
400
of file platform/peripheral/inc/sl_hal_etampdet.h
ETAMPDET_CONFIG_DEFAULT#
#define ETAMPDET_CONFIG_DEFAULTValue:
ETAMPDET default configuration.
413
of file platform/peripheral/inc/sl_hal_etampdet.h