53#include "nrf_error_soc.h"
63#define SOC_SVC_BASE (0x20)
64#define SOC_SVC_BASE_NOT_AVAILABLE (0x2D)
67#define NRF_RADIO_NOTIFICATION_INACTIVE_GUARANTEED_TIME_US (62)
70#define NRF_RADIO_MINIMUM_TIMESLOT_LENGTH_EXTENSION_TIME_US (200)
73#define NRF_RADIO_MAX_EXTENSION_PROCESSING_TIME_US (25)
76#define NRF_RADIO_MIN_EXTENSION_MARGIN_US (87)
78#define SOC_ECB_KEY_LENGTH (16)
79#define SOC_ECB_CLEARTEXT_LENGTH (16)
80#define SOC_ECB_CIPHERTEXT_LENGTH (SOC_ECB_CLEARTEXT_LENGTH)
81#define SD_EVT_IRQn (SWI01_IRQn)
82#define SD_EVT_IRQHandler (SWI01_IRQHandler)
83#define RADIO_NOTIFICATION_IRQn (SWI02_IRQn)
84#define RADIO_NOTIFICATION_IRQHandler (SWI02_IRQHandler)
85#define SD_EVT_IRQ_PRI (6)
86#define RADIO_NOTIFICATION_IRQ_PRI (6)
87#define NRF_RADIO_LENGTH_MIN_US (100)
88#define NRF_RADIO_LENGTH_MAX_US (100000)
90#define NRF_RADIO_DISTANCE_MAX_US (256000000UL - 1UL)
92#define NRF_RADIO_EARLIEST_TIMEOUT_MAX_US (256000000UL - 1UL)
94#define NRF_RADIO_START_JITTER_US (0)
96#define SD_RAND_SEED_SIZE (32)
#define SOC_SVC_BASE
The number of the lowest SVC number reserved for the SoC library.
Definition nrf_soc.h:63
#define SOC_SVC_BASE_NOT_AVAILABLE
Definition nrf_soc.h:64
#define SOC_ECB_CLEARTEXT_LENGTH
Definition nrf_soc.h:79
#define SOC_ECB_CIPHERTEXT_LENGTH
Definition nrf_soc.h:80
#define SD_RAND_SEED_SIZE
Definition nrf_soc.h:96
#define SOC_ECB_KEY_LENGTH
Definition nrf_soc.h:78
NRF_RADIO_REQUEST_TYPE
Radio timeslot request type.
Definition nrf_soc.h:245
@ NRF_RADIO_REQ_TYPE_NORMAL
Definition nrf_soc.h:247
@ NRF_RADIO_REQ_TYPE_EARLIEST
Definition nrf_soc.h:246
NRF_RADIO_NOTIFICATION_TYPES
Radio notification types.
Definition nrf_soc.h:184
@ NRF_RADIO_NOTIFICATION_TYPE_INT_ON_ACTIVE
Definition nrf_soc.h:186
@ NRF_RADIO_NOTIFICATION_TYPE_INT_ON_INACTIVE
Definition nrf_soc.h:187
@ NRF_RADIO_NOTIFICATION_TYPE_NONE
Definition nrf_soc.h:185
@ NRF_RADIO_NOTIFICATION_TYPE_INT_ON_BOTH
Definition nrf_soc.h:188
NRF_RADIO_SIGNAL_CALLBACK_ACTION
The actions requested by the signal callback.
Definition nrf_soc.h:207
@ NRF_RADIO_SIGNAL_CALLBACK_ACTION_REQUEST_AND_END
Definition nrf_soc.h:216
@ NRF_RADIO_SIGNAL_CALLBACK_ACTION_NONE
Definition nrf_soc.h:208
@ NRF_RADIO_SIGNAL_CALLBACK_ACTION_END
Definition nrf_soc.h:215
@ NRF_RADIO_SIGNAL_CALLBACK_ACTION_EXTEND
Definition nrf_soc.h:209
NRF_SOC_EVTS
SoC Events.
Definition nrf_soc.h:252
@ NRF_EVT_FLASH_OPERATION_SUCCESS
Definition nrf_soc.h:255
@ NRF_EVT_NUMBER_OF_EVTS
Definition nrf_soc.h:262
@ NRF_EVT_FLASH_OPERATION_ERROR
Definition nrf_soc.h:256
@ NRF_EVT_RADIO_BLOCKED
Definition nrf_soc.h:257
@ NRF_EVT_POWER_FAILURE_WARNING
Definition nrf_soc.h:254
@ NRF_EVT_RADIO_SESSION_CLOSED
Definition nrf_soc.h:260
@ NRF_EVT_HFCLKSTARTED
Definition nrf_soc.h:253
@ NRF_EVT_RADIO_SIGNAL_CALLBACK_INVALID_RETURN
Definition nrf_soc.h:258
@ NRF_EVT_RADIO_SESSION_IDLE
Definition nrf_soc.h:259
@ NRF_EVT_RAND_SEED_REQUEST
Definition nrf_soc.h:261
NRF_RADIO_CALLBACK_SIGNAL_TYPE
The Radio signal callback types.
Definition nrf_soc.h:193
@ NRF_RADIO_CALLBACK_SIGNAL_TYPE_TIMER0
Definition nrf_soc.h:195
@ NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_FAILED
Definition nrf_soc.h:197
@ NRF_RADIO_CALLBACK_SIGNAL_TYPE_RADIO
Definition nrf_soc.h:196
@ NRF_RADIO_CALLBACK_SIGNAL_TYPE_START
Definition nrf_soc.h:194
@ NRF_RADIO_CALLBACK_SIGNAL_TYPE_EXTEND_SUCCEEDED
Definition nrf_soc.h:198
NRF_POWER_THRESHOLDS
Power failure thresholds.
Definition nrf_soc.h:148
@ NRF_POWER_THRESHOLD_V22
Definition nrf_soc.h:154
@ NRF_POWER_THRESHOLD_V21
Definition nrf_soc.h:153
@ NRF_POWER_THRESHOLD_V26
Definition nrf_soc.h:158
@ NRF_POWER_THRESHOLD_V20
Definition nrf_soc.h:152
@ NRF_POWER_THRESHOLD_V17
Definition nrf_soc.h:149
@ NRF_POWER_THRESHOLD_V18
Definition nrf_soc.h:150
@ NRF_POWER_THRESHOLD_V24
Definition nrf_soc.h:156
@ NRF_POWER_THRESHOLD_V25
Definition nrf_soc.h:157
@ NRF_POWER_THRESHOLD_V19
Definition nrf_soc.h:151
@ NRF_POWER_THRESHOLD_V23
Definition nrf_soc.h:155
@ NRF_POWER_THRESHOLD_V27
Definition nrf_soc.h:159
@ NRF_POWER_THRESHOLD_V28
Definition nrf_soc.h:160
NRF_RADIO_PRIORITY
Radio timeslot priorities.
Definition nrf_soc.h:238
@ NRF_RADIO_PRIORITY_HIGH
Definition nrf_soc.h:239
@ NRF_RADIO_PRIORITY_NORMAL
Definition nrf_soc.h:240
NRF_RADIO_NOTIFICATION_DISTANCES
Radio notification distances.
Definition nrf_soc.h:170
@ NRF_RADIO_NOTIFICATION_DISTANCE_2680US
Definition nrf_soc.h:176
@ NRF_RADIO_NOTIFICATION_DISTANCE_420US
Definition nrf_soc.h:173
@ NRF_RADIO_NOTIFICATION_DISTANCE_3620US
Definition nrf_soc.h:177
@ NRF_RADIO_NOTIFICATION_DISTANCE_NONE
Definition nrf_soc.h:171
@ NRF_RADIO_NOTIFICATION_DISTANCE_800US
Definition nrf_soc.h:174
@ NRF_RADIO_NOTIFICATION_DISTANCE_4560US
Definition nrf_soc.h:178
@ NRF_RADIO_NOTIFICATION_DISTANCE_1740US
Definition nrf_soc.h:175
@ NRF_RADIO_NOTIFICATION_DISTANCE_5500US
Definition nrf_soc.h:179
@ NRF_RADIO_NOTIFICATION_DISTANCE_200US
Definition nrf_soc.h:172
NRF_POWER_MODES
Power modes.
Definition nrf_soc.h:141
@ NRF_POWER_MODE_LOWPWR
Definition nrf_soc.h:143
@ NRF_POWER_MODE_CONSTLAT
Definition nrf_soc.h:142
NRF_RADIO_HFCLK_CFG
Radio timeslot high frequency clock source configuration.
Definition nrf_soc.h:221
@ NRF_RADIO_HFCLK_CFG_NO_GUARANTEE
Definition nrf_soc.h:229
@ NRF_RADIO_HFCLK_CFG_XTAL_GUARANTEED
Definition nrf_soc.h:222
NRF_MUTEX_VALUES
Possible values of a nrf_mutex_t.
Definition nrf_soc.h:134
@ NRF_MUTEX_FREE
Definition nrf_soc.h:135
@ NRF_MUTEX_TAKEN
Definition nrf_soc.h:136
NRF_SOC_SVCS
The SVC numbers used by the SVC functions in the SoC library.
Definition nrf_soc.h:105
@ SD_MUTEX_RELEASE
Definition nrf_soc.h:109
@ SD_ECB_BLOCKS_ENCRYPT
Definition nrf_soc.h:122
@ SD_POWER_MODE_SET
Definition nrf_soc.h:111
@ SD_POWER_GPREGRET_SET
Definition nrf_soc.h:114
@ SD_TEMP_GET
Definition nrf_soc.h:127
@ SD_RADIO_NOTIFICATION_CFG_SET
Definition nrf_soc.h:120
@ SD_CLOCK_HFCLK_IS_RUNNING
Definition nrf_soc.h:119
@ SD_POWER_GPREGRET_CLR
Definition nrf_soc.h:115
@ SD_MUTEX_NEW
Definition nrf_soc.h:107
@ SD_RAND_APPLICATION_VECTOR_GET
Definition nrf_soc.h:110
@ SD_POWER_GPREGRET_GET
Definition nrf_soc.h:116
@ SD_FLASH_WRITE
Definition nrf_soc.h:106
@ SD_RADIO_SESSION_OPEN
Definition nrf_soc.h:123
@ SD_ECB_BLOCK_ENCRYPT
Definition nrf_soc.h:121
@ SD_RADIO_REQUEST
Definition nrf_soc.h:125
@ SD_POWER_POF_THRESHOLD_SET
Definition nrf_soc.h:113
@ SD_CLOCK_HFCLK_RELEASE
Definition nrf_soc.h:118
@ SD_CLOCK_HFCLK_REQUEST
Definition nrf_soc.h:117
@ SVC_SOC_LAST
Definition nrf_soc.h:129
@ SD_RADIO_SESSION_CLOSE
Definition nrf_soc.h:124
@ SD_POWER_POF_ENABLE
Definition nrf_soc.h:112
@ SD_MUTEX_ACQUIRE
Definition nrf_soc.h:108
@ SD_EVT_GET
Definition nrf_soc.h:126
@ SD_RAND_SEED_SET
Definition nrf_soc.h:128
uint32_t sd_power_pof_threshold_set(uint8_t threshold)
Sets the power failure comparator threshold value.
uint32_t sd_mutex_new(nrf_mutex_t *p_mutex)
Initialize a mutex.
uint32_t sd_ecb_blocks_encrypt(uint8_t block_count, nrf_ecb_hal_data_block_t *p_data_blocks)
Encrypts multiple data blocks provided as an array of data block structures.
uint32_t sd_clock_hfclk_request(void)
Request the high frequency crystal oscillator.
uint32_t sd_radio_request(nrf_radio_request_t const *p_request)
Requests a radio timeslot.
uint32_t sd_radio_session_open(nrf_radio_signal_callback_t p_radio_signal_callback)
Opens a session for radio timeslot requests.
uint32_t sd_power_gpregret_clr(uint32_t gpregret_id, uint32_t gpregret_msk)
Clear bits in the general purpose retention registers (NRF_POWER->GPREGRET*).
uint32_t sd_power_mode_set(uint8_t power_mode)
Sets the power mode when in CPU sleep.
uint32_t sd_clock_hfclk_is_running(uint32_t *p_is_running)
Checks if the high frequency crystal oscillator is running.
uint32_t sd_power_gpregret_set(uint32_t gpregret_id, uint32_t gpregret_msk)
Set bits in the general purpose retention registers (NRF_POWER->GPREGRET*).
uint32_t sd_ecb_block_encrypt(nrf_ecb_hal_data_t *p_ecb_data)
Encrypts a block according to the specified parameters.
uint32_t sd_clock_hfclk_release(void)
Releases the high frequency crystal oscillator.
uint32_t sd_rand_application_vector_get(uint8_t *p_buff, uint8_t length)
Generate NIST SP 800-90A compliant random numbers.
uint32_t sd_evt_get(uint32_t *p_evt_id)
Gets any pending events generated by the SoC API.
uint32_t sd_power_gpregret_get(uint32_t gpregret_id, uint32_t *p_gpregret)
Get contents of the general purpose retention registers (NRF_POWER->GPREGRET*).
uint32_t sd_mutex_acquire(nrf_mutex_t *p_mutex)
Attempt to acquire a mutex.
uint32_t sd_mutex_release(nrf_mutex_t *p_mutex)
Release a mutex.
uint32_t sd_radio_session_close(void)
Closes a session for radio timeslot requests.
uint32_t sd_power_pof_enable(uint8_t pof_enable)
Enables or disables the power-fail comparator.
uint32_t sd_rand_seed_set(uint8_t p_seed[(32)])
Seed the random number generator.
uint32_t sd_radio_notification_cfg_set(uint8_t type, uint16_t distance_us)
Configures the Radio Notification signal.
uint32_t sd_temp_get(int32_t *p_temp)
Get the temperature measured on the chip.
uint32_t sd_flash_write(uint32_t *p_dst, uint32_t const *p_src, uint32_t size)
Flash Write.
nrf_radio_signal_callback_return_param_t *(* nrf_radio_signal_callback_t)(uint8_t signal_type)
The radio timeslot signal callback type.
Definition nrf_soc.h:333
uint8_t soc_ecb_ciphertext_t[((16))]
Definition nrf_soc.h:338
volatile uint8_t nrf_mutex_t
Represents a mutex for use with the nrf_mutex functions.
Definition nrf_soc.h:273
uint8_t soc_ecb_cleartext_t[(16)]
Definition nrf_soc.h:337
uint8_t soc_ecb_key_t[(16)]
AES ECB parameter typedefs.
Definition nrf_soc.h:336
soc_ecb_key_t const * p_key
Definition nrf_soc.h:352
soc_ecb_cleartext_t const * p_cleartext
Definition nrf_soc.h:353
soc_ecb_ciphertext_t * p_ciphertext
Definition nrf_soc.h:354
AES ECB block. Used to provide multiple blocks in a single call to sd_ecb_blocks_encrypt.
Definition nrf_soc.h:351
soc_ecb_ciphertext_t ciphertext
Definition nrf_soc.h:345
soc_ecb_key_t key
Definition nrf_soc.h:343
soc_ecb_cleartext_t cleartext
Definition nrf_soc.h:344
AES ECB data structure.
Definition nrf_soc.h:342
uint32_t length_us
Definition nrf_soc.h:280
uint8_t hfclk
Definition nrf_soc.h:278
uint8_t priority
Definition nrf_soc.h:279
uint32_t timeout_us
Definition nrf_soc.h:281
Parameters for a request for a timeslot as early as possible.
Definition nrf_soc.h:277
uint8_t priority
Definition nrf_soc.h:288
uint8_t hfclk
Definition nrf_soc.h:287
uint32_t distance_us
Definition nrf_soc.h:289
uint32_t length_us
Definition nrf_soc.h:290
Parameters for a normal radio timeslot request.
Definition nrf_soc.h:286
nrf_radio_request_normal_t normal
Definition nrf_soc.h:300
nrf_radio_request_earliest_t earliest
Definition nrf_soc.h:299
uint8_t request_type
Definition nrf_soc.h:296
Radio timeslot request parameters.
Definition nrf_soc.h:295
nrf_radio_request_t * p_next
Definition nrf_soc.h:312
uint8_t callback_action
Definition nrf_soc.h:307
uint32_t length_us
Definition nrf_soc.h:316
Return parameters of the radio timeslot signal callback.
Definition nrf_soc.h:306