STM HAL
- group nrf_stm_hal
Hardware access layer for managing the System Trace Macrocell (STM) peripheral.
Enums
-
enum nrf_stm_feature_t
STM features.
Note
Registers marked RO are read-only and may be only used in nrf_stm_feature_check function. Registers marked RW are read-write and may be used with both nrf_stm_feature_check and nrf_stm_feature_set functions.
Warning
Registers marked with (1) signal negative situation (disabled, not supported) using non-zero value. Therefore the register value is negated when retrieving their setting with nrf_stm_feature_present_check() or setting it with nrf_stm_feature_set(). This is to ensure that true always means enabled/supported and false disabled/not supported.
Values:
-
enumerator NRF_STM_FEATURE_HETER
Hardware event trigger enable register support. RO
-
enumerator NRF_STM_FEATURE_HEERR
Hardware event error detection support. RO
-
enumerator NRF_STM_FEATURE_HEMASTR
Hardware event master number register support. RO
-
enumerator NRF_STM_FEATURE_STM
Global STM enable. RW
-
enumerator NRF_STM_FEATURE_TSEN
Timestamping enable. RW
-
enumerator NRF_STM_FEATURE_SYNCEN
Synchronization control register implemented. RW
-
enumerator NRF_STM_FEATURE_COMPEN
Compression enable. RW
-
enumerator NRF_STM_FEATURE_BUSY
STM busy status. RW
-
enumerator NRF_STM_FEATURE_FIFOAF
Auto-flush enable. RW
-
enumerator NRF_STM_FEATURE_ASYNCPE
Async priority escalation enable. RW
-
enumerator NRF_STM_FEATURE_PRIORINVDIS
Priority inversion enable. RW (1)
-
enumerator NRF_STM_FEATURE_CLKON
Override for architectural clock gate enable. RW
-
enumerator NRF_STM_FEATURE_AFREADYHIGH
Override for the AFREADY output enable. RW
-
enumerator NRF_STM_FEATURE_TSFREQ
Timestamp frequency indication configuration. RO
-
enumerator NRF_STM_FEATURE_FORCETS
timestamp stimulus register support. RO
-
enumerator NRF_STM_FEATURE_TSPRESCALE
Timestamp prescale support. RO (1)
-
enumerator NRF_STM_FEATURE_HWTEN
Hardware event trace packet emission support. RO (1)
-
enumerator NRF_STM_FEATURE_SWOEN
Anynchronous-specific usage model for timestamps support. RO (1)
-
enumerator NRF_STM_FEATURE_SPTER
Stimulus port trigger enable register support. RO
-
enumerator NRF_STM_FEATURE_SPER
Stimulus port enable register support. RO (1)
-
enumerator NRF_STM_FEATURE_SPOVERRIDE
Stimulus port override register support. RO
-
enumerator NRF_STM_FEATURE_PRIVMASK
Trace privilege register support. RO (1)
-
enumerator NRF_STM_FEATURE_INTEGRATION
Integration mode enable. RW
-
enumerator NRF_STM_FEATURE_LC_PRESENT
Lock control mechanism support. RO
-
enumerator NRF_STM_FEATURE_LC_LOCKED
Lock write access enable. RO
-
enumerator NRF_STM_FEATURE_NSID
Security for non-secure invasive debug enable. RO
-
enumerator NRF_STM_FEATURE_NSNID
Security for non-secure non-invasive debug enable. RO
-
enumerator NRF_STM_FEATURE_SID
Security for secure invasive debug. RO
-
enumerator NRF_STM_FEATURE_SNID
Security for secure non-invasive debug. RO
-
enumerator NRF_STM_FEATURE_HETER
-
enum nrf_stm_output_t
STM outputs.
Values:
-
enumerator NRF_STM_OUTPUT_TRIGOUTSPTE
Match using STMSPTER trigger event output.
-
enumerator NRF_STM_OUTPUT_TRIGOUTSW
Write to TRIG location trigger event output.
-
enumerator NRF_STM_OUTPUT_TRIGOUTHETE
Match using STMHETER trigger event output.
-
enumerator NRF_STM_OUTPUT_ASYNCOUT
Alignment synchronization output.
-
enumerator NRF_STM_OUTPUT_ATDATAM_0
Trace data ATDATAM[0] output.
-
enumerator NRF_STM_OUTPUT_ATDATAM_7
Trace data ATDATAM[7] output.
-
enumerator NRF_STM_OUTPUT_ATDATAM_15
Trace data ATDATAM[15] output.
-
enumerator NRF_STM_OUTPUT_ATDATAM_23
Trace data ATDATAM[23] output.
-
enumerator NRF_STM_OUTPUT_ATDATAM_31
Trace data ATDATAM[31] output.
-
enumerator NRF_STM_OUTPUT_ATIDM_0
Trace source ID bit 0 output.
-
enumerator NRF_STM_OUTPUT_ATIDM_1
Trace source ID bit 1 output.
-
enumerator NRF_STM_OUTPUT_ATIDM_2
Trace source ID bit 2 output.
-
enumerator NRF_STM_OUTPUT_ATIDM_3
Trace source ID bit 3 output.
-
enumerator NRF_STM_OUTPUT_ATIDM_4
Trace source ID bit 4 output.
-
enumerator NRF_STM_OUTPUT_ATIDM_5
Trace source ID bit 5 output.
-
enumerator NRF_STM_OUTPUT_ATIDM_6
Trace source ID bit 6 output.
-
enumerator NRF_STM_OUTPUT_ATVALIDM
Transfer valid output.
-
enumerator NRF_STM_OUTPUT_AFREADYM
ATB flush acknowledge output.
-
enumerator NRF_STM_OUTPUT_ATBYTESM_0
Number of bytes on ATDATA to be captured bit 0 output.
-
enumerator NRF_STM_OUTPUT_ATBYTESM_1
Number of bytes on ATDATA to be captured bit 1 output.
-
enumerator NRF_STM_OUTPUT_TRIGOUTSPTE
-
enum nrf_stm_input_t
STM inputs.
Values:
-
enumerator NRF_STM_INPUT_ATREADYM
Slave is ready to accept data input.
-
enumerator NRF_STM_INPUT_AFVALIDM
ATB flush request input.
-
enumerator NRF_STM_INPUT_ATREADYM
-
enum nrf_stm_dma_sens_t
Sensitivity of the DMA request to the current buffer level.
Values:
-
enumerator NRF_STM_DMACTLR_LT25
Buffer is <25% full.
-
enumerator NRF_STM_DMACTLR_LT50
Buffer is <50% full.
-
enumerator NRF_STM_DMACTLR_LT75
Buffer is <75% full.
-
enumerator NRF_STM_DMACTLR_LT100
Buffer is <100% full.
-
enumerator NRF_STM_DMACTLR_LT25
-
enum nrf_stm_heidr_class_t
Programmer’s models.
Values:
-
enumerator NRF_STM_HEIDR_CLASS_HARDWARE_EVENT_CONTROL
Hardware Event Control programmer’s model.
-
enumerator NRF_STM_HEIDR_CLASS_HARDWARE_EVENT_CONTROL
-
enum nrf_stm_spfeat1r_prot_t
STM protocols.
Values:
-
enumerator NRF_STM_SFPEAT1R_PROT_STPV2
STPv2 protocol.
-
enumerator NRF_STM_SFPEAT1R_PROT_STPV2
-
enum nrf_stm_spfeat1r_ts_t
Timestamp support modes.
Values:
-
enumerator NRF_STM_SPFEAT1R_TS_ABSOLUTE
Absolute timestaps implemented.
-
enumerator NRF_STM_SPFEAT1R_TS_ABSOLUTE
-
enum nrf_stm_spfeat1r_syncen_t
STMTCSR.SYNCEN support modes.
Values:
-
enumerator NRF_STM_SPFEAT1R_SYNCEN_READ_AS_ONE
STMTCSR.SYNCEN implemented, but always reads as 1.
-
enumerator NRF_STM_SPFEAT1R_SYNCEN_READ_AS_ONE
-
enum nrf_stm_spfeat2r_spcomp_t
Data compression on stimulus port support modes.
Values:
-
enumerator NRF_STM_SPFEAT2R_SPCOMP_PROGRAMMABLE
Data compression support is programmable.
-
enumerator NRF_STM_SPFEAT2R_SPCOMP_PROGRAMMABLE
-
enum nrf_stm_spfeat2r_sptrtype_t
Stimulus port transaction type support modes.
Values:
-
enumerator NRF_STM_SPFEAT2R_SPTRTYPE_INVARIANT_AND_GUARANTEED
Both invariant timing and guaranteed transactions are supported.
-
enumerator NRF_STM_SPFEAT2R_SPTRTYPE_INVARIANT_AND_GUARANTEED
-
enum nrf_stm_spfeat2r_dsize_t
Fundamental data size modes.
Values:
-
enumerator NRF_STM_SPFEAT2R_DSIZE_32
32-bit data.
-
enumerator NRF_STM_SPFEAT2R_DSIZE_32
-
enum nrf_stm_lsr_type_t
Lock Access Register implementation modes.
Values:
-
enumerator NRF_STM_LSR_TYPE_8
8-bit Lock Access Register implemented.
-
enumerator NRF_STM_LSR_TYPE_32
32-bit Lock Access Register implemented.
-
enumerator NRF_STM_LSR_TYPE_8
Functions
-
NRF_STATIC_INLINE bool nrf_stm_feature_check(NRF_STM_Type const *p_reg, nrf_stm_feature_t feature)
Function for retrieving the state of a feature.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
feature – [in] Feature to be checked.
- Return values:
true – The feature is supported/enabled.
false – The feature is not supported/disabled.
-
NRF_STATIC_INLINE void nrf_stm_feature_set(NRF_STM_Type *p_reg, nrf_stm_feature_t feature, bool enable)
Function for setting the state of a feature.
Warning
Only features that are RW may be used in this function.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
feature – [in] Feature to be set.
enable – [in] State to be set.
-
NRF_STATIC_INLINE bool nrf_stm_input_check(NRF_STM_Type const *p_reg, nrf_stm_input_t input)
Function for retrieving the state of an input.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
input – [in] Input to be checked.
- Return values:
true – The input is high.
false – The input is low.
-
NRF_STATIC_INLINE void nrf_stm_output_set(NRF_STM_Type *p_reg, nrf_stm_output_t output, bool enable)
Function for setting the state of an output.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
output – [in] Output to be set.
enable – [in] State to be set.
-
NRF_STATIC_INLINE void nrf_stm_dmactlr_sens_set(NRF_STM_Type *p_reg, nrf_stm_dma_sens_t sens)
Function for setting the sensivity of the DMA request.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
sens – [in] Sensivity to be set.
-
NRF_STATIC_INLINE nrf_stm_dma_sens_t nrf_stm_dmactlr_sens_get(NRF_STM_Type const *p_reg)
Function for getting the sensivity of the DMA request.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Sensivity of the DMA request.
-
NRF_STATIC_INLINE uint16_t nrf_stm_hemastr_get(NRF_STM_Type const *p_reg)
Function for getting the number of the hardware event trace of the STPv2 master.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Number of the hardware event trace of the STPv2 master.
-
NRF_STATIC_INLINE uint16_t nrf_stm_hefeat1r_numhe_get(NRF_STM_Type const *p_reg)
Function for getting the number of hardware events suppoted by the STM.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Number of hardware events suppoted by the STM.
-
NRF_STATIC_INLINE nrf_stm_heidr_class_t nrf_stm_heidr_class_get(NRF_STM_Type const *p_reg)
Function for getting the programmer’s model of hardware event tracking.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Programmer’s model.
-
NRF_STATIC_INLINE uint8_t nrf_stm_heidr_classrev_get(NRF_STM_Type const *p_reg)
Function for getting the revision of the programmer’s model of hardware event tracking.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Revision of the programmer’s model.
-
NRF_STATIC_INLINE uint8_t nrf_stm_heidr_vendspec_get(NRF_STM_Type const *p_reg)
Function for getting vendor specific modifications or mappings of hardware event tracking.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Vendor specific modifications or mappings.
-
NRF_STATIC_INLINE void nrf_stm_tcsr_traceid_set(NRF_STM_Type *p_reg, uint8_t trace_id)
Function for setting the ATB Trace ID.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
trace_id – [in] ATB Trace ID to be set.
-
NRF_STATIC_INLINE uint8_t nrf_stm_tcsr_traceid_get(NRF_STM_Type const *p_reg)
Function for getting the ATB Trace ID.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
ATB Trace ID.
-
NRF_STATIC_INLINE nrf_stm_spfeat1r_prot_t nrf_stm_spfeat1r_prot_get(NRF_STM_Type const *p_reg)
Function for getting the implemented STM protocol.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Implemented STM protocol.
-
NRF_STATIC_INLINE nrf_stm_spfeat1r_ts_t nrf_stm_spfeat1r_ts_get(NRF_STM_Type const *p_reg)
Function for getting the timestamp support mode.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Timestamp support mode.
-
NRF_STATIC_INLINE uint8_t nrf_stm_spfeat1r_tracebus_get(NRF_STM_Type const *p_reg)
Function for getting the trace bus support.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Trace bus support.
-
NRF_STATIC_INLINE uint8_t nrf_stm_spfeat1r_trigctl_get(NRF_STM_Type const *p_reg)
Function for getting the trigger control support.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Trigger control support.
-
NRF_STATIC_INLINE nrf_stm_spfeat1r_syncen_t nrf_stm_spfeat1r_syncen_get(NRF_STM_Type const *p_reg)
Function for getting the STMTCSR.SYNCEN support mode.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
STMTCSR.SYNCEN support mode.
-
NRF_STATIC_INLINE nrf_stm_spfeat2r_spcomp_t nrf_stm_spfeat2r_spcomp_get(NRF_STM_Type const *p_reg)
Function for getting the data compression on stimulus port support mode.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Data compression on stimulus port support mode.
-
NRF_STATIC_INLINE nrf_stm_spfeat2r_sptrtype_t nrf_stm_spfeat2r_sptrtype_get(NRF_STM_Type const *p_reg)
Function for getting the stimulus port transaction type support mode.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Stimulus port transaction type support mode.
-
NRF_STATIC_INLINE nrf_stm_spfeat2r_dsize_t nrf_stm_spfeat2r_dsize_get(NRF_STM_Type const *p_reg)
Function for getting the fundamental data size mode.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Fundamental data size mode.
-
NRF_STATIC_INLINE uint8_t nrf_stm_spfeat3r_nummast_get(NRF_STM_Type const *p_reg)
Function for getting the number of stimulus ports masters implemented, minus 1.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Number of stimulus ports masters implemented, minus 1.
-
NRF_STATIC_INLINE void nrf_stm_lar_access_set(NRF_STM_Type *p_reg, uint32_t value)
Function for setting the enable write access register.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
value – [in] Value to be set for enable write access register.
-
NRF_STATIC_INLINE nrf_stm_lsr_type_t nrf_stm_lsr_type_get(NRF_STM_Type const *p_reg)
Function for getting the Lock Access Register implementation mode.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Lock Access Register implementation mode.
-
NRF_STATIC_INLINE uint32_t nrf_stm_devid_numsp_get(NRF_STM_Type const *p_reg)
Function for getting the number of stimulus ports implemented.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Number of stimulus ports implemented.
-
NRF_STATIC_INLINE nrf_stm_devtype_major_t nrf_stm_devtype_major_get(NRF_STM_Type const *p_reg)
Function for getting the major classification grouping for this debug or trace component.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Major classification grouping for this debug or trace component.
-
NRF_STATIC_INLINE nrf_stm_devtype_sub_t nrf_stm_devtype_sub_get(NRF_STM_Type const *p_reg)
Function for getting the sub-classification for this debug or trace component.
- Parameters:
p_reg – [in] Pointer to the structure of registers of the peripheral.
- Returns:
Sub-classification for this debug or trace component.
-
enum nrf_stm_feature_t