S145 SoftDevice for nRF54LS05 API documentation 10.0.0
Loading...
Searching...
No Matches

◆ sd_radio_request()

uint32_t sd_radio_request ( nrf_radio_request_t const * p_request)

#include <nrf_soc.h>

Requests a radio timeslot.

Note
The request type is determined by p_request->request_type, and can be one of NRF_RADIO_REQ_TYPE_EARLIEST and NRF_RADIO_REQ_TYPE_NORMAL. The first request in a session must always be of type NRF_RADIO_REQ_TYPE_EARLIEST.
For a normal request (NRF_RADIO_REQ_TYPE_NORMAL), the start time of a radio timeslot is specified by p_request->distance_us and is given relative to the start of the previous timeslot.
A too small p_request->distance_us will lead to a NRF_EVT_RADIO_BLOCKED event.
Timeslots scheduled too close will lead to a NRF_EVT_RADIO_BLOCKED event.
See the SoftDevice Specification for more on radio timeslot scheduling, distances and lengths.
If an opportunity for the first radio timeslot is not found before nrf_radio_request_earliest_t::timeout_us after the call to this function, it is not scheduled, and instead a NRF_EVT_RADIO_BLOCKED event is sent. The application may then try to schedule the first radio timeslot again.
Successful requests will result in nrf_radio_signal_callback_t(NRF_RADIO_CALLBACK_SIGNAL_TYPE_START). Unsuccessful requests will result in a NRF_EVT_RADIO_BLOCKED event, see NRF_SOC_EVTS.
The jitter in the start time of the radio timeslots is +/- NRF_RADIO_START_JITTER_US us.
The nrf_radio_signal_callback_t(NRF_RADIO_CALLBACK_SIGNAL_TYPE_START) call has a latency relative to the specified radio timeslot start, but this does not affect the actual start time of the timeslot.
SD_TIMESLOT_TIMER0 is reset at the start of the radio timeslot, and is clocked at 1MHz from the high frequency (16 MHz) clock source. If p_request->hfclk_force_xtal is true, the high frequency clock is guaranteed to be clocked from the external crystal.
The SoftDevice will neither access the NRF_RADIO peripheral nor the SD_TIMESLOT_TIMER0 peripheral during the radio timeslot.
Parameters
[in]p_requestPointer to the request parameters.
Return values
NRF_ERROR_FORBIDDENEither:
NRF_ERROR_INVALID_ADDRIf the p_request pointer is invalid.
NRF_ERROR_INVALID_PARAMIf the parameters of p_request are not valid.
NRF_SUCCESSOtherwise.